Profit Margin Explained: How to Calculate It (and Why It Matters)

Learn what profit margin is, how to calculate gross margin vs markup, and what counts as a good margin—with real examples and a free margin calculator.

What Is Profit Margin?

Profit margin is the percentage of revenue left over after subtracting costs. If you sell something for $100 and it costs you $60 to produce, your profit is $40 and your profit margin is 40%. It's one of the most important metrics in business because it tells you how efficiently you're converting sales into actual profit.

The formula is straightforward:

Profit Margin (%) = (Revenue − Cost) ÷ Revenue × 100

Calculate Your Margin Now

Enter your cost and revenue below to see your gross margin, profit amount, and markup percentage instantly:

Margin vs. Markup: The Difference That Trips Everyone Up

This is where most people get confused — and getting it wrong can cost you real money when pricing products.

Margin is calculated as a percentage of revenue. Markup is calculated as a percentage of cost. Same dollar profit, completely different percentages.

MetricFormulaExample ($60 cost, $100 revenue)
ProfitRevenue − Cost$100 − $60 = $40
MarginProfit ÷ Revenue × 100$40 ÷ $100 = 40%
MarkupProfit ÷ Cost × 100$40 ÷ $60 = 66.7%

Notice that a 40% margin is the same as a 66.7% markup. If you tell your supplier you want a 40% margin but they apply a 40% markup, you'll end up with less profit than expected.

Converting Between Margin and Markup

  • Margin → Markup: Markup = Margin ÷ (1 − Margin)
  • Markup → Margin: Margin = Markup ÷ (1 + Markup)

For a 40% margin: Markup = 0.40 ÷ (1 − 0.40) = 0.40 ÷ 0.60 = 66.7%

For a 50% markup: Margin = 0.50 ÷ (1 + 0.50) = 0.50 ÷ 1.50 = 33.3%

Types of Profit Margin

Not all profit margins measure the same thing. Here are the three you'll encounter most often:

Gross Profit Margin

Gross margin only accounts for the direct cost of producing your product or service (called Cost of Goods Sold, or COGS). It ignores overhead like rent, salaries, and marketing.

Gross Margin = (Revenue − COGS) ÷ Revenue × 100

A SaaS company might show an 80% gross margin because server costs are low — but once salaries and marketing are included, net margin drops considerably.

Operating Profit Margin

This subtracts operating expenses (rent, payroll, utilities) on top of COGS. It shows how efficiently the business runs its core operations.

Net Profit Margin

Net margin is the bottom line — what's left after everything, including taxes and interest. This is the number investors care about most.

Net Margin = Net Income ÷ Revenue × 100

What Is a Good Profit Margin?

"Good" depends entirely on the industry. A 5% margin that would be terrible for a software company can be excellent for a grocery store.

IndustryTypical Gross MarginTypical Net Margin
Software / SaaS70–85%10–25%
E-commerce30–50%2–5%
Restaurants60–70% (food cost)3–9%
Retail (apparel)40–60%5–10%
Manufacturing25–40%5–10%
Consulting / Agency50–70%15–30%

The key is to track your margin over time and compare it to competitors in your industry — not against some universal standard.

Real-World Pricing Example

Say you're a small business owner selling handmade candles. Each candle costs $8 in materials and takes $4 of labor to make, so your total cost per unit is $12.

You want to target a 45% profit margin. What should you charge?

Price = Cost ÷ (1 − Margin)

Price = $12 ÷ (1 − 0.45) = $12 ÷ 0.55 = $21.82

Round up to $22. Now let's verify: ($22 − $12) ÷ $22 = $10 ÷ $22 = 45.5% margin. ✓

If instead you'd mistakenly applied a 45% markup: $12 × 1.45 = $17.40 — you'd be charging $4.40 less and your margin would only be 31%, not 45%.

How Discounts Destroy Margin

One of the most dangerous things for profit margin is discounting without understanding the math. If your current margin is 40% and you offer a 10% discount, your new margin is:

New Price = $100 × 0.90 = $90
New Margin = ($90 − $60) ÷ $90 = 33.3%

You cut your price by 10% but your margin dropped by 6.7 percentage points — a 16.75% relative decline in profitability. The lower your starting margin, the more devastating discounts become.

Use our discount calculator to model the impact before running a sale.

Using Margin to Set Sales Targets

Once you know your margin, you can work backwards to set revenue targets. If your business has $50,000 in monthly fixed costs and a 40% gross margin, you need at least:

Break-even Revenue = Fixed Costs ÷ Gross Margin

$50,000 ÷ 0.40 = $125,000/month just to cover fixed costs.

Want to earn $20,000 in profit on top of that?

($50,000 + $20,000) ÷ 0.40 = $175,000/month

This kind of reverse calculation is what makes margin so powerful as a planning tool.

Quick Reference: Margin Formulas

What You WantFormula
Profit amountRevenue − Cost
Margin %(Revenue − Cost) ÷ Revenue × 100
Markup %(Revenue − Cost) ÷ Cost × 100
Selling price from marginCost ÷ (1 − Margin)
Selling price from markupCost × (1 + Markup)
Break-even revenueFixed Costs ÷ Gross Margin

Related Calculators

Margin is just one piece of the pricing puzzle. These tools complement it: