Gross Margin Calculator

Calculate gross margin based on revenue and cost of goods sold.

Gross Margin

Guide

How it works

Use this calculator to measure gross margin based on revenue and cost of goods sold. Essential for product profitability analysis, pricing reviews, supplier comparisons, and understanding how much revenue remains after direct costs before operating expenses are considered.

What this calculator does

The gross margin calculator helps you measure both the gross profit amount and the gross margin percentage - showing how much revenue remains after direct product or production costs are deducted.

It uses:

  • total revenue
  • cost of goods sold

This gives you gross profit and gross margin percentage - two of the most fundamental metrics in any product-based or manufacturing business.

How to use the gross margin calculator

  1. Enter your revenue - total sales income for the period, net of returns and discounts for the most accurate result
  2. Enter your cost of goods sold - all direct costs of producing or acquiring the goods sold during the period, including materials, direct labour, and other costs directly attributable to production or product acquisition
  3. The calculator instantly shows gross profit amount and gross margin percentage

The key is correctly defining what counts as cost of goods sold - only direct product costs, not overheads, rent, or marketing spend.

Gross Margin Formula

Gross Profit = Revenue - Cost of Goods Sold

Gross Margin % = (Gross Profit / Revenue) x 100

Where:

  • Revenue = total sales income
  • Cost of Goods Sold = direct costs of producing or acquiring the goods sold
  • Gross Profit = revenue minus cost of goods sold
  • Gross Margin % = gross profit expressed as a percentage of revenue

Example calculation

If:

  • Revenue = 10,000
  • Cost of goods sold = 6,500

Then:

  • Gross profit = 10,000 - 6,500 = 3,500
  • Gross margin = (3,500 / 10,000) x 100 = 35%

After covering the direct cost of goods sold, 3,500 - or 35% of revenue - remains as gross profit to cover operating expenses and generate net profit.

What is gross margin?

Gross margin is the percentage of revenue remaining after all direct costs of producing or acquiring goods are deducted. It measures how efficiently a business converts sales revenue into gross profit - the pool of money available to cover operating costs, overheads, and ultimately generate net profit.

Gross margin only accounts for direct production or product costs - it does not include rent, salaries for non-production staff, marketing, or other operating overheads. These are deducted further down the profit and loss statement to arrive at operating profit and net profit.

What is a good gross margin?

Benchmarks vary significantly by industry and business model:

  • Software and SaaS - typically 65% to 85%, as direct costs are low
  • Ecommerce and retail - typically 30% to 60%, depending on product category and channel fees
  • Manufacturing - typically 25% to 50%
  • Wholesale - typically 20% to 40%
  • Restaurants and food service - typically 60% to 75% on food margin, lower after labour
  • Professional services - typically 50% to 80%

A gross margin that is too low may indicate that pricing is insufficient relative to direct costs, that product costs are too high, or that the product mix is skewed toward lower-margin items.

What is included in cost of goods sold?

Cost of goods sold - COGS - includes all direct costs that can be attributed to producing or acquiring the products sold:

  • Materials and components - raw inputs used to produce the product
  • Direct manufacturing labour - wages of production workers directly involved in making the product
  • Inbound freight and import duties - costs of getting materials or finished goods to your facility
  • Packaging - materials used to package the finished product
  • Contract manufacturing costs - fees paid to third-party manufacturers

COGS does not include:

  • Office rent and utilities
  • Marketing and advertising spend
  • Salaries of non-production staff such as sales, admin, and management
  • Depreciation of non-production assets

Why gross margin matters for product analysis

Tracking gross margin helps you:

  • understand the product-level profitability of individual SKUs, product lines, or categories
  • identify pricing problems - a falling gross margin signals that costs are rising faster than prices
  • compare supplier options by modelling how cost changes affect margin
  • assess the impact of product mix shifts on overall profitability
  • set minimum acceptable prices for products, promotions, and wholesale or channel pricing

How to improve gross margin

Three main levers for improving gross margin:

  • Increase selling price - even a small price increase significantly improves gross margin percentage without changing costs
  • Reduce cost of goods sold - negotiate better supplier pricing, reduce material waste, or improve production efficiency
  • Improve product mix - shift sales toward higher-margin products, categories, or customer segments

When to use this calculator

Use this calculator when you want to:

  • review the gross margin of a specific product, category, or business period
  • assess the impact of a supplier cost change or price increase on margin
  • compare gross margin across different product lines or SKUs
  • set a minimum selling price that maintains a target gross margin
  • prepare financial reporting that includes gross margin analysis

Common mistakes when calculating gross margin

Common mistakes include:

  • including operating expenses such as rent, marketing, or admin salaries in COGS - these are not direct product costs
  • using revenue figures that include returns or discounts without adjusting COGS accordingly
  • confusing gross margin with net profit margin - gross margin is significantly higher for most businesses because it excludes all operating overheads
  • comparing gross margin across very different business models without adjusting for differences in what is included in COGS

Gross margin vs profit margin

These two metrics measure profitability at different levels of the cost structure.

  • Gross margin deducts only cost of goods sold - it measures product-level profitability before operating costs
  • Profit margin deducts all costs - direct and indirect - and measures overall business profitability

A business with a 40% gross margin might have a 10% net profit margin if operating expenses consume 30% of revenue. Use the Profit Margin Calculator to measure net profitability alongside gross margin.

Gross margin vs markup

These are two different ways of expressing the relationship between cost and selling price.

  • Gross margin is expressed as a percentage of selling price - the proportion of revenue retained as gross profit
  • Markup is expressed as a percentage of cost - the percentage added to cost to arrive at selling price

A 40% gross margin corresponds to a 67% markup. They are mathematically related but describe the same relationship from different reference points. Use the Markup Calculator to calculate markup from cost.

Related calculations

Once you know your gross margin, you may also want to:

Useful resources

  • QuickBooks - accounting software with gross margin reporting by product, category, and period
  • Xero - cloud accounting platform with cost of goods sold tracking and gross margin analysis
  • Shopify - ecommerce platform with product cost entry and gross margin visibility per SKU

FAQs

What is gross margin?

Gross margin is the percentage of revenue remaining after cost of goods sold is deducted. It measures how efficiently a business converts sales revenue into gross profit before operating expenses are considered.

How do you calculate gross margin?

Gross Margin % = ((Revenue - Cost of Goods Sold) / Revenue) x 100.

What is the difference between gross margin and net profit margin?

Gross margin deducts only cost of goods sold. Net profit margin deducts all costs - including operating expenses, interest, and tax. Gross margin is higher for most businesses because it excludes all operating overhead.

What costs are included in cost of goods sold?

Direct costs attributable to producing or acquiring goods - materials, direct labour, inbound freight, import duties, and packaging. Operating expenses such as rent, marketing, and management salaries are not included in COGS.

Why is gross margin important for pricing?

Gross margin shows how much of each revenue pound or dollar remains after direct product costs - the pool available to cover overheads and generate profit. A gross margin that is too low may not leave enough to cover operating expenses, no matter how efficiently the business is run.

Can gross margin be negative?

Yes. If cost of goods sold exceeds revenue - for example, through heavy discounting or rising material costs - gross margin is negative. This means the business loses money on every sale before overheads are even considered.

How does gross margin differ from contribution margin?

Gross margin deducts cost of goods sold, which may include some fixed manufacturing costs. Contribution margin deducts only variable costs. In many businesses the two are similar, but in manufacturing-heavy businesses they can differ significantly depending on how fixed production costs are classified.

How often should I review gross margin?

Monthly for most product businesses - particularly those with variable input costs such as raw materials or freight. Any time supplier costs, selling prices, or product mix changes significantly, gross margin should be recalculated.

Interpreting your result

Your gross margin result should always be interpreted in context:

  • compare it against your historical baseline
  • review it alongside the main commercial or operational drivers behind the metric
  • compare it across products, channels, periods, or segments where relevant
  • avoid interpreting the result in isolation without checking the underlying input values

A single period can be noisy, so trend direction over several periods is usually more useful than one standalone result.

Data quality checklist

Before acting on this result, verify:

  • the inputs use the same time period and reporting basis
  • one-off anomalies are identified separately from steady-state performance
  • discounts, refunds, taxes, or fees are handled consistently where relevant
  • the underlying values are complete enough to support a meaningful conclusion

Small input inconsistencies can materially change the result.

How to improve this metric

Practical ways to improve this metric depend on the underlying business model, but often include:

  • identify the main driver behind the result before making changes
  • test one variable at a time so the impact is easier to measure
  • compare performance by segment rather than only at an overall level
  • review the metric regularly so changes can be caught early

Improvement is most reliable when measurement definitions remain stable over time.

Benchmarks and target setting

A good target depends on your industry, business model, and stage of growth.

When setting targets:

  • compare against your own historical trend before relying on outside benchmarks
  • define both minimum acceptable and aspirational target ranges
  • review targets whenever pricing, cost, demand, or channel mix changes materially
  • pair benchmark review with the underlying commercial context, not just the final number

Your own historical performance is usually the most practical benchmark.

Reporting cadence and decision workflow

For most teams, a simple cadence works best:

  • Weekly: monitor the metric when trading conditions or campaign activity change quickly
  • Monthly: compare the result against target and prior periods
  • Quarterly: reassess assumptions, targets, and the main drivers behind the metric

A practical workflow is to calculate the metric, identify the primary driver of change, test one improvement, and then review the next comparable period before scaling.

Common analysis scenarios

You can use this metric in several practical scenarios:

  • monthly performance reviews
  • pricing, margin, or cost analysis
  • planning and forecasting discussions
  • investor, lender, or management reporting

In each scenario, pair the result with the underlying business context so decisions are not made on one number alone.

FAQ extensions

Should I compare this metric across channels?

Yes, but only when definitions and attribution rules are consistent.

How many periods should I review before making changes?

At least 3 comparable periods is a good baseline unless there is a clear data issue or one-off event.

What should I do if this metric improves but profit declines?

Check whether costs, discounts, conversion quality, or downstream profitability changed at the same time.

Explore more

More calculators in this topic

View pricing calculators

Continue exploring

Related calculators

Explore the next calculations most relevant to this topic.