Gross margin calculator
Gross margin is the share of the selling price left after the cost of the goods: (price − cost) ÷ price × 100%. A price of 1,000 and a cost of 600 leave a gross profit of 400, a 40% gross margin.
Formula
- Gross profit = price − cost
- Gross margin = gross profit ÷ price × 100%
- Markup = gross profit ÷ cost × 100%
Calculator · runs only in your browser
Enter your price and cost
Reading
Gross margin
40.0%
- Gross profit per item
- 400
- Markup
- 66.7%
- Break-even ROAS on margin alone
- 2.50
Every 1,000 sold leaves 400, before shipping, payment fees and returns.
What you type is calculated in your browser and is never sent or stored. The site-wide analytics are described in the privacy policy.
Worked example
A product sells for 1,000 before sales tax and costs 600:
| Item | Working | Result |
|---|---|---|
| Gross profit | 1,000 − 600 | 400 |
| Gross margin | 400 ÷ 1,000 | 40% |
| Markup | 400 ÷ 600 | 66.7% |
| Break-even ROAS | 1 ÷ 40% | 2.50 |
The same product has a 40% margin and a 66.7% markup. Both are correct; the denominator differs. Margin divides by the price, markup by the cost.
Using gross margin to decide on ad spend
Gross margin caps what advertising can cost. The product above keeps 400 of every 1,000 sold, so once ad spend passes 40% of revenue it loses money. As a ROAS, that is 1 ÷ 40% = 2.50.
| Gross margin | Break-even ROAS on margin alone |
|---|---|
| 60% | 1.67 |
| 50% | 2.00 |
| 40% | 2.50 |
| 30% | 3.33 |
| 20% | 5.00 |
The table leaves out shipping, payment fees and returns, so the real threshold is higher still. In practice:
- Before raising a budget, check that reported ROAS clears the threshold once shipping, fees and returns are in. The break-even ROAS calculator adds them.
- Below 30% margin the threshold is above 3.33. Changing price, cost or the offer (add-ons, bundles) usually moves more than changing the ads.
- Selling several products from one account, use the weighted average margin, not the margin of your best product.
Common mistakes
- Using a tax-inclusive price. Sales tax is not revenue. In Taiwan the general business tax is 5%, so 1,050 including tax is 1,000 of revenue. A tax-inclusive denominator overstates the margin.
- Treating markup as margin. A cost of 600 marked up 50% sells for 900: a 33.3% margin, not 50%. Using the markup for an ad threshold makes you think you can afford more.
- Counting only the purchase price. Cost here is the direct cost of the item sold: purchase or manufacture, packaging, inbound freight. Per-order shipping and payment fees come off in the break-even ROAS step.
- Treating gross margin as the ad budget. Gross profit has to pay for ads, shipping, salaries and rent. Spend all of it on ads and there is no profit. Decide what to keep in the max CPA calculator.
FAQ
How do you calculate gross margin?
(Price − cost) ÷ price × 100%, with both figures before sales tax. A price of 1,000 and a cost of 600 give a 40% gross margin.
What is the difference between margin and markup?
The denominator. Margin divides gross profit by the price, markup divides it by the cost. Selling for 1,000 something that costs 600 is a 40% margin and a 66.7% markup. "Cost plus 30%" is a markup.
What gross margin do I need to advertise?
There is no single number; it depends on your shipping, fees and returns. Start with 1 ÷ margin for the threshold on margin alone, then add the other costs in the break-even ROAS calculator. If that threshold is above the ROAS your ads deliver now, fix price or cost first.
Sources
We read each source below on 2026-10-23 and built the formulas from them; the worked examples are our own and can be rerun in the calculator above.
- AccountingTools: Gross margin · Gross margin = (net sales − cost of goods sold) ÷ net sales; use net, not gross, sales · checked 2026-10-23
- BDC (Business Development Bank of Canada): Gross margin · Definition and use of gross margin · checked 2026-10-23
- 財政部稅務入口網: 營業稅課稅方式 · Taiwan general business tax rate of 5% (in Chinese) · checked 2026-10-23
Other calculators
Work out your stop, target and scale lines from your own numbers.
Intermediate, chapter 5 puts shipping, free-shipping offers, payment fees, returns and payment success into cost, and builds the cost sheet in Google Sheets. Read online, one-time purchase; the opening chapters of each level are free.