Profit Margin Calculator

Find gross margin, net margin, markup, selling price or cost from any two values, with formulas, a margin table and worked examples.

Loading calculator...

Profit margin in short
On this page

How to use the profit margin calculator

1

Choose what to find

Pick Margin %, Selling price or Cost. The form shows only the two inputs you need.

2

Enter your numbers

For margin, enter the cost of goods sold and the revenue. For a price or cost, enter the target margin and the other value.

3

Add other expenses

Open the advanced option to enter fees, shipping or overhead and see net profit and net margin.

4

Read the result

You get the margin, gross profit, markup on cost and a breakdown from revenue to profit.

Profit margin formula

Margin formulas

Gross profit = revenue − cost of goods sold

Gross margin % = gross profit ÷ revenue × 100

Net profit = gross profit − other expenses

Net margin % = net profit ÷ revenue × 100

Selling price for a target margin = cost ÷ (1 − margin)

Cost for a target margin = revenue × (1 − margin)

Margin is measured against revenue. Markup is measured against cost, so the same sale shows a higher markup than margin.

Profit margin examples

Example 1: gross margin

A product costs $40 and sells for $60.

  • Gross profit $60 − $40 = $20
  • Gross margin $20 ÷ $60 = 33.3%
  • Markup on cost $20 ÷ $40 = 50%

Gross margin is lower than markup because it divides by the larger number, the price.

Example 2: net margin

The same $60 sale carries $6 of fees and shipping.

  • Gross profit $20
  • Net profit $20 − $6 = $14
  • Net margin $14 ÷ $60 = 23.3%

Other expenses cut the margin from 33.3% to 23.3%.

Example 3: price for a target margin

You want a 40% margin on a $40 cost.

  • Selling price $40 ÷ (1 − 0.40) = $66.67
  • Gross profit $66.67 − $40 = $26.67

Charging $40 × 1.4 = $56 would give only a 28.6% margin.

Example 4: maximum cost

You sell at $100 and need a 30% margin.

  • Maximum cost $100 × (1 − 0.30) = $70
  • Gross profit $30

Any cost above $70 pushes the margin below 30%.

Example 5: a business year

Revenue is $250,000, cost of goods sold is $150,000 and other expenses are $60,000.

  • Gross profit $100,000
  • Gross margin $100,000 ÷ $250,000 = 40%
  • Net profit $100,000 − $60,000 = $40,000
  • Net margin $40,000 ÷ $250,000 = 16%

Gross margin shows pricing power, and net margin shows what the business keeps.

Margin vs markup

Margin and markup describe the same profit against different bases. Margin uses revenue and markup uses cost. A 50% margin equals a 100% markup, and a 40% margin equals a 66.7% markup. To work from cost and a markup percentage, use the markup calculator.

Profit margin on a $100 sale at different costs
CostGross profitProfit marginMarkup on cost
$90$1010%11.11%
$80$2020%25.00%
$70$3030%42.86%
$60$4040%66.67%
$50$5050%100.00%
$25$7575%300.00%

Use margin to price and plan

Once you know your margin, test it against real costs. The break-even calculator shows how many units cover your fixed costs, and the wholesale pricing calculator sets prices for shops. Marketplace sellers can see profit after fees with the Etsy profit calculator, the eBay fee calculator and the Amazon FBA profit calculator. Use the discount calculator to see how a sale price changes your margin.

Where a profit margin calculator helps

Check a price

See the margin behind any selling price.

Hit a margin goal

Find the price that delivers your target margin.

Cap your costs

Find the highest cost that still leaves your margin.

Compare products

See which products earn the most on each sale.

Gross margin is not the full picture

Gross margin ignores overhead, taxes and returns. Use the other expenses field to see net margin, and treat the result as a planning figure, not accounting advice.

Profit margin calculator FAQ

Subtract the cost from the revenue, divide by the revenue and multiply by 100. For $60 revenue and $40 cost that is $20 ÷ $60 × 100 = 33.3%.

It is gross profit as a percentage of revenue, where gross profit is revenue minus the cost of goods sold. It ignores other expenses such as overhead.

It is net profit as a percentage of revenue, after subtracting all expenses from revenue. It shows how much of each dollar of sales the business keeps.

Margin divides profit by revenue and markup divides profit by cost. A 50% markup is a 33.3% margin, and a 50% margin is a 100% markup.

Divide the cost by one minus the margin. A $40 cost with a 40% margin gives $40 ÷ 0.60 = $66.67.

Multiply the revenue by one minus the margin. At $100 revenue and a 30% margin, the cost is $70.

It depends on the industry, the business model and the costs involved, so compare against similar businesses rather than a single number.

Yes. If the cost is higher than the revenue, the margin is negative and each sale loses money.

No. Profit cannot exceed revenue when costs are zero or higher, so margin is at most 100%. Markup can be much higher.

No. They use different bases. This calculator starts from revenue, and the markup calculator starts from cost.

Embed this calculator on your website

Free to use on any site. Copy the code below and paste it into an HTML block on your page. Please keep the credit link under the calculator.

Show the embed code

Works with WordPress, Wix, Squarespace, Webflow and most site builders that allow HTML. How embedding works.

Estimates, not advice

PureCalculate’s calculators give estimates for planning and education. They aren’t financial, tax or legal advice. Fees and tax rules change, so check the official source before making a decision. Spotted a mistake? Please tell us through the contact page.

Scroll to Top