How to use the margin calculator
For a quick gross margin, enter just the cost and selling price and set the other cost fields to zero. For a fuller picture, add the costs that come with each sale and the fixed costs for the same period. The more you include, the closer the profit margin gets to what you'd keep.
Change one thing at a time. If you raise the price and add a discount in the same run, you won't know which one moved the margin.
- Enter the cost per unit and the list selling price per unit.
- Enter how many units the scenario covers.
- Add other per-unit costs like packaging or shipping, and the fee percentage your platform or card processor charges.
- Add fixed costs for the same period, such as rent or software for that month.
- Enter any customer discount and the margin you're aiming for.
- Calculate and read the margins, break-even units and the price needed for your target.
Margin formula and target price formula
Margin always divides by the selling price (revenue). That's what separates it from markup, which divides by cost. The calculator shows three margins because each one includes more costs than the last.
Gross margin takes off only the product cost. Contribution margin also takes off other per-unit costs and selling fees. Profit margin then takes off fixed costs spread over your units. For the price you need, the calculator leaves room for the fee percentage and your target margin, then adjusts for any discount.
Gross margin = (selling price - product cost) / selling price x 100Contribution per unit = net price - product cost - other variable cost - selling feeProfit margin = (contribution per unit x units - fixed costs) / net revenue x 100Price for a target margin (cost only) = cost / (1 - target margin)Break-even units = fixed costs / contribution per unit, rounded up
Worked example: a $100 product across 100 units
A product lists at $100 and costs $60. Each sale also carries $5 of packaging and shipping and a 3% selling fee, which is $3. That leaves $32 of contribution per unit, or $3,200 across 100 units. Take off $500 of fixed costs and profit is $2,700, a 27% profit margin on $10,000 of revenue.
The gross margin on the same product is 40%, so the extra costs eat 13 points. To reach a 30% profit margin at this volume, the price has to rise to about $104.48. With 10% off for customers, the list price would need to be about $116.09 to land on that same net price.
| Measure | Calculation | Result |
|---|---|---|
| Gross margin | ($100 - $60) / $100 | 40% |
| Contribution per unit | $100 - $60 - $5 - $3 | $32 |
| Contribution margin | $32 / $100 | 32% |
| Profit after $500 fixed costs | $32 x 100 - $500 | $2,700 |
| Profit margin | $2,700 / $10,000 | 27% |
| Break-even units | $500 / $32 = 15.625 | 16 units |
| Price for a 30% margin | $70 / (1 - 0.03 - 0.30) | $104.48 |
Gross margin vs profit margin
Gross margin is what a product earns over its own cost. It's the number retailers use to compare items on a shelf. Profit margin, as this page uses it, also covers fees, per-unit extras and fixed costs, so it's always lower when those costs exist.
A healthy gross margin can still hide a loss. If fixed costs are large and volume is low, the profit margin can go negative even while each unit sells above cost. That's why the calculator shows break-even units next to the margins.
Margin and markup at a glance
The same $40 profit on a $60 cost and $100 price is a 40% margin but a 66.67% markup. Mix them up and you'll underprice. If you want a 40% margin and add 40% to cost instead, a $60 item sells for $84, which is only a 28.57% margin.
This table shows the markup that matches common margins, and the selling price for a $45 cost.
| Target margin | Same profit as markup | Price for a $45 cost |
|---|---|---|
| 10% | 11.11% | $50.00 |
| 20% | 25% | $56.25 |
| 25% | 33.33% | $60.00 |
| 30% | 42.86% | $64.29 |
| 40% | 66.67% | $75.00 |
| 50% | 100% | $90.00 |
How discounts squeeze your margin
Take 10% off the $100 product above and the net price drops to $90. The fee falls a little to $2.70, but the $60 cost, the $5 extras and the $500 fixed costs don't move. Profit per unit falls from $27 to $17.30 and the profit margin drops from 27% to about 19.22%.
So a 10% discount cut profit per unit by more than a third. The discount table in the results runs the same check at several discount levels so you can see where the margin runs out.
When to double-check the result
This is a single-product planning model. It doesn't know about returns, refunds, tiered platform fees, income tax, financing or cash timing. Use tax-exclusive prices if you charge VAT or sales tax, since tax collected for the government isn't your revenue.
For accounts or a tax return, your figures should match your books. IRS Publication 334 explains how gross profit and cost of goods sold work for small businesses in the US.
Sources
These references explain gross profit, contribution margin and break-even analysis as used on this page.