Written by Erum Nazeer Built by Muhammad Ayaz Akhtar Updated

Finance calculator

Profit Margin Calculator

Enter revenue, cost of goods sold, and any operating or other expenses to see gross profit margin, operating margin, and net profit margin in one place. The target margin field works backwards, enter the margin you want and get the selling price needed to hit it. All three margins use the same revenue figure as the base, which is what makes them comparable.

Gross profit margin = (revenue − COGS) ÷ revenue × 100

Revenue and costs

Enter your numbers

Formula: Profit margin = (revenue − costs) ÷ revenue × 100

Revenue breakdown

Enter revenue to see the margin breakdown.
COGS Net Profit
Gross margin
40%
Operating margin
25%
Net margin
20%

On This Page

One Revenue, Three Margins

A profit margin is the share of revenue you keep after certain costs. A 30% margin means $0.30 of every $1 of sales. Which costs you subtract decides which margin you get, and all three divide by the same revenue, which is what makes them comparable:

MarginSubtract from revenueWhat it tells you
GrossCost of goods soldWhether the product itself makes money
Operating (EBIT)COGS + operating expensesHow efficiently the business runs, before financing
NetEverything, including interest and taxWhat the business actually keeps
Revenue decomposition bar for one hundred thousand dollars showing COGS sixty percent, operating expenses fifteen percent, interest and tax five percent, and net profit twenty percent, with brackets labeling gross margin forty percent, operating margin twenty-five percent, and net margin twenty percent
Revenue decomposition bar showing COGS 60%, operating expenses 15%, interest and tax 5%, and net profit 20%, with brackets labeling gross margin 40%, operating margin 25%, and net margin 20%

Margin on a single sale, measured against its cost or its price, is covered by the Profit Percentage Calculator. How well invested capital pays back over time is a job for the ROI Calculator.

Walking Down the Income Statement

Using $100,000 of revenue:

  1. − $60,000 COGS = $40,000 gross profit, a 40% gross margin
  2. − $15,000 operating expenses = $25,000, a 25% operating margin
  3. − $5,000 interest and tax = $20,000, a 20% net margin

The 20-point gap between gross and net shows how much overhead and financing the business carries. COGS should include every cost of each sale: materials, direct labor, per-unit shipping, and payment and platform fees such as Stripe, Shopify or Amazon referral fees. Leaving those out, or measuring against revenue before refunds and discounts, makes the margin look better than it is. Monthly net margins also swing with the seasons, so judge a full year.

Pricing Backward from a Margin

Selling price = COGS ÷ (1 − target margin)

A $60 cost at a 40% target needs $60 ÷ 0.60 = $100. A $55 product at 45% needs $100 too. Enter cost and a target in the calculator for the price and the most you can afford to pay. The table shows common targets:

Target gross marginMultiply cost byMost COGS per $100 of salesSame as a markup of
10%1.111$9011.1%
20%1.25$8025.0%
25%1.333$7533.3%
30%1.429$7042.9%
40%1.667$6066.7%
50%2.00$50100%
60%2.50$40150%
70%3.333$30233.3%

Margin Is Not Markup

Margin divides profit by the selling price and markup divides it by cost, so the same $40 profit on a $60 item is a 40% margin and a 66.7% markup. Convert with markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup). Markup vs margin: why a 50% markup isn't a 50% profit margin covers what the mix-up costs, and the Markup Calculator prices up from cost.

Industry Benchmarks

Compare only against your own sector. Typical ranges:

Four Businesses, Checked

In Excel, with revenue in A1, COGS in A2 and operating expenses in A3: gross margin is =(A1-A2)/A1, operating margin is =(A1-A2-A3)/A1 and the target price is =A2/(1-target), formatted as percentages where needed.

How the Calculator Is Verified

Gross, operating, and net margin peel back the income statement one layer at a time from the same revenue, COGS, operating expense, and other-expense fields you fill in once. Gross margin divides (revenue minus COGS) by revenue; operating margin divides (gross profit minus operating expenses) by revenue; net margin divides (operating profit minus other expenses) by revenue. Because all three read from the same four inputs, changing the operating expense field alone will shift the operating and net margin figures on screen but leave the gross margin figure untouched.

Frequently Asked Questions

How do you calculate profit margin in Excel?

With revenue in A1 and COGS in A2: gross margin = =(A1-A2)/A1, formatted as a percentage. For net margin, subtract all cost cells from A1 in the numerator. To calculate a target selling price from a desired margin in A3: =A2/(1-A3).

What is a good profit margin?

It depends entirely on the industry. Retail: 5–10% net is acceptable, 15%+ is strong. Restaurants: 3–9% net. SaaS software: 20–40% net. Ecommerce physical goods: 10–20% net. Never compare margins across industries, a 5% net margin is tight for software but solid for grocery. Compare gross margins within your sector to benchmark production efficiency.

References