Gross margin is the percentage of every sale that is left after paying for the goods or services sold. It is the first thing to check when you price a product, because it has to be large enough to pay for rent, wages, marketing and everything else, and still leave a profit. This margin calculator works in three directions. Enter the price and cost to find the margin, enter the cost and a target margin to find the price you must charge, or enter the price and a margin to find the most you can afford to pay for the product. It also shows the equivalent markup, which is easy to confuse with margin, and totals for any number of units.
How to use the margin calculator
- Choose what you know: price and cost, cost and margin, or price and margin.
- Enter the values. Fields you do not need are hidden.
- Enter the number of units to see total revenue and profit.
- Read the price, cost, profit, margin and markup.
Margin formulas
Margin = (price − cost) ÷ price
Price from cost and margin = cost ÷ (1 − margin)
Cost from price and margin = price × (1 − margin)
Markup = (price − cost) ÷ cost = margin ÷ (1 − margin)
Margin cannot reach 100% unless the cost is zero, while markup has no upper limit. That difference is why a 100% markup (doubling the cost) is only a 50% margin.
Worked examples
- Find the margin: price $100, cost $60. Profit $40; margin = 40 ÷ 100 = 40%; markup = 40 ÷ 60 = 66.67%.
- Find the price: cost $45 and a target margin of 25%: 45 ÷ (1 − 0.25) = $60.00. On 200 units that is revenue of $12,000 and gross profit of $3,000.
- Find the maximum cost: a product that sells for $80 with a required 35% margin can cost at most 80 × 0.65 = $52.00.
- A real-world price: selling at $24.99 with a $11.50 cost gives a margin of 53.98%; 120 units earn $1,618.80 of gross profit.
Price needed for a target margin on a $50 cost
| Target margin | Selling price | Profit per unit | Equivalent markup |
|---|---|---|---|
| 10% | $55.56 | $5.56 | 11.11% |
| 20% | $62.50 | $12.50 | 25.00% |
| 25% | $66.67 | $16.67 | 33.33% |
| 30% | $71.43 | $21.43 | 42.86% |
| 40% | $83.33 | $33.33 | 66.67% |
| 50% | $100.00 | $50.00 | 100.00% |
| 60% | $125.00 | $75.00 | 150.00% |
Pricing with margins
- Start from the margin you need, not from the cost plus a round percentage. Cost × 1.25 gives a 20% margin, not 25%.
- Cover your overhead. Gross margin must pay for operating expenses before it becomes profit.
- Remember discounts. A 10% discount on a product with a 25% margin takes away more than a third of the profit.
- Include all direct costs, such as shipping, packaging and payment fees, in the cost.
- Review regularly. Supplier prices change, and so should your price if you want to keep your margin.
Related tools
To work with percent on cost instead, use the Markup Calculator. The Commission Calculator shows how much goes to sales staff, the ROI Calculator measures the return on an investment, and the Percent Increase Calculator and Percent Decrease Calculator help when changing prices.
Frequently asked questions
What is gross margin?
Gross margin is the share of the selling price that is left after the cost of goods: margin = (price − cost) ÷ price. A product that sells for $100 and costs $60 has a 40% gross margin.
What is the difference between margin and markup?
Margin is profit as a percent of the selling price; markup is profit as a percent of the cost. The same $40 profit is a 40% margin but a 66.67% markup on a $60 cost. A 50% markup is only a 33.3% margin.
How do I set a price to reach a target margin?
Divide the cost by (1 − margin). For a cost of $45 and a margin of 25%, the price is 45 ÷ 0.75 = $60.00. Adding 25% to the cost would give $56.25, which is only a 20% margin.
Is gross margin the same as net margin?
No. Gross margin only subtracts the direct cost of the goods. Net margin also subtracts operating expenses, interest and tax, so it is always lower. Make sure your price covers overhead as well as the gross margin.
What is a good margin?
It depends heavily on the industry: grocery retailers often work on low margins and high volume, while software and luxury goods have high ones. Compare with similar businesses and check that the margin covers your overhead.