Margin Calculator — Profit Margin & Markup

This margin calculator instantly computes profit margin, markup percentage, selling price, or cost when given any two values. Enter your numbers to see margin percentage, profit amount, and the equivalent markup percentage in real time.

Calculate Profit Margin

Select a calculation mode and enter your values to calculate margin, selling price, or cost.

$
$

Important: Margin can never be 100% or higher. A 100% margin would require a cost of $0, which is practically impossible. Markup, however, can exceed 100%.

Margin vs Markup Comparison

Margin %Markup %Factor
10%11.11%x1.1111
20%25.00%x1.2500
30%42.86%x1.4286
40%66.67%x1.6667
50%100.00%x2.0000

Frequently Asked Questions

What is the difference between margin and markup?

Margin is profit as a percentage of revenue (selling price). Markup is profit as a percentage of cost. For example, if you buy for $60 and sell for $100: Margin = ($40/$100) × 100 = 40%. Markup = ($40/$60) × 100 = 66.7%. Same profit, different percentages because the base is different.

How do I calculate profit margin?

Profit Margin = ((Revenue - Cost) / Revenue) × 100. For example, if you sell a product for $100 that costs $70 to make: Margin = (100-70)/100 × 100 = 30%. This means 30 cents of every dollar in sales is profit.

What is a good profit margin for a small business?

It varies by industry. Generally: 5% is low, 10% is average, 20%+ is excellent. Retail averages 3-5%, software 70-90%, restaurants 3-9%, professional services 15-30%. The US average across all industries is approximately 7-8%.

How do I calculate a 20% profit margin?

To achieve a 20% margin, use: Selling Price = Cost / (1 - 0.20) = Cost / 0.80. For a $40 item: $40 / 0.80 = $50 selling price. This gives $10 profit on $50 revenue = 20% margin. Note: adding 20% markup to $40 gives $48, which is only 16.7% margin.

What is the difference between gross margin and net margin?

Gross margin = (Revenue - Cost of Goods Sold) / Revenue. It only considers direct production costs. Net margin = (Revenue - ALL expenses) / Revenue. It includes operating costs, interest, taxes, and everything else. Gross margin is always higher than net margin.

How do I calculate margin in Excel?

For margin: =(Revenue-Cost)/Revenue and format as percentage. For selling price from target margin: =Cost/(1-MarginPercent). For markup from margin: =Margin/(1-Margin). Example: with Cost in A1 and Revenue in B1, margin formula is =(B1-A1)/B1.

What is operating margin?

Operating margin = Operating Income / Revenue × 100. Operating income is revenue minus COGS minus operating expenses (rent, salaries, utilities), but before interest and taxes. It shows how efficiently a company runs its core business operations.

Can profit margin be too high?

Technically no, but unusually high margins may attract competition, indicate pricing power that could erode, or suggest a niche market. Sustainable margins depend on barriers to entry, brand strength, and market conditions. Very high margins in competitive markets often decrease over time.

How do I convert markup to margin?

Margin = Markup / (1 + Markup). For example, a 50% markup (0.50): Margin = 0.50 / 1.50 = 0.333 = 33.3% margin. Conversely, Markup = Margin / (1 - Margin). A 25% margin: Markup = 0.25 / 0.75 = 0.333 = 33.3% markup.

What is the average profit margin by industry?

Common industry averages: Software/SaaS 70-85%, Financial services 25-35%, Healthcare 10-20%, Retail 3-5%, Restaurants 3-9%, Manufacturing 5-10%, E-commerce 10-20%, Construction 5-10%, Agriculture 10-15%, Real estate 15-25%.

Profit Margin Formulas

Profit Margin Formulas

All margin calculations derive from the fundamental relationship between revenue, cost, and profit. Below are the key formulas used in margin and markup calculations, along with practical explanations for each.

Margin Percentage:

Margin % = ((Revenue - Cost) / Revenue) × 100

Margin % = (Profit / Revenue) × 100

The margin formula divides profit by revenue (selling price). This tells you what fraction of each dollar of revenue is profit. For instance, if you sell a product for $80 that cost you $50, the margin is (($80 - $50) / $80) × 100 = 37.5%. The denominator is always revenue, which is what distinguishes margin from markup.

Markup Percentage:

Markup % = ((Revenue - Cost) / Cost) × 100

Markup % = (Profit / Cost) × 100

Markup divides profit by cost instead of revenue. Using the same example: (($80 - $50) / $50) × 100 = 60% markup. For the same transaction, markup is always higher than margin because cost is always less than revenue.

Selling Price from Margin:

Selling Price = Cost / (1 - Margin% / 100)

To find the selling price needed to achieve a specific margin, divide the cost by (1 minus the decimal margin). For example, if your cost is $60 and you want a 40% margin: $60 / (1 - 0.40) = $60 / 0.60 = $100. You can verify: ($100 - $60) / $100 = 40%.

Cost from Revenue and Margin:

Cost = Revenue × (1 - Margin% / 100)

To find the maximum allowable cost that maintains a target margin, multiply revenue by (1 minus the decimal margin). If your selling price is $100 and you need a 35% margin: $100 × (1 - 0.35) = $100 × 0.65 = $65 maximum cost.

Margin ↔ Markup Conversion:

Markup % = (Margin% / (100 - Margin%)) × 100

Margin % = (Markup% / (100 + Markup%)) × 100

These conversion formulas let you switch between margin and markup without knowing the actual dollar amounts. A 25% margin equals a 33.33% markup: (25 / 75) × 100 = 33.33%. Conversely, a 33.33% markup equals a 25% margin: (33.33 / 133.33) × 100 = 25%.

Margin vs Markup Comparison Table

Margin and markup are frequently confused because they both describe profit as a percentage but use different bases. The table below shows how common margin percentages correspond to their equivalent markup percentages and vice versa.

Margin %Markup %Example (Cost → Selling Price)
10%11.1%$90 → $100
20%25%$80 → $100
25%33.3%$75 → $100
30%42.9%$70 → $100
33.3%50%$66.70 → $100
40%66.7%$60 → $100
50%100%$50 → $100

Key insight: margin is always lower than markup for the same transaction. As margin approaches 100%, markup approaches infinity. A 50% margin equals a 100% markup (selling at double the cost). Confusing margin and markup when setting prices can lead to significant pricing errors.

Gross vs Net vs Operating Margin

There are three primary types of profit margin, each measuring profitability at a different level. Understanding the differences helps provide a complete picture of business financial health.

Gross Margin

Gross Margin = (Revenue - Cost of Goods Sold) / Revenue × 100

Gross margin measures the percentage of revenue remaining after subtracting only the direct cost of goods sold (COGS). COGS includes raw materials, direct labor, and manufacturing costs but excludes overhead like rent, marketing, or administrative salaries.

When to use: Use gross margin for evaluating product-level profitability, pricing effectiveness, and production efficiency. A declining gross margin may signal rising material costs or pricing pressure from competitors.

Operating Margin

Operating Margin = Operating Income / Revenue × 100

Operating Income = Revenue - COGS - Operating Expenses

Operating margin takes gross profit and subtracts operating expenses such as rent, utilities, salaries, marketing, and depreciation. It measures the profitability of core business operations before interest and taxes.

When to use: Use operating margin to evaluate how efficiently a company manages all its operational costs. It is ideal for comparing operational efficiency between companies in the same industry, since it excludes the effects of different financing structures and tax situations.

Net Margin

Net Margin = Net Income / Revenue × 100

Net Income = Revenue - ALL Expenses (COGS + Operating + Interest + Taxes)

Net margin is the most comprehensive profitability measure. It accounts for all expenses including COGS, operating costs, interest on debt, taxes, and any other costs. It represents the final percentage of revenue that becomes actual profit.

When to use: Use net margin for the truest picture of overall profitability. It is the bottom-line number that shows how much of every revenue dollar a company actually keeps. However, it can be distorted by one-time events and varies based on capital structure and tax jurisdiction, so analysts often use all three margin types together.

Profit Margin by Industry

Profit margins vary dramatically across industries due to differences in business models, capital requirements, competition, and cost structures. The table below shows typical net profit margin ranges for major industry sectors.

IndustryTypical Margin Range
Software / SaaS70 - 85%
Financial Services25 - 35%
Healthcare10 - 20%
Real Estate15 - 25%
E-commerce10 - 20%
Professional Services15 - 30%
Agriculture10 - 15%
Manufacturing5 - 10%
Construction5 - 10%
Retail3 - 5%
Restaurants3 - 9%

These figures represent typical ranges and can vary significantly depending on business size, geographic location, and specific niche. When benchmarking your business, compare like-for-like: gross margin to gross margin, net margin to net margin.