How margin is calculated
Margin tells you how much of every sale you keep after paying for the product itself.
Margin % = (Selling price − Cost) ÷ Selling price × 100To work backward from a margin you want to a price, divide the cost by one minus the margin:
Selling price = Cost ÷ (1 − Margin % ÷ 100)Example
You buy a lamp for $60 and sell it for $100. Profit is $40, so the margin is $40 ÷ $100 = 40%. The markup on the same lamp is $40 ÷ $60 = 66.67%.
Convert markup to margin (and margin to markup)
Markup is profit as a share of cost; margin is profit as a share of the selling price. The same product always has a higher markup than margin, so the two numbers are never interchangeable. Enter one to get the other:
Margin % = Markup % ÷ (100 + Markup %) × 100Markup % = Margin % ÷ (100 − Margin %) × 100A 50% markup is 50 ÷ 150 = 33.33% margin. A 40% margin is 40 ÷ 60 = 66.67% markup. Margin can never reach 100%, but markup has no upper limit.
Margin to markup chart
| Margin | Equivalent markup |
|---|---|
| 10% | 11.11% |
| 15% | 17.65% |
| 20% | 25% |
| 25% | 33.33% |
| 30% | 42.86% |
| 35% | 53.85% |
| 40% | 66.67% |
| 45% | 81.82% |
| 50% | 100% |
| 60% | 150% |
| 70% | 233.33% |
| 75% | 300% |
| 80% | 400% |
Markup to margin chart
| Markup | Equivalent margin |
|---|---|
| 10% | 9.09% |
| 20% | 16.67% |
| 25% | 20% |
| 30% | 23.08% |
| 40% | 28.57% |
| 50% | 33.33% |
| 60% | 37.5% |
| 75% | 42.86% |
| 100% | 50% |
| 150% | 60% |
| 200% | 66.67% |
| 300% | 75% |
Setting prices from a markup? The markup calculator works from cost. For a longer explanation with examples, read markup vs margin.
This calculator shows gross margin on a single product. To include rent, salaries, and other overheads, use the profit margin calculator.
How to use the margin calculator
- Choose what you want to find. Pick "Margin from cost and price" to check a price you already charge, or "Selling price from a target margin" to set a new one.
- Enter your full unit cost. Use the landed cost of one unit, not just the purchase price. The next section explains what to include.
- Enter the selling price or the margin you want. Results update as you type. Use "Copy link to results" to save the numbers or send them to someone.
Example: pricing for a target margin
A new product costs $35 per unit landed and you want a 45% margin. The price is $35 ÷ (1 − 0.45) = $35 ÷ 0.55 = $63.64. That leaves $28.64 of profit per unit, a markup of 81.82% on cost. In practice you might round to $64 or $64.99 and check the margin again.
What to include in cost
Margin is only as accurate as the cost you enter. For a physical product, use the landed cost: everything you pay, per unit, to get it into a customer's hands.
| Cost item | Example per unit |
|---|---|
| Purchase price or materials | $18.00 |
| Inbound freight and import duties | $1.50 |
| Packaging and inserts | $0.75 |
| Marketplace or payment fees | $3.25 |
| Landed cost | $23.50 |
Rent, salaries, software, and advertising usually stay out of gross margin because they don't change with each unit sold. They are operating expenses, which the profit margin calculator handles. If you sell on a marketplace, the eBay and Etsy fee calculators show the per-sale fee to add.
Why pricing with markup undershoots your margin
A common mistake is deciding you need a 40% margin and then adding 40% to cost. Markup is measured against cost, which is the smaller number, so the price comes out too low. Here is what happens to a product that costs $50:
| Method | Price | Profit | Actual margin |
|---|---|---|---|
| Add 40% to cost (40% markup) | $70.00 | $20.00 | 28.57% |
| Price for a 40% margin | $83.33 | $33.33 | 40.00% |
Across 1,000 units, that difference is about $13,333 of profit. Use the "Selling price from a target margin" option so the math runs in the right direction.
Common margin mistakes
- Including sales tax in the price. Sales tax isn't revenue, because you pass it on to the state. Use the pre-tax price. If you only have a tax-included total, the reverse sales tax calculator splits it out.
- Averaging margins across products. A 60% margin product and a 20% margin product only average to 40% if they bring in equal revenue. For a true blended margin, add up total profit and divide by total revenue.
- Ignoring returns and breakage. If 1 in 20 units comes back unsellable, the units you do sell have to carry that loss. Add a little over 5% to your unit cost to account for it.
- Treating gross margin as profit. Gross margin still has to pay for overheads. A healthy 40% gross margin can turn into a 5% net margin once rent, payroll, and ads are paid.
Frequently asked questions
What is a good profit margin?
It depends on the industry. Grocery and fuel retailers often run gross margins under 25%, while software, cosmetics, and digital products can exceed 70%. Compare yourself with businesses that have a similar cost structure.
Is margin the same as markup?
No. Margin is profit divided by the selling price; markup is profit divided by cost. A product that costs $60 and sells for $100 has a 40% margin but a 66.67% markup.
How do I convert markup to margin?
Divide the markup by 100 plus the markup, then multiply by 100. A 50% markup is 50 ÷ 150 = 33.33% margin. To go the other way, divide the margin by 100 minus the margin: a 40% margin is 40 ÷ 60 = 66.67% markup.
Can margin be more than 100%?
No. Because margin is measured against the selling price, the most you can keep is the whole price, which is a 100% margin when cost is zero. Markup has no upper limit.
How do I price a product for a 30% margin?
Divide the cost by (1 − 0.30). A $70 cost becomes a $100 price. Choose "Selling price from a target margin" above and enter 30 as the target margin.
How do I calculate margin in Excel or Google Sheets?
With cost in A2 and selling price in B2, use =(B2-A2)/B2 and format the cell as a percentage. To get a price from a target margin in C2 (entered as a percentage), use =A2/(1-C2).
How does a discount change my margin?
A discount lowers the price but not the cost, so margin falls faster than the discount. An item that costs $60 and sells for $100 has a 40% margin. At 20% off it sells for $80, profit drops to $20, and the margin falls to 25%.
Should shipping and platform fees count as cost?
Yes, if you pay them on every unit. Use the landed cost of one unit: purchase price or materials, inbound freight, packaging, and per-sale marketplace or payment fees. Leaving them out makes your margin look better than it is.