Margin Calculator

Calculate profit margin %, or find selling price from cost and a target margin

Profit Margin
Revenue
Cost
Gross Profit
Markup %

Profit Margin Formula

Margin % = ((Revenue − Cost) ÷ Revenue) × 100
Example: Revenue $100, Cost $60 → ((100−60) ÷ 100) × 100 = 40% margin
Selling Price = Cost ÷ (1 − Margin% ÷ 100)
Example: Cost $60, Target Margin 40% → $60 ÷ 0.60 = $100 selling price
💡

Margin vs Markup: Margin uses revenue as the base. Markup uses cost as the base. A 40% margin = 67% markup. Always clarify which one you mean in business discussions.

Industry Profit Margin Benchmarks

IndustryTypical Gross MarginNet Margin
Software / SaaS60–80%15–25%
Consulting50–70%20–35%
E-commerce / Retail25–50%2–5%
Manufacturing20–35%5–10%
Grocery / Food20–30%1–3%
Restaurants60–70%3–9%
Construction15–25%2–5%
Healthcare40–60%5–15%
Automotive10–20%2–6%

Margin vs Markup — Key Difference

Margin

Based on revenue.
((Sell − Cost) ÷ Sell) × 100
Used by accountants and retailers.
Cost $60, Sell $100 → 40% margin

Markup

Based on cost.
((Sell − Cost) ÷ Cost) × 100
Used by wholesalers and manufacturers.
Cost $60, Sell $100 → 67% markup

Margin %Selling Price (Cost $100)ProfitEquivalent Markup
10%$111$1111.1%
20%$125$2525%
25%$133$3333.3%
30%$143$4342.9%
40%$167$6766.7%
50%$200$100100%
60%$250$150150%

Frequently Asked Questions

How do I calculate profit margin?

Formula: ((Revenue − Cost) ÷ Revenue) × 100. If you sell a product for $100 and it costs $60 to make, your margin is ((100−60)÷100)×100 = 40%.

What is a good profit margin?

It depends on the industry. Software: 15–25% net margin is excellent. Retail: 2–5% net is typical. Consulting: 20–35%. For gross margin, anything above 50% gives strong pricing flexibility.

What is the difference between gross margin and net margin?

Gross margin = (Revenue − COGS) ÷ Revenue. Net margin = Net profit ÷ Revenue (after all expenses: rent, salaries, taxes). This calculator computes gross margin.

How do I find the selling price if I want a 40% margin?

Use "Find Selling Price" mode. Formula: Selling Price = Cost ÷ (1 − 0.40). If your cost is $60: $60 ÷ 0.60 = $100. This gives you a 40% margin.

Why is margin always lower than markup for the same product?

Margin uses the larger revenue number as the base, so the ratio looks smaller. Markup uses the smaller cost as the base, giving a larger ratio. Cost $60, Sell $100: margin = 40% but markup = 66.7%.

Why trust ComputeZap?

Formulas verified against official standards
Runs entirely in your browser — no data sent anywhere
Instant results — accurate to 6 decimal places
Free forever — no signup, no ads between results