Last 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

What Profit Margin Means

Profit margin is the percentage of revenue that remains as profit after deducting costs. A 30% profit margin means you keep $0.30 from every $1.00 of revenue, after paying the costs used to calculate that margin. Which costs you include determines which margin type you are looking at.

All three margins divide by revenue, not by cost. That is the key difference from markup, which divides by cost. A 40% gross margin and a 40% markup on the same product are very different numbers. (Profit margin ratio is the same calculation expressed as a decimal, 0.35 instead of 35%. This calculator shows percentages.)

Margin type Costs deducted What it shows
Gross profit margin Cost of goods sold only Revenue left after direct production costs
Operating profit margin COGS + operating expenses Core business efficiency, before financing costs
Net profit margin All costs, COGS, OpEx, interest, taxes Bottom-line percentage of revenue kept

The gap between gross margin and net margin tells you how much overhead and financing the business carries relative to revenue.

Gross Profit Margin

Gross profit margin measures how much revenue remains after paying the direct cost of goods sold, before rent, salaries, marketing, or any other overhead.

Gross profit = revenue − cost of goods sold (COGS)
Gross profit margin = gross profit ÷ revenue × 100

COGS includes direct costs tied to each unit or job: raw materials, direct labor for that product, manufacturing costs, and per-sale fees (merchant fees, per-unit shipping). It does not include office rent, administrative salaries, or marketing. A common error is leaving out platform or payment processing fees, Shopify fees, Amazon referral fees, Stripe fees, and per-unit shipping all belong in COGS if incurred on each sale.

If you offer discounts or accept returns, use net revenue (after refunds) as the base, an inflated denominator makes margin look better than it is.

Example: Revenue $100,000, COGS $60,000. Gross profit = $40,000. Gross margin = $40,000 ÷ $100,000 × 100 = 40%.

Net Profit Margin

Net profit margin is the bottom-line number, what is left after every expense has been paid, including COGS, operating costs, interest, and taxes. For an investment-return view that measures how efficiently capital is deployed over time, rather than what share of revenue is retained, the ROI Calculator handles that calculation.

Net profit = revenue − COGS − operating expenses − interest − taxes
Net profit margin = net profit ÷ revenue × 100

Net margin is the most complete view of profitability but the hardest to improve because it includes costs that are difficult to reduce, taxes and debt service, for example. A business with a 40% gross margin and a 5% net margin is paying out 35% of revenue in operating and other costs. Net margin also varies seasonally; a single month's figure may not represent the full year.

Example: Revenue $100,000, COGS $60,000, operating expenses $15,000, other expenses $5,000. Net profit = $20,000. Net margin = 20%.

Operating Profit Margin

Operating profit margin sits between gross and net. It removes operating expenses from gross profit but excludes interest and taxes, giving a view of how efficiently the core business runs, independent of its financing structure.

Operating profit = gross profit − operating expenses
Operating profit margin = operating profit ÷ revenue × 100

Operating margin is also called EBIT margin (Earnings Before Interest and Taxes). It is useful for comparing businesses with different debt structures or tax situations because those costs are excluded. Gross margin reflects production efficiency; operating margin reflects operational efficiency.

Example: Gross profit $40,000 minus operating expenses $15,000 = operating profit $25,000. Operating margin = $25,000 ÷ $100,000 = 25%.

Target Selling Price From Desired Margin

If you know your COGS and want to hit a specific gross margin, calculate the required selling price by working backwards from the margin formula.

Selling price = COGS ÷ (1 − target gross margin)

Use the margin as a decimal: a 40% target becomes 0.40. For a product costing $60 at a 40% target margin: $60 ÷ 0.60 = $100. This is useful for pricing new products, setting wholesale prices, or checking whether a vendor quote leaves enough margin. Enter your COGS and target in the calculator above to see the required price and maximum allowable cost.

Margin Reference Table

Required selling price and equivalent markup for common gross margin targets. The "max COGS" column shows the highest cost per dollar of revenue that still hits the target margin.

Target gross margin Price multiplier on COGS Max COGS per $100 revenue Equivalent markup
10%÷ 0.90 = × 1.111$90.0011.1% markup
20%÷ 0.80 = × 1.25$80.0025.0% markup
25%÷ 0.75 = × 1.333$75.0033.3% markup
30%÷ 0.70 = × 1.429$70.0042.9% markup
40%÷ 0.60 = × 1.667$60.0066.7% markup
50%÷ 0.50 = × 2.00$50.00100.0% markup
60%÷ 0.40 = × 2.50$40.00150.0% markup
70%÷ 0.30 = × 3.333$30.00233.3% markup

Profit Margin vs Markup

Margin and markup both compare profit to a reference number, but they use different denominators. Using them interchangeably is one of the most common pricing mistakes.

Metric Formula Denominator Example: cost $60, price $100
Gross margin (Price − Cost) ÷ Price × 100 Selling price (revenue) ($100 − $60) ÷ $100 = 40%
Markup (Price − Cost) ÷ Cost × 100 Cost ($100 − $60) ÷ $60 = 66.7%

The same product gives a 40% margin but a 66.7% markup. Entering a target margin into a markup calculator will underprice the product. Use the formulas below to convert between them, or use the Markup Calculator for markup-based pricing.

Margin to markup: markup = margin ÷ (1 − margin)
Markup to margin: margin = markup ÷ (1 + markup)

Industry Benchmarks

What counts as a good margin depends on the industry. The ranges below are typical for gross and net margins by sector.

Retail

Gross margins vary widely by category: clothing and accessories 40–60%, electronics 5–10% (thin, competitive), jewelry 40–60%, grocery 25–35%, furniture 40–50%. Net margins after rent, staff, and operating costs typically land at 2–6% for most retailers; above 10% is considered strong. Enter wholesale cost as COGS and overhead (rent, payroll) as operating expenses to see both margins side by side.

Restaurant

Restaurants target food cost of 28–35% of revenue, giving a gross margin of 65–72%. After labor (typically 30–35% of revenue), rent, utilities, and other operating costs, net margins land at 3–9%. Full-service restaurants often run 3–5%; fast casual can reach 6–9%. Enter total food and beverage cost as COGS and all overhead as operating expenses. To find how many covers or orders are required each month to recover those fixed costs before any profit begins, the Break Even Point Calculator shows that threshold in units and revenue.

HVAC

HVAC businesses typically target gross margins of 40–60% on parts and service work, with material markup built in. Net margins commonly land at 5–12% after technician labor, vehicle costs, insurance, and overhead. Service work generally carries higher margins than equipment installation, which is more competitive.

Ecommerce and marketplace sellers

Ecommerce gross margins are highly product-dependent. Physical goods: 20–50% before shipping and fulfillment. Digital products: 70–90%. After advertising (often 15–30% of revenue for paid acquisition), shipping, and platform fees, net margins typically run 10–20% for well-run stores.

For Shopify, Amazon FBA, or other marketplace sellers: include product cost, inbound shipping, and platform or referral fees in COGS, Amazon fees typically run 25–35% of selling price depending on category. Include advertising and subscription costs in operating expenses. A product selling for $30 might carry $18–22 in total costs, leaving 27–40% gross margin before ad spend.

Profit Margin in Excel

With revenue in A1, COGS in A2, and operating expenses in A3:

Cell Label Formula Example result
A1Revenue100000
A2COGS60000
A3Operating expenses15000
A4Gross profit margin=(A1-A2)/A140% (format as %)
A5Operating margin=(A1-A2-A3)/A125% (format as %)
A6Net profit margin=(A1-A2-A3-other)/A120% (format as %)
A7Target price at 40% margin=A2/(1-0.40)Adjust 0.40 as needed

Format the margin cells as percentages (Ctrl+Shift+%) or multiply by 100 for a plain number. For the target price formula, replace the hardcoded 0.40 with a cell reference to make it dynamic.

Worked Examples

Example 1, Gross margin on a product

A product sells for $80. Cost to produce and ship: $48.

  1. Gross profit = $80 − $48 = $32
  2. Gross margin = $32 ÷ $80 × 100 = 40%

Example 2, Net margin for a small business

Monthly revenue $50,000. COGS $28,000, operating expenses $12,000, other expenses $3,000.

  1. Gross profit = $50,000 − $28,000 = $22,000 (44% gross margin)
  2. Operating profit = $22,000 − $12,000 = $10,000 (20% operating margin)
  3. Net profit = $10,000 − $3,000 = $7,000
  4. Net margin = $7,000 ÷ $50,000 × 100 = 14%

Example 3, Target selling price from desired margin

A retailer wants a 45% gross margin on a product costing $55.

  1. Selling price = $55 ÷ (1 − 0.45) = $55 ÷ 0.55 = $100

Example 4, Service business gross and net margin

A consultant invoices $8,000 for a project. Direct costs: $2,400. Allocated overhead: $1,600.

  1. Gross profit = $8,000 − $2,400 = $5,600
  2. Gross margin = $5,600 ÷ $8,000 × 100 = 70%
  3. Net profit = $5,600 − $1,600 = $4,000
  4. Net margin = $4,000 ÷ $8,000 × 100 = 50%

Example 5, Ecommerce product margin check

Amazon listing at $35. Product cost $10, inbound shipping $2, Amazon fees $9. Advertising $5 per unit.

  1. COGS = $10 + $2 + $9 = $21
  2. Gross profit = $35 − $21 = $14 (40% gross margin)
  3. Net profit = $14 − $5 = $9
  4. Net margin = $9 ÷ $35 × 100 = 25.7%

Frequently Asked Questions

How do you calculate profit margin?

Profit margin = (revenue − costs) ÷ revenue × 100. Subtract the relevant costs from revenue, divide by revenue, and multiply by 100. Which costs you include determines the type, gross (COGS only), operating (COGS + operating expenses), or net (all costs including interest and taxes).

How do you calculate gross profit margin?

Subtract COGS from revenue to get gross profit, then divide by revenue: (revenue − COGS) ÷ revenue × 100. A product selling at $100 with $60 in direct costs has a 40% gross margin. Include all per-sale costs in COGS, merchant fees, fulfillment, and shipping belong here, not in overhead.

How do you calculate net profit margin?

Net margin = (revenue − total costs) ÷ revenue × 100, where total costs include COGS, operating expenses, interest, and taxes. A business with $100,000 revenue and $20,000 in net profit has a 20% net margin, the most complete profitability measure.

How do you calculate operating profit margin?

Operating margin = (gross profit − operating expenses) ÷ revenue × 100. Operating expenses include rent, salaries, utilities, and marketing, but not interest or taxes. Also called EBIT margin, it shows core business efficiency independent of how the business is financed.

How do I price a product for a target gross margin?

Selling price = COGS ÷ (1 − target margin). Use the margin as a decimal: for 40%, use 0.40. A product costing $60 at a 40% target: $60 ÷ 0.60 = $100. For 30%: $60 ÷ 0.70 = $85.71. Enter COGS and your target in the calculator above to get the required price and maximum allowable cost at once.

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 the difference between profit margin and markup?

Profit margin divides by revenue (selling price). Markup divides by cost. A $40 profit on a $60 cost selling at $100 gives a 40% margin but a 66.7% markup. Entering a margin target into a markup calculator will underprice the product. Use margin for financial reporting; use markup for pricing up from cost.

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

Method

Author, Review, and Formula Method

Written by Calculators Labs Editorial Team
Reviewed by Calculators Labs
Last updated

The Profit Margin Calculator uses Gross margin = (Revenue - COGS) / Revenue × 100. The calculator reads Revenue, COGS, Operating expenses, Target margin, applies the formula, and shows the result with practical rounding so the answer is easy to check.

For calculators with units, measurements are kept in one unit system before the final result is displayed. The steps are written to help students, teachers, and everyday users see how the answer was produced.