Cost Margin Calculator
Use this free calculator to measure gross margin, markup, and profit. You can either calculate margin from your current price, or find the selling price needed to hit a target margin.
Pricing decisions can make or break a business. A product can have healthy sales and still lose money if margin is too thin. This cost margin calculator helps you quickly evaluate whether your price supports your profit goals.
What Is Cost Margin?
Cost margin (often called gross margin) is the percentage of revenue left after covering direct product or service costs. It answers a simple question: after paying for what it takes to deliver one unit, how much of each sales dollar do I keep?
- Gross Profit per Unit = Selling Price − Total Cost per Unit
- Margin % = (Gross Profit ÷ Selling Price) × 100
For example, if your cost is $30 and you sell at $50, your profit is $20 and your margin is 40%.
Margin vs Markup: The Critical Difference
Many people use margin and markup interchangeably, but they are not the same.
- Markup % is based on cost: (Profit ÷ Cost) × 100
- Margin % is based on selling price: (Profit ÷ Price) × 100
Because they use different denominators, the percentages are always different. A 50% markup is not a 50% margin. If your cost is $100 and price is $150, markup is 50% but margin is only 33.33%.
How to Use This Calculator
Mode 1: Cost + Selling Price
Use this mode when you already have a price and want to check your profitability.
- Enter base cost and optional extra costs.
- Enter current selling price.
- Add quantity to see total revenue, total cost, and total profit.
Mode 2: Cost + Target Margin
Use this mode when planning prices for a margin goal.
- Enter base cost plus any additional cost.
- Enter your target margin percentage.
- The calculator returns the minimum required selling price per unit.
Formulas Used in the Tool
These are the formulas used under the hood:
- Total Cost per Unit = Base Cost + Additional Cost
- Profit per Unit = Selling Price − Total Cost per Unit
- Margin % = (Profit per Unit ÷ Selling Price) × 100
- Markup % = (Profit per Unit ÷ Total Cost per Unit) × 100
- Required Selling Price for Target Margin = Total Cost per Unit ÷ (1 − Target Margin)
Practical Tips to Improve Margin
1) Track true cost, not just supplier price
Include shipping, packaging, payment processing fees, and labor where appropriate. Ignoring these “small” costs is one of the fastest ways to overestimate margin.
2) Reprice periodically
Costs change over time. Build a recurring pricing review (monthly or quarterly) so margin doesn’t erode silently.
3) Protect your best sellers
High-volume products should have healthy margins. Even a small margin improvement on top-selling items can produce a major gain in monthly profit.
4) Use bundles strategically
Bundles can raise average order value and improve perceived value, but always verify blended margins before launch.
Common Cost Margin Mistakes
- Confusing markup with margin
- Ignoring variable fees like payment processing percentages
- Relying on old cost data
- Discounting without recalculating post-discount margin
- Setting one universal margin target for every product category
FAQ
What is a good margin?
It depends on your industry, business model, and overhead. A “good” margin is one that consistently covers operating expenses and delivers your desired net profit.
Can margin be negative?
Yes. Negative margin means you are selling below cost, which creates a loss per unit.
Should I calculate margin before or after tax?
Most product-level margin calculations are done before income tax. If sales tax is collected and remitted, it generally should not be treated as revenue.
Use this calculator whenever you launch a new offer, run promotions, renegotiate supplier terms, or review profitability. Better pricing discipline compounds over time.