How to Calculate Profit Margin — Formula, Types & Examples
Updated October 2026 · 5 min read
Quick start: Open the free Profit Margin Calculator — enter revenue and costs to get gross and net margin instantly.
Profit margin is the percentage of revenue left after deducting costs. It is the single most important profitability metric for any business — from a solo freelancer to a public company. Understanding the difference between gross, operating and net margin tells you where you are losing money.
The Three Types of Profit Margin
1. Gross Profit Margin
Gross Margin = (Revenue − COGS) ÷ Revenue × 100
COGS (Cost of Goods Sold) includes direct costs: materials, manufacturing, and in some models, direct labour. Gross margin tells you how efficiently you produce your product before overhead.
Benchmarks: Software SaaS ~70–80%, Retail ~25–45%, Restaurants ~60–70% (on food only), Manufacturing ~20–40%.
2. Operating Profit Margin
Operating Margin = Operating Profit ÷ Revenue × 100
Operating profit = gross profit minus operating expenses (salaries, rent, marketing, R&D). It excludes interest and tax. Also called EBIT margin.
3. Net Profit Margin
Net Margin = Net Profit ÷ Revenue × 100
Net profit is what is left after all costs including interest and tax. This is "the bottom line" — what the owners actually keep.
Margin vs Markup — Critical Difference
Margin and markup are often confused because both describe the relationship between cost and price, but from different angles:
- Margin = profit ÷ revenue (calculated on selling price). A $40 product costing $20 has a 50% margin.
- Markup = profit ÷ cost (calculated on cost price). The same product has a 100% markup.
Confusing them is a classic pricing mistake. If you need a 30% margin and accidentally apply 30% markup, you will only achieve a 23% margin. The Profit Margin Calculator calculates both and shows the relationship clearly.
Worked Example
A Shopify store sells a product for $50. The product costs $18 (COGS). Operating expenses (ads, apps, Shopify fee) are $12 per unit.
- Gross profit: $50 − $18 = $32 → Gross margin: 64%
- Operating profit: $32 − $12 = $20 → Operating margin: 40%
- After 20% tax: $20 × 0.80 = $16 → Net margin: 32%
Calculate Your Profit Margin Now
Gross margin, net margin and markup — enter revenue and costs and get all three instantly.
Open Free Profit Margin Calculator →