MarginMath

Home / Profit Margin Calculator

Profit Margin Calculator

Work out your gross profit margin from cost and revenue — or enter a target margin to find the selling price you need.

Updated Rate this calculator

Fill in any two fields. The third (dashed) field is solved for you.

$
%
$
Selling more than one unit?
Your numbersUpdates as you type
Gross profit—
Profit margin—
Markup—
Total profit—

Quick answer

Profit margin is profit as a percentage of the selling price: Margin % = (Price − Cost) ÷ Price × 100. To hit a target margin, use Price = Cost ÷ (1 − Margin ÷ 100). A $30 cost at a 40% margin needs a $50 price.

How to calculate profit margin

  1. Subtract the cost of the item from its selling price to get gross profit.
  2. Divide gross profit by the selling price.
  3. Multiply by 100 to express it as a percentage.

Gross profit = Revenue − Cost of goods sold

Profit margin % = Gross profit ÷ Revenue × 100

Price for a target margin = Cost ÷ (1 − Target margin ÷ 100)

Worked example

A product costs $30 and you want a 40% margin. Price = 30 ÷ (1 − 0.40) = 30 ÷ 0.60 = $50. Profit is $20, and 20 ÷ 50 = 40%. Note that simply adding 40% to cost ($42) would only give a 28.57% margin — a frequent and expensive mistake.

Gross, operating and net profit margin

Margin typeWhat it subtracts from revenueUse it to judge
Gross marginCost of goods sold onlyWhether each product is priced well
Operating marginCOGS + operating expenses (rent, wages, software, ads)How efficiently the business runs
Net marginEverything, including interest and taxesWhat the owner actually keeps

This calculator returns gross margin per unit. To approximate net margin for a single product, enter a cost that already includes per-unit fees, shipping and advertising.

Margin to selling price chart

Target marginRequired markupPrice on a $100 cost
10%11.11%$111.11
20%25.00%$125.00
25%33.33%$133.33
30%42.86%$142.86
40%66.67%$166.67
50%100.00%$200.00
60%150.00%$250.00
70%233.33%$333.33
80%400.00%$500.00

What is a good profit margin?

A "good" margin depends on the industry and the costs that come after the sale. Low-cost, high-volume sellers can run on thin gross margins, while businesses with heavy fees, returns or ad spend need much wider ones. E-commerce sellers on marketplaces such as Amazon and Etsy should calculate margin after platform fees — use the Etsy fee calculator for that — and check that what is left still covers advertising and overheads.

Disclosure: the spreadsheet and the consulting service above are offered by MarginMath's author, Jansher Khan.

Reviews

No reviews yet. If this calculator helped you, tell other sellers what you used it for.

Rate this calculator

Your rating
Reviews are checked before they appear, usually within a few days.

Frequently asked questions

What is the formula for profit margin?

Profit margin = (Revenue − Cost) ÷ Revenue × 100. If you sell an item for $50 that cost $30, the margin is 20 ÷ 50 × 100 = 40%.

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

Divide the cost by 0.70 (that is, 1 − 0.30). A $35 cost needs a price of $50 for a 30% margin.

What is the difference between margin and markup?

Margin divides profit by the selling price; markup divides profit by the cost. The same $20 profit on a $30 cost and $50 price is a 40% margin but a 66.67% markup.

Can profit margin be over 100%?

No. Because profit can never exceed the selling price, margin is always below 100%. Markup, however, can be any size.

What is a negative profit margin?

A negative margin means the selling price is below cost, so each sale loses money. Raise the price, lower costs, or reconsider the product.

Is gross margin the same as net margin?

No. Gross margin only subtracts the cost of goods. Net margin also subtracts operating expenses, interest and taxes, so it is always lower.

About the author

Jansher Khan
Jansher Khan · LinkedIn

Amazon PPC & e-commerce specialist. Jansher prices products, reads marketplace fee reports and manages Amazon advertising for online sellers. These calculators are the checks he uses in that work. Last reviewed November 10, 2026.

More free calculators

More free calculators

Built for online sellers and US workers. No sign-up, nothing leaves your browser.

$0

Free, no sign-upEvery calculator is free to use, with no account.

🔒

Private by designYour numbers are worked out in your browser and never sent to us.

✓

Sources you can checkRates come from official fee pages and IRS guidance, linked on each page.

↻

Kept up to dateFees and tax figures checked November 2026.