Skip to content

Profit Margin Calculator

Gross, net and markup from revenue and cost.

Reviewed by the Calculation Machine team · Updated 24 October 2026 · How we check our maths

Your values

ⓘ Live results

Results
Gross margin
38%
Net margin
23%
Gross profit
$3,800.00
Net profit
$2,300.00
Markup on cost
61.29%

Quick answer

Profit margin is profit divided by revenue, shown as a percentage. Gross margin uses revenue minus cost of goods sold; net margin also subtracts operating expenses. On $10,000 of sales with $6,200 of product costs and $1,500 of overheads, gross profit is $3,800 (38% margin) and net profit is $2,300 (23%). Markup divides the same $3,800 by cost instead: 61.29%.

What the Profit Margin calculator does

This calculator takes revenue, cost of goods sold (COGS) and other operating expenses for any period and returns gross profit, gross margin, net profit, net margin and markup on cost. Use it for a single product, a month of trading or a full year's accounts.

Gross profit and gross margin show how much each sale leaves after the direct cost of what you sold — the figure that pays for rent, wages and marketing. Net margin here is what remains after the operating expenses you enter. If you leave out interest and income tax it is effectively an operating margin; include them in expenses if you want true bottom-line net margin.

Margin and markup are easy to confuse and the mix-up is costly: adding a 40% markup to cost gives only a 28.6% margin. To set a price from a target margin or markup instead, use the margin and markup calculator or the markup calculator.

The formula

Gross profit = revenue − COGS Gross margin = gross profit ÷ revenue × 100 Net profit = gross profit − operating expenses Net margin = net profit ÷ revenue × 100 Markup = gross profit ÷ COGS × 100

Formula variables
SymbolMeaningUnit
revenueSales for the period, excluding sales tax or VAT$
COGSDirect cost of goods or services sold: materials, stock, direct labor, inbound shipping$
operating expensesRent, salaries not in COGS, marketing, software, utilities$

These are standard income-statement ratios as defined in financial accounting (GAAP and IFRS present gross profit the same way). What counts as COGS differs between businesses — a restaurant includes food cost, a software company includes hosting and support — so compare margins only with businesses that classify costs similarly. A gross profit calculator is the first line of this page: revenue minus COGS.

Worked examples

Small retailer, one month

A gift shop sells $10,000 of stock that cost $6,200 and pays $1,500 in rent, card fees and part-time wages.

Inputs

  • Revenue10000 $
  • Cost of goods sold6200 $
  • Other operating expenses1500 $

Result

  • Gross margin38%
  • Net margin23%
  • Gross profit$3,800.00
  • Net profit$2,300.00
  • Markup on cost61.29%

A 38% gross margin and 23% net margin. The 61.29% markup shows the shop prices items at roughly 1.6× cost; dropping that to 1.5× would cut gross margin to 33.3%.

Service business with high overheads

A design studio bills $85,000 a quarter. Freelancer and stock-asset costs (COGS) are $27,000; salaries, software and office rent are $38,000.

Inputs

  • Revenue85000 $
  • Cost of goods sold27000 $
  • Other operating expenses38000 $

Result

  • Gross margin68.24%
  • Net margin23.53%
  • Gross profit$58,000.00
  • Net profit$20,000.00
  • Markup on cost214.81%

Gross margin is 68.24%, typical for services where most cost is overhead rather than materials. Net margin of 23.53% means $20,000 of the $85,000 is kept, so a slow month that cuts revenue barely touches costs and hits profit hard.

Wholesale distributor, full year

A food distributor turns over $1,250,000 with $960,000 of product costs and $240,000 of warehouse, vehicle and staff costs.

Inputs

  • Revenue1250000 $
  • Cost of goods sold960000 $
  • Other operating expenses240000 $

Result

  • Gross margin23.2%
  • Net margin4%
  • Gross profit$290,000.00
  • Net profit$50,000.00
  • Markup on cost30.21%

Gross margin is 23.2% and net margin just 4%, normal for high-volume distribution. With margins this thin, a 1% supplier price rise not passed on would remove nearly a fifth of the $50,000 profit.

Markup to margin conversion

Margin = markup ÷ (100 + markup) × 100. Markup = margin ÷ (100 − margin) × 100. Margin can never reach 100%, while markup has no upper limit.

Equivalent markup and margin
Markup on costGross marginPrice if cost is $10
25%20%$12.50
40%28.6%$14.00
50%33.3%$15.00
100%50%$20.00
200%66.7%$30.00
300%75%$40.00

Setting a price from a target margin

To hit a target gross margin, divide cost by (1 − margin). An item costing $30 at a 40% target margin needs a price of $30 ÷ 0.60 = $50. Adding 40% to cost instead gives $42, which is only a 28.6% margin.

Discounts eat margin faster than they appear to. At a 40% margin, a 20% discount on the $50 price leaves $40, and gross profit falls from $20 to $10 — half the profit for a fifth off the price. The discount calculator shows sale prices, and the break-even calculator shows how many extra units you would need to sell to make up the difference.

Gross versus net margin: what each tells you

  • Gross margin measures pricing and purchasing. If it falls, look at supplier costs, discounting, shrinkage or product mix.
  • Net margin measures the whole business. If gross margin holds steady but net margin falls, overheads are growing faster than sales.
  • Operating margin and EBITDA margin sit between the two, excluding interest and tax (and, for EBITDA, depreciation). Use the EBITDA calculator when comparing businesses with different debt levels.

Typical margins differ widely by industry: grocery and distribution run on low single-digit net margins, while software and professional services can be much higher. Compare yourself with your own history and with businesses of similar size and model.

How to use the Profit Margin Calculator

  1. 1Enter revenue for the period, excluding sales tax or VAT collected.
  2. 2Enter cost of goods sold — what you paid for the products or direct labor behind those sales, not everything you bought.
  3. 3Enter other operating expenses for the same period; include interest and income tax only if you want bottom-line net margin.
  4. 4Read gross profit and gross margin, then net profit, net margin and markup on cost.

Frequently asked questions

How do I calculate profit margin?

Subtract costs from revenue to get profit, divide by revenue and multiply by 100. $4,000 profit on $16,000 of sales is a 25% margin.

What is the difference between margin and markup?

Margin is profit as a share of the selling price; markup is profit as a share of cost. A product bought for $60 and sold for $100 has a 40% margin but a 66.7% markup.

What is a good profit margin for a small business?

It depends heavily on the industry. Low-margin sectors such as grocery and wholesale often net only a few percent, while service and software businesses can net 20% or more; compare with peers using the same cost definitions.

How do I calculate gross profit?

Gross profit is revenue minus cost of goods sold. $50,000 of sales with $32,000 of COGS gives $18,000 gross profit, a 36% gross margin.

Can profit margin be negative?

Yes. If costs exceed revenue, profit and margin are negative, which means the business or product is losing money at current prices and volumes.

References

  • Accounting Standards Codification — FASB
  • Marketing Metrics: The Manager's Guide to Measuring Marketing Performance (margins and markups) — Pearson (Farris, Bendle, Pfeifer and Reibstein)

About this calculator