Profit Margin Calculator

Calculate gross profit, profit margin and markup percentage from cost and selling price.

  • Reviewed October 2026
  • Formula and worked example below
  • Free, no sign-up, runs in your browser
$
$
Enter your numbers to see the result.

Margin and markup are different

Both measure profit as a percentage, but against different bases. Margin divides profit by the selling price; markup divides profit by the cost. Mixing them up is one of the most common pricing mistakes.

Margin = (Price − Cost) ÷ Price × 100 Markup = (Price − Cost) ÷ Cost × 100

An item costs $60 and sells for $100. Profit is $40. Margin = 40 ÷ 100 = 40%. Markup = 40 ÷ 60 = 66.7%.

Converting between margin and markup

MarkupMargin
25%20%
50%33.3%
75%42.9%
100%50%
150%60%
200%66.7%

To price for a target margin, divide cost by (1 − margin). For a 40% margin on a $60 cost: 60 ÷ 0.6 = $100.

Typical margins by industry

Gross margins vary widely: grocery stores often run on 20–30%, restaurants around 60–70% on food cost alone, and software companies 70–90%. Net margin, after all overheads, is much lower, commonly 2–10% for retailers.

Frequently asked questions

What is a good profit margin?

It depends on the industry. Many small retailers aim for 25–50% gross margin; service and software businesses usually have higher margins.

How do I price a product for a 30% margin?

Divide the cost by 0.70. A product costing $35 should sell for $50 to make a 30% gross margin.

Is gross margin the same as net margin?

No. Gross margin subtracts only the direct cost of goods. Net margin also subtracts operating expenses, interest and taxes.

Add this calculator to your website

Free to use on blogs, school sites and company intranets. Copy this code into your page:

Last reviewed Oct 20, 2026. Results are estimates; check important decisions with a qualified professional.