How to use the profit margin calculator
Enter the selling price per unit, or total revenue for a period.
Enter the cost of goods sold for the same unit or period.
Add other costs, such as ad spend, fees, shipping and an overhead share for the same unit or period, to see net margin.
Set a target gross margin to see the price that would achieve it.
The profit margin formula
- Gross profit=price − cost of goods
- Gross margin=gross profit ÷ price
- Markup=gross profit ÷ cost of goods
- Net margin=(gross profit − other costs) ÷ price
- Price for target margin=cost of goods ÷ (1 − target margin)
- Cost of goods
- Direct cost of the product: manufacturing or wholesale price, plus inbound freight and duties if you track them per unit.
- Other costs
- Everything else needed to make the sale: advertising, payment fees, fulfilment, software and a share of overheads.
- Target margin
- The gross margin you want, as a decimal (70% = 0.70).
Margin is measured against price and markup against cost. A 100% markup is a 50% margin.
Worked example
An 80 product
- Price 80, cost of goods 28, other costs per unit 30.
- Gross profit = 52, gross margin = 52 ÷ 80 = 65%, markup = 52 ÷ 28 = 185.7%.
- Net profit = 52 − 30 = 22, net margin = 22 ÷ 80 = 27.5%.
- For a 70% gross margin, price = 28 ÷ 0.30 = 93.33.
Margin versus markup
The two are easy to confuse and the confusion is expensive. Adding 50% to your cost does not give you a 50% margin; it gives you 33%. Pricing on markup while budgeting ads on an assumed margin is a common way to overspend.
| Markup on cost | Gross margin |
|---|---|
| 25% | 20% |
| 50% | 33.3% |
| 100% | 50% |
| 150% | 60% |
| 200% | 66.7% |
| 300% | 75% |
How much margin paid social needs
Brands that grow mainly through paid social need room for acquisition costs. A product with a 70% gross margin can absorb the ad costs of cold traffic far more easily than one at 25%, which needs a 4x ROAS before any other costs are covered.
If your margin is thin, the levers are higher prices, bundles that raise order value, cheaper fulfilment, or relying on repeat purchases to recover acquisition costs over time.
Gross, contribution and net margin
Gross margin covers product cost only. Contribution margin also deducts the variable costs of each order, such as shipping, payment fees and packaging, and is the right basis for break-even ROAS. Net margin deducts everything, including ads and overheads, and tells you whether the business makes money.
- Use contribution margin to set ad targets.
- Use net margin to judge the business.
- Recalculate whenever supplier prices, shipping rates or discounting change.
Questions and answers
How do I calculate profit margin?+
Subtract costs from price to get profit, then divide profit by price. A product that sells for 50 and costs 20 has a gross profit of 30 and a gross margin of 60%.
What is the difference between margin and markup?+
Margin is profit as a share of the selling price; markup is profit as a share of cost. The same 30 profit on a 50 product is a 60% margin and a 150% markup.
What is a good profit margin for an ecommerce store?+
It depends on the model. Gross margins well above 50% leave room for paid acquisition, while resellers with thin margins rely on volume, repeat purchases or cheaper traffic. Net margins vary widely and there is no single standard, so track your own trend over time.
How do I price a product for a target margin?+
Divide cost by (1 − target margin). For a cost of 40 and a 60% target margin: 40 ÷ 0.4 = 100.
Should ad spend be included in gross margin?+
No. Ad spend belongs below gross margin, in contribution or net margin. Keeping it separate shows how much room your product economics give your ads.
Can a margin be over 100%?+
Margin cannot exceed 100% because profit cannot exceed price. Markup can, and often does.