Margin Calculator

Find profit, gross margin, and markup from cost and revenue — or the price you need for a target margin.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: July 2026

Gross margin

20.00%

Profit

10.00

Markup

25.00%

Results are estimates for general information only, not financial advice. See our Disclaimer.

What is profit margin?

Gross profit margin is the share of your selling price that is left over after you subtract what the item cost you. If a product costs 40 to make and you sell it for 50, your profit is 10 and your margin is 20% — because 10 is 20% of the 50 selling price. Margin is always measured against the selling price (revenue). That single detail is what separates margin from markup, which is measured against cost, and it is why the same money profit always looks like a smaller percentage as a margin than as a markup.

How margin is calculated

Start from the money profit, then divide by revenue:

  • Profit = Revenue − Cost
  • Gross margin % = (Profit ÷ Revenue) × 100

To work the other way — you know your cost and the margin you want — rearrange the formula to find the price you need to charge:

  • Revenue = Cost ÷ (1 − Margin% ÷ 100)

Worked example

Say an item costs you 40 and you sell it for 50. Profit is 50 − 40 = 10, so the gross margin is 10 ÷ 50 = 0.20, or 20.00%. The same profit expressed against cost is 10 ÷ 40 = 25.00% markup. If instead you knew the cost was 40 and wanted a 30% margin, you would need to charge 40 ÷ (1 − 0.30) = 57.14, which locks in a 17.14 profit on every sale.

Related: flip it around with our Markup Calculator, measure returns with the ROI Calculator, take money off a price with the Discount Calculator, or crunch general ratios in the Percentage Calculator.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Pick a mode: enter cost and revenue to see the resulting profit and margin, or enter cost and a target margin to see the price you need to charge.

Margin is measured against the selling price, while markup is measured against the cost.

Frequently asked questions

What is a good profit margin?+

There is no single right answer — a healthy margin depends on the industry, your costs, and competition. Grocery and hardware retail often run on thin single-digit margins, while software and jewellery can run very high. This tool doesn't judge; it just gives you the exact number so you can compare against your own targets.

What is the difference between margin and markup?+

Margin is profit as a percentage of the selling price; markup is the same profit as a percentage of the cost. A 25% markup equals a 20% margin on the very same sale.

Is margin calculated on cost or on the selling price?+

On the selling price (revenue). Dividing profit by revenue is what makes it a margin rather than a markup.

Can a profit margin be more than 100%?+

No. Because profit can never be larger than the revenue it comes from, gross margin always stays below 100%. Markup, on the other hand, can exceed 100%.

How do I find the price for a 30% margin?+

Divide your cost by (1 − 0.30). A cost of 40 needs a price of 40 ÷ 0.70 = 57.14 to reach a 30% margin. Use the "target margin" mode above to do this instantly.

What is the difference between gross margin and net margin?+

Gross margin looks only at the direct cost of the product. Net margin subtracts every other expense too — rent, wages, tax, shipping — so it is always the smaller of the two.

How do I convert a markup into a margin?+

Margin = Markup ÷ (1 + Markup). A 25% markup becomes 0.25 ÷ 1.25 = 0.20, i.e. a 20% margin.

Does this calculator use any tax rates or currency?+

No. It works in whatever currency you type and never applies a tax rate, so the result is the same everywhere and the tool never goes out of date.