Margin Calculator
Calculate your gross margin instantly and see how changes in cost or selling price affect your profitability.
Enter Your Numbers
Your Results
How to Use the Margin Calculator
1. Enter your Cost Price — the amount you pay to buy or produce the item.
2. Enter your Selling Price — the price you charge your customer.
3. Enter your Target Margin — the gross margin percentage you would like to achieve.
4. Review your results — the calculator will show your gross profit, current gross margin, the selling price required to reach your target margin, and whether you are above or below your target.
What Is Gross Margin?
Gross margin shows the percentage of your selling price that remains after subtracting the direct cost of the product or service. It helps you understand how much of each sale is available to cover operating expenses and contribute toward profit.
Gross Margin (%) = (Selling Price − Cost Price) ÷ Selling Price × 100
Example: If your cost is 75 and your selling price is 100, your gross profit is 25 and your gross margin is 25%.
Margin vs. Markup: What’s the Difference?
Margin and markup both express gross profit as percentages, but they use different bases. Margin is calculated as a percentage of the selling price, while markup is calculated as a percentage of the cost price.
For example, if an item costs 75 and sells for 100, the gross margin is 25%, while the markup is 33.33%.
Margin (%) = Gross Profit ÷ Selling Price × 100
Markup (%) = Gross Profit ÷ Cost Price × 100
Need to calculate markup instead? Use our Markup Calculator.
Frequently Asked Questions
What is a good gross margin?
A good gross margin depends on your industry, business model, pricing, and operating costs. Rather than relying on one universal percentage, compare your margin with similar businesses and make sure it leaves enough room to cover your operating expenses and generate a sustainable profit.
How do I calculate gross margin?
Subtract your cost price from your selling price to get gross profit. Then divide the gross profit by the selling price and multiply by 100.
For example, if your cost is 75 and your selling price is 100:
Gross Margin = (100 − 75) ÷ 100 × 100 = 25%
How do I calculate the selling price needed for a target margin?
To calculate the selling price required for a target gross margin, divide your cost price by 1 minus the target margin expressed as a decimal.
Required Selling Price = Cost Price ÷ (1 − Target Margin ÷ 100)
For example, if your cost is 75 and you want a 30% gross margin:
Required Selling Price = 75 ÷ (1 − 30 ÷ 100) = 107.14
So you would need to sell the item for approximately 107.14 to achieve a 30% gross margin.
What is the difference between gross margin and markup?
Gross margin measures gross profit as a percentage of the selling price, while markup measures gross profit as a percentage of the cost price.
For example, if an item costs 75 and sells for 100:
Gross Margin = 25%
Markup = 33.33%
Why is margin calculated on selling price instead of cost price?
Gross margin shows how much of your selling price remains after covering the direct cost. That is why the selling price is used as the base of the calculation.
If you want to measure profit relative to the cost price instead, that calculation is called markup.
Can gross margin be negative?
Yes. Gross margin becomes negative when your selling price is lower than your direct cost.
For example, if an item costs 100 and sells for 90, you make a gross loss of 10 and the gross margin is approximately −11.11%.
A negative gross margin means the sale is not covering the direct cost of the product or service.
Make Better Pricing Decisions
Use our free business calculators to test your numbers, compare options, and make better-informed decisions before you act.