Gross Margin Calculator

Calculate gross margin from revenue and cost of goods sold — the percentage of each sale left after direct production costs.

Updated September 2026
$
$
Gross Margin
40 %

The formula

Gross Margin = (Total Revenue − Cost of Goods Sold) ÷ Total Revenue × 100
# the percentage of each sale left after direct costs, before any overhead

Calculate Gross Margin and Its Importance

Understanding how to calculate gross margin is essential for businesses to assess profitability. The gross margin represents the difference between revenue and the cost of goods sold (COGS), expressed as a percentage. It provides insights into how efficiently a company produces and sells its products.

To calculate gross margin, use the formula:
Gross Margin = (Revenue - COGS) / Revenue * 100
For example, if a company has $500,000 in revenue and $300,000 in COGS, the gross margin would be:
($500,000 - $300,000) / $500,000 * 100 = 40%
This means the company retains 40% of its revenue after accounting for production costs.

How to calculate gross margin

Gross margin is the share of each dollar of sales that's left once the direct cost of producing or buying what was sold is deducted. Expressing it as a percentage makes it comparable across businesses of very different sizes in a way raw gross profit isn't.

Only cost of goods sold comes out here — not rent, salaries, marketing or any other overhead. Revenue of $1,000 against COGS of $600 gives a 40% gross margin: 40 cents of every dollar sold is left to cover everything else and, eventually, profit.

What to enter:

  • Total Revenue ($) — total sales for the period, before any costs are deducted
  • Cost of Goods Sold ($) — the direct cost of producing or buying what was sold — materials and direct labor, not overheads

No submit button: type and the answer moves. Your inputs end up in the link, so the page can be shared already filled in.

Where a figure is not immediately to hand — a precise interest rate, an exact balance — a reasonable estimate is a perfectly good starting point. Because every result updates instantly, refining a rough guess into the real figure once you have it takes a moment, and nothing about the calculation depends on getting it exactly right on the first attempt.

Factors Affecting Gross Margin

Several factors influence the gross margin, including:
  • Pricing Strategy: Higher prices can increase margins if demand remains stable.
  • Production Costs: Lowering COGS through efficient processes boosts margins.
  • Product Mix: Selling higher-margin products improves overall profitability.
Monitoring these factors helps businesses optimize their gross margin.

Why gross margin matters

A calculation like this usually gets used at a decision point rather than out of curiosity — comparing two real options, checking a number a lender or adviser has quoted, or working out whether a plan that sounded fine in conversation still holds up once it is written down with actual figures. The maths itself is rarely complicated; what is hard is remembering which figures to use and in what order, which is exactly what a dedicated calculator is for.

This tends to come up when comparing two concrete alternatives — two lenders, two savings products, two ways of structuring the same decision — rather than in the abstract. Run both scenarios through the same calculator with the same assumptions and the comparison becomes fair, because the only thing changing between the two results is the number you are actually trying to test.

The reason a page like this exists at all, rather than leaving the calculation to a spreadsheet or a textbook appendix, is that the formula behind gross margin is fiddly enough to get wrong by hand but not complicated enough to need specialist software. That middle ground — real enough maths to matter, simple enough to check instantly — is exactly what a dedicated calculator is for, and it is why the same figure recalculated here should match a careful manual calculation almost exactly.

Where the same calculation needs to be run for several different scenarios side by side — three loan offers, two savings plans — the fastest approach is usually to open the calculator in a second browser tab for each one, so that the results can be compared directly rather than overwriting each other in a single set of fields.

Gross Margin Calculation Example

Let’s calculate the gross margin for a business with $1,200,000 in revenue and $720,000 in COGS:
($1,200,000 - $720,000) / $1,200,000 * 100 = 40%
The result is a 40% gross margin, indicating healthy profitability.

Worked example

Work through the defaults on this page:

  • Total Revenue: 1,000 $
  • Cost of Goods Sold: 600 $

That gives:

  • Gross Margin: 40 %

These figures are only the calculator's own starting values, included so the working is visible rather than hidden inside the tool above. Replace them with your own numbers and the same arithmetic applies — nothing about the method changes, only the inputs feeding it.

How to Improve Gross Margin

To enhance your gross margin, consider:
  • Negotiating Supplier Costs: Lower COGS by securing better deals.
  • Increasing Prices: Adjust pricing without losing customers.
  • Streamlining Operations: Reduce waste and improve efficiency.

Reading the result

What counts as healthy varies hugely by sector: software and services businesses often run gross margins above 70% because there's little direct cost per sale, while grocery retailers commonly sit in the 20-30% range because the product itself is most of the cost. Compare against your own industry, not a universal benchmark.

Where this goes wrong. Confusing gross margin with net margin or operating margin. Gross margin only strips out direct production cost — a business can show a strong 50% gross margin and still lose money overall once rent, salaries and marketing are subtracted.

A useful check on any unfamiliar result is to compare it against a rough mental estimate first — round the inputs to convenient numbers and see whether the calculator's answer lands in roughly the same territory. A wildly different figure usually means one of the fields was entered in the wrong unit, most often a percentage typed as a whole number where a decimal was expected, or the reverse.

The gross margin measures profitability after accounting for COGS, while the net margin includes all expenses, such as taxes and overhead. Gross margin focuses on production efficiency, whereas net margin reflects overall financial health.

Investors use gross margin to evaluate a company’s core profitability and compare it with industry peers. A higher margin suggests better cost control and pricing power.

It depends entirely on the industry — SaaS businesses often target 70-80%+, manufacturers commonly run 25-35%, and grocers can sit in the low 20s or lower. Compare your figure against direct competitors, not a generic target.

Yes, a negative gross margin occurs when COGS exceed revenue, indicating severe inefficiencies or pricing issues.

Markup is profit as a percentage of cost; margin is profit as a percentage of revenue — they use different denominators. A $40 profit on a $60 cost item is a 67% markup but only a 40% gross margin on the $100 sale price.

Businesses should calculate gross margin monthly or quarterly to track trends and make timely adjustments.

The answer it gives you is gross Margin. With 1,000 $ total Revenue and 600 $ cost of Goods Sold, that comes to 40 %. Change any field and the figure moves with it.

Gross Margin Comparison Example

Compare two businesses:
Business A: Revenue $800,000, COGS $480,000
($800,000 - $480,000) / $800,000 * 100 = 40%
Business B: Revenue $600,000, COGS $420,000
($600,000 - $420,000) / $600,000 * 100 = 30%
Business A has a higher gross margin, indicating better efficiency.

Whenever one of the underlying figures changes — a new interest rate, a different balance, an updated term — since the result only reflects what is currently in the fields. There is no need to keep a separate record of past results; the web address for a filled-in version already carries the figures used to produce it.

Common Mistakes When Calculating Gross Margin

Avoid these errors:
  • Incorrect COGS: Ensure all production costs are included.
  • Ignoring Discounts: Account for sales discounts in revenue.
  • Overlooking Returns: Deduct returned goods from revenue.

Not unless a tax rate or a fee is explicitly one of the inputs above. Where it is not, the figure shown is a gross calculation, and any tax due depends on your personal circumstances and current tax rules, which are worth checking separately.

Gross Margin Benchmarks by Industry

Gross margin varies by sector:
  • Retail: 20-30%
  • Manufacturing: 30-50%
  • Software: 70-90%
Compare your margin to industry standards for context.

The arithmetic itself is exact — the calculator applies the formula shown above precisely, with no rounding until the final figure is displayed. The uncertainty, where it exists, is entirely in the inputs: an estimated rate or an approximate balance carries that same approximation through to the result.

Gross Margin Sensitivity Analysis

Analyze how a 10% COGS increase affects gross margin:
Original: Revenue $1,000,000, COGS $600,000, Margin 40%
New: COGS $660,000
($1,000,000 - $660,000) / $1,000,000 * 100 = 34%
The margin drops to 34%, highlighting cost sensitivity.

Gross Margin and Pricing Strategy

Align pricing with gross margin goals:
  • Premium Pricing: Targets higher margins but may reduce volume.
  • Penetration Pricing: Lowers margins to gain market share.

Calculate Gross Margin for Business Success

Mastering how to calculate gross margin empowers businesses to make informed decisions. Regularly analyze and optimize your gross margin to ensure long-term profitability and growth.

Was this calculator helpful?

Tap a star to rate it. Your feedback helps us improve the tools people rely on most.