Home / Finance / Margin Calculator

Margin Calculator

Calculate gross profit margin, net profit margin, markup %, and selling price — instantly and accurately.

Set Margin %:
$0.00
Cost
+
$0.00
Gross Profit
=
$0.00
Revenue
0.00%
Gross Margin

Key Formulas

Gross Margin
(Revenue − Cost) ÷ Revenue × 100

Measures what % of revenue remains after paying for the goods/services sold. E.g. Cost $60, Revenue $100 → 40% margin.

Markup %
(Revenue − Cost) ÷ Cost × 100

Measures profit as a % of cost — always higher than margin. E.g. Cost $60, Revenue $100 → 66.67% markup.

Net Profit Margin
Net Profit ÷ Revenue × 100

The true bottom-line after all costs (COGS + operating expenses + tax). Enter a tax rate in Margin Mode to calculate this.

Selling Price from Margin
Cost ÷ (1 − Margin% ÷ 100)

Find the price to charge given a target margin. E.g. Cost $60, target 40% → Price = 60 ÷ 0.60 = $100.

Pro Tip — Convert Markup ↔ Margin
Margin = Markup ÷ (1 + Markup)
Markup = Margin ÷ (1 − Margin)

Example: 25% markup → 25 ÷ 125 = 20% margin.   40% margin → 40 ÷ 60 = 66.7% markup.

Complete Guide to Profit Margin Calculation

How This Calculator Works

This margin calculator supports three modes — choose the one that matches what you already know:

  1. Margin Mode (default): Enter your Cost and Revenue (selling price). The calculator instantly shows your Gross Profit, Gross Margin %, and Markup %. Optionally enter a Tax Rate % to also see Net Profit and Net Margin. Use the quick-preset buttons (10%–50%) to auto-fill a revenue target for a given margin.
  2. Markup Mode: Enter your Cost and the Markup % you want to apply. The calculator derives the Selling Price and the resulting Gross Margin %. Useful when pricing from cost-up (e.g. wholesale → retail).
  3. Revenue Mode: Enter a Target Gross Margin % and your expected Revenue. The calculator works backwards to tell you the maximum Cost you can incur while hitting that margin, plus the Markup % implied.

After calculating, a Margin at Different Price Points table shows how your margin and profit change if you price ±10%–30% above or below your entered price — great for sensitivity analysis and pricing decisions.

What is Profit Margin?

Profit margin is the percentage of revenue that remains as profit after subtracting costs. It is one of the most important metrics in business — higher margins mean more profit per dollar of sales.

Margin vs. Markup — Key Differences

These two terms are often confused but are fundamentally different:

  • Margin is profit as a % of revenue (selling price).
  • Markup is profit as a % of cost.
  • A 50% markup does NOT equal a 50% margin. At 50% markup (cost $10, price $15), the margin is only 33.3%.

What is a Good Profit Margin?

Industry benchmarks vary widely:

Industry Typical Gross Margin Typical Net Margin
Software / SaaS 70–90% 10–30%
Retail / E-commerce 25–50% 2–5%
Restaurants 25–35% 3–9%
Manufacturing 20–40% 5–10%
Consulting / Services 50–75% 15–25%
Supermarkets 20–30% 1–3%
Pharmaceuticals 60–80% 15–25%

How to Convert Markup to Margin

Margin = Markup ÷ (1 + Markup)
Example: 25% markup → Margin = 0.25 ÷ 1.25 = 20%

Frequently Asked Questions

What is gross margin vs. net margin? +

Gross margin deducts only the cost of goods sold (COGS) from revenue. Net margin deducts all costs — COGS, operating expenses, interest, and taxes. Net margin is the true "bottom line" profitability.

How do I find selling price from cost and target margin? +

Use the Revenue Mode above, or the formula: Price = Cost ÷ (1 − Target Margin%/100).
Example: Cost $60, target 40% margin → Price = 60 ÷ 0.60 = $100.

Is 30% profit margin good? +

For most product businesses, 30% gross margin is moderate. For services and software it's low, but for grocery retail it's exceptional. Context matters — compare to your industry average.

How do I calculate net profit margin? +

Net Margin % = Net Profit ÷ Revenue × 100.
Net Profit = Revenue − COGS − Operating Expenses − Taxes.
Enter your tax rate in the Margin Mode to see net margin calculated automatically.