Skip to content

Margin & Markup Calculator

Gross, operating and net margin from revenue.

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

Your values

ⓘ Live results

Results
Gross profit
$110000 (44%)
Operating profit
$50000 (20%)
Net profit
$39500 (15.8%)
Cost ratio
80%

Quick answer

Profit margin is profit divided by revenue, shown as a percentage. Gross margin = (revenue − cost of goods sold) ÷ revenue; operating margin also subtracts operating expenses; net margin subtracts tax as well. A business with $250,000 of revenue, $140,000 of COGS, $60,000 of operating expenses and a 21% tax rate has a 44% gross margin, a 20% operating margin and a 15.8% net margin.

What the Margin & Markup calculator does

This calculator takes one period's income-statement figures and returns the three margins analysts look at first: gross, operating and net. It also shows the cost ratio — the share of revenue eaten by COGS and operating expenses together.

Owners use it to check pricing and overheads, contractors use it to sanity-check a job quote, and investors use it to compare companies of different sizes. If you only need the margin on a single product or want to set a price from a cost, the markup calculator and profit margin calculator are quicker.

The tax step applies one flat rate to operating profit. That ignores interest, other income, and the timing rules for losses, so treat net margin here as an estimate. If operating profit is negative, the net figure assumes the loss reduces tax, which is only true if you can use the loss against other profit.

The formula

Gross margin = (R − COGS) ÷ R Operating margin = (R − COGS − OpEx) ÷ R Net margin = (R − COGS − OpEx) × (1 − t) ÷ R

Formula variables
SymbolMeaningUnit
RRevenue (net sales) for the period$
COGSCost of goods sold: materials, direct labor and other costs of producing what was sold$
OpExOperating expenses: rent, salaries outside production, marketing, software, admin$
tTax rate on profit, as a decimal (21% = 0.21)—

These definitions follow standard income-statement analysis as taught in financial accounting and used by analysts. Operating margin here is close to EBIT margin; for a version that adds back depreciation and amortization, use the EBITDA calculator.

To set a price from a target margin, rearrange the gross margin formula: price = cost ÷ (1 − margin). A job that costs $650 to deliver needs a $1,000 price for a 35% margin.

Worked examples

Building contractor with thin margins

A contractor billing $1.2 million a year, with $900,000 of materials and site labor, $220,000 of overheads and a 21% tax rate.

Inputs

  • Revenue1200000 $
  • Cost of goods sold900000 $
  • Operating expenses220000 $
  • Tax rate21 %

Result

  • Gross profit$300000 (25%)
  • Operating profit$80000 (6.7%)
  • Net profit$63200 (5.3%)
  • Cost ratio93.3%

A 25% gross margin shrinks to a 6.7% operating margin and 5.3% net. With costs at 93.3% of revenue, one underpriced job or a cost overrun can wipe out a month's profit, so quotes need a contingency.

Software company with high gross margin

A software business with $480,000 of revenue, $96,000 of hosting and support costs, $300,000 of salaries and marketing, and a 25% tax rate.

Inputs

  • Revenue480000 $
  • Cost of goods sold96000 $
  • Operating expenses300000 $
  • Tax rate25 %

Result

  • Gross profit$384000 (80%)
  • Operating profit$84000 (17.5%)
  • Net profit$63000 (13.1%)
  • Cost ratio82.5%

An 80% gross margin is typical of software, but heavy spending on people brings operating margin down to 17.5%. Growth here comes from adding revenue faster than operating expenses.

Default: small product business

$250,000 of revenue, $140,000 of COGS, $60,000 of operating expenses and a 21% tax rate.

Inputs

  • Revenue250000 $
  • Cost of goods sold140000 $
  • Operating expenses60000 $
  • Tax rate21 %

Result

  • Gross profit$110000 (44%)
  • Operating profit$50000 (20%)
  • Net profit$39500 (15.8%)
  • Cost ratio80%

Gross margin of 44% leaves room for overheads; net profit is $39,500, or 15.8% of revenue. Cutting COGS by an amount equal to 5% of revenue would lift gross and operating margin by 5 points and net margin by about 4 points after tax.

Gross, operating and net margin compared

Each margin answers a different question, so look at all three before deciding what to fix.

What each margin tells you
MarginSubtracts from revenueAnswers
GrossCost of goods soldIs the product or service itself priced above its direct cost?
OperatingCOGS + operating expensesDoes the core business make money after overheads?
NetAll costs, interest and taxWhat is left for owners from each dollar of sales?
Cost ratio—What share of revenue goes on COGS and overheads together?

How a discount cuts your margin

A price cut comes entirely out of profit, so its effect on margin is larger than it looks. Take an item priced at $100 that costs $60: gross margin is 40%. A 10% discount drops the price to $90 and the margin to $30 ÷ $90 = 33.3%, and profit per unit falls by a quarter, from $40 to $30.

To earn the same gross profit as before, you would need to sell 40 ÷ 30 = 1.33 times as many units — a third more volume to stand still. The lower your starting margin, the more extra volume a discount needs. Run your own figures through the discount calculator and compare the result with realistic sales uplift.

Margin checks for quotes and stock

  • Job quotes: list materials, labor and subcontractors as COGS, then price with price = cost ÷ (1 − target margin). Adding 35% to cost gives only a 25.9% margin, a common source of underpricing.
  • Quote versus actual: after the job, rerun the calculator with real costs. The gap between quoted and actual margin shows where estimates slipped.
  • GMROI (gross margin return on inventory): gross profit ÷ average inventory at cost. A store earning $110,000 gross profit on $50,000 of average stock has a GMROI of 2.2, meaning $2.20 of gross profit for each dollar held in inventory.

How to use the Margin & Markup Calculator

  1. 1Enter revenue for the period — net of returns and discounts, excluding sales tax or VAT.
  2. 2Enter cost of goods sold from your profit and loss statement; service businesses can use direct labor and subcontractor costs.
  3. 3Enter operating expenses such as rent, non-production salaries, marketing and software.
  4. 4Enter your tax rate on profit and read gross, operating and net margin plus the cost ratio.

Frequently asked questions

How do I calculate profit margin?

Subtract costs from revenue to get profit, divide by revenue and multiply by 100. For $250,000 of revenue and $110,000 of gross profit, gross margin is 44%.

What is the difference between margin and markup?

Margin divides profit by the selling price; markup divides the same profit by cost. A $60 cost sold at $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: grocery and construction run on thin net margins, while software and professional services often achieve much higher ones. Compare against businesses in your sector and against your own past years.

How do I price for a 30% margin?

Divide cost by 0.7 (that is, 1 − 0.30). An item that costs $70 needs a $100 price for a 30% margin.

Why is my net margin so much lower than my gross margin?

Gross margin ignores overheads and tax. Rent, salaries, marketing and tax can take most of the gross profit, which is why the operating and net figures are the ones that show whether the business is sustainable.

References

  • Financial Accounting: Tools for Business Decision Making — Wiley (Kimmel, Weygandt & Kieso)
  • International Financial Statement Analysis (profitability ratios) — CFA Institute / Wiley

About this calculator