Skip to main content

Margin Calculator

Free online margin calculator. Calculate gross profit margin, net margin, and markup from cost and revenue. Understand the difference between margin vs markup with formulas and real examples.

Margin Calculator

Enter cost and selling price to calculate profit margin %, profit amount, and markup. Includes margin vs markup comparison and industry benchmarks.

Share this calculator

How to Calculate Profit Margin

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

Example: cost $60, selling price $100 → profit $40 → margin = ($40 ÷ $100) × 100 = 40%. This means 40 cents of every dollar in revenue is retained as gross profit.

Margin vs Markup

Margin and markup both measure profitability but use a different denominator. Margin divides profit by revenue (selling price); markup divides profit by cost. Same profit dollars, different percentages — confusing the two is one of the most common pricing mistakes.

MetricFormulaExample ($60 cost, $100 price)
Margin(Revenue − Cost) ÷ Revenue × 100$40 ÷ $100 = 40%
Markup(Revenue − Cost) ÷ Cost × 100$40 ÷ $60 = 66.67%

A 40% margin ≠ a 40% markup. To convert: Margin = Markup ÷ (1 + Markup). Markup = Margin ÷ (1 − Margin).

Typical Margins by Industry

IndustryTypical Net Margin
Grocery1–3%
Restaurants3–9%
Retail4–13%
Manufacturing5–10%
SaaS / Software70–90%
Consulting15–25%
Real Estate15–20%
Financial Services15–35%

Frequently Asked Questions

What is profit margin and how is it calculated?

Profit margin is the percentage of revenue that remains after costs. Gross profit margin = (Revenue − COGS) ÷ Revenue × 100. For example, if you sell a product for $100 and it costs $60 to produce: gross profit = $40, gross margin = ($40 ÷ $100) × 100 = 40%. This means 40 cents of every dollar earned is retained as gross profit before operating expenses.

What is the difference between gross margin and net margin?

Gross margin only subtracts the cost of goods sold (COGS) — the direct costs of producing a product. Net margin subtracts all costs: COGS, operating expenses, interest, and taxes. A business might have a healthy 60% gross margin but a 5% net margin after paying for rent, salaries, marketing, and overhead. Net margin gives a complete picture of overall profitability.

What is a good profit margin?

Good margins vary widely by industry. Software and pharmaceuticals often see net margins of 20–30%+. Retail typically runs 2–5% net margin. Restaurants average 3–9%. Financial services: 15–25%. Manufacturing: 5–10%. Consulting: 15–30%. The most meaningful benchmark is your industry average and trend over time — a stable 8% margin in retail is strong, while 8% in software may signal problems.

What is the difference between margin and markup?

Margin and markup both describe profitability but from different perspectives. Margin is profit as a percentage of revenue (selling price). Markup is profit as a percentage of cost. If you buy something for $60 and sell for $100: margin = ($40 ÷ $100) × 100 = 40%. Markup = ($40 ÷ $60) × 100 = 66.7%. A 40% margin corresponds to a 66.7% markup. Confusing the two is a common and costly pricing mistake.

How to Calculate Profit Margin

Profit margin measures how much of each dollar of revenue becomes profit. The formula is: Margin = ((Revenue - Cost) / Revenue) × 100. For example, if you sell a product for $100 that costs $60 to make, your margin is (($100 - $60) / $100) × 100 = 40%.

There are three main types of profit margin: Gross margin measures profit after direct costs (materials, labor). Operating margin includes overhead expenses. Net margin is the bottom line after all expenses including taxes.

A healthy margin depends on your industry. Grocery stores operate on thin margins of 2-3%, while software companies often see margins of 70-80%. Understanding your margin helps you price products correctly and identify cost-cutting opportunities.

Margin vs Markup: What's the Difference?

Margin and markup are often confused, but they measure different things. Margin is the percentage of the selling price that is profit. Markup is the percentage added to the cost to get the selling price.

The key insight: markup is always higher than margin for the same profit amount. A 50% margin equals a 100% markup. When setting prices, be clear about which metric you're using.

How to Improve Your Profit Margin

There are two ways to increase margin: raise prices or reduce costs. Raising prices works if you have pricing power — strong brand, unique product, or limited competition. Reducing costs requires operational efficiency.

Common strategies include: negotiating better supplier terms, automating manual processes, reducing waste, optimizing inventory, and focusing on higher-margin products. Even a 1% margin improvement can significantly impact profitability at scale.

Track your margins regularly. If margins are shrinking, investigate whether costs are rising or if you're discounting too heavily. Use this calculator to model different pricing scenarios and find your optimal price point.

Margin vs Markup Comparison

ExampleMarginMarkup
Cost $60, Sell $10040%66.7%
Cost $50, Sell $10050%100%
Cost $75, Sell $10025%33.3%
Cost $80, Sell $10020%25%

Industry Profit Margins

IndustryTypical MarginWhy
Software/SaaS70-85%Low marginal cost per user
Financial Services20-30%Regulated, capital-intensive
Retail3-5%High volume, thin margins
Restaurants3-9%High labor and food costs
Manufacturing5-10%Equipment and material costs

Related calculators

Browse the full calculator library for more tools across finance, education, and health.