Margin and markup use the same two numbers, cost and price, but divide by different things. Confusing them is one of the most common pricing mistakes in small businesses, and it always errs in the same direction: prices end up too low.
The formulas
- Gross profit = selling price − cost
- Gross margin = gross profit ÷ selling price × 100
- Markup = gross profit ÷ cost × 100
With a $30.00 cost and a $50.00 price, gross profit is $20.00. Margin is $20.00 ÷ $50.00 = 40%. Markup is $20.00 ÷ $30.00 = 66.67%.
Margin tells you how much of each sales dollar you keep. Markup tells you how much you added on top of cost. Accountants, investors and most financial statements talk in margin. Many retailers and trades price with markup. Both are fine as long as you know which one you are using.
Margin vs markup: the trap
Say you want a 40% margin on a $30.00 item. If you add a 40% markup instead, you charge $42.00, which is only a 28.57% margin. To get a true 40% margin you need $50.00.
The table shows how far apart the two numbers get:
| Markup | Price on a $30.00 cost | Margin |
|---|---|---|
| 25% | $37.50 | 20% |
| 50% | $45.00 | 33.33% |
| 100% | $60.00 | 50% |
| 200% | $90.00 | 66.67% |
A 100% markup (doubling the cost, sometimes called keystone pricing) gives a 50% margin. However high the markup goes, the margin never reaches 100%.
How to price for a target margin
Rearrange the margin formula: price = cost ÷ (1 − target margin).
- Write the target margin as a decimal: 40% becomes 0.40.
- Subtract it from 1: 1 − 0.40 = 0.60.
- Divide the cost by the result: $30.00 ÷ 0.60 = $50.00.
If you know you'll run a discount, divide again by (1 − discount). To keep a 40% margin through a 20% sale, list the item at $62.50.
Why fees and shipping change the picture
Gross margin only subtracts the product cost. Selling online adds more costs on every order: payment processing, marketplace fees, shipping you absorb and packaging. What's left after all per-sale costs is the contribution, and it's the number that actually pays your fixed costs.
Take the same $50.00 item with a 3% + $0.30 payment fee, $4.00 of free shipping and $1.00 of packaging:
| Line | Per sale |
|---|---|
| Selling price | $50.00 |
| Product cost | −$30.00 |
| Gross profit (40% margin) | $20.00 |
| Payment fee (3% + $0.30) | −$1.80 |
| Shipping and packaging | −$5.00 |
| Contribution (26.4% of price) | $13.20 |
The "40% margin" product really keeps 26.4% of each sale. If the business has $2,000.00 a month of fixed costs (rent, software, insurance), it needs 2,000 ÷ $13.20 = 151.5, rounded up to 152 sales a month just to break even.
Discounts hit contribution hardest. Run a 20% sale on the same item and the customer pays $40.00, gross margin falls to 25%, and contribution drops to $3.50 a sale, 73.48% less than before. You'd need 572 sales a month to break even.
Gross, operating and net margin
- Gross margin: revenue minus cost of goods sold, divided by revenue. Use it to compare products.
- Operating margin: also subtracts operating expenses such as rent, wages and marketing. It shows whether the business model works.
- Net margin: subtracts everything, including interest and taxes. It's the bottom line on your profit and loss statement.
For pricing a single product, gross margin and contribution are the most useful. For judging the whole business, look at net margin over a full year.
Common margin mistakes
- Using the wrong cost. Product cost should include everything it takes to get the item ready to sell: materials, inbound freight, import duty and any labor you pay per unit. Leaving out inbound shipping alone can inflate margin by several points.
- Ignoring returns and breakage. If 5% of orders come back unsellable, every sold unit has to carry that loss. Add an allowance to cost, or track it as a separate per-sale expense.
- Pricing from a competitor's price. A competitor with cheaper suppliers or bigger volume can live on a margin that would sink you. Start from your own costs and target margin, then check the market.
- Averaging margins across products. A 60% margin on a slow seller and a 20% margin on your best seller don't average to 40%. Weight each product by its revenue, or simply divide total gross profit by total revenue.
- Forgetting to recheck. Supplier prices, fees and shipping rates change during the year. Rerun your numbers whenever a cost changes, not just when you launch a product.
Do it with a calculator
The Profit Margin Calculator takes cost, price, fees, shipping, packaging and discount, and gives you margin, markup, contribution and break-even units. It can also solve for the price that hits a target margin or markup, and it accepts a CSV if you want to check a whole product list. For a fuller break-even analysis with several fixed costs and a sensitivity table, use the Break-Even Calculator. If you sell on Etsy, the Etsy Fee Calculator itemizes listing, transaction, processing and ad fees for your country.
Freelancers price time rather than products, but the logic is the same: cover your costs and the hours you can't bill. See our business calculators for the freelance rate and invoice tools, and if debt is eating into your profit, compare debt snowball vs avalanche payoff plans.
This guide is general information, not financial or tax advice.