Skip to content
OverCalculator
  1. Home
  2. Financial
  3. Gross Margin Calculator
Financial

Gross Margin Calculator

Calculate gross profit, gross margin, COGS ratio, and overhead coverage from revenue, cost of goods sold, and optional operating expenses.

By OverCalculator Editorial Team, Updated

Gross margin
Gross margin percentage
40%
Gross profit
$200,000.00
COGS ratio
60%
Operating expenses entered
$125,000.00
After operating expenses
$75,000.00
Gross profit / overhead
160%

$500,000.00 revenue minus $300,000.00 COGS leaves $200,000.00 of gross profit, or 40% gross margin.

$
$
$

Results update as you type.

Gross Margin Calculator

Gross margin measures the first major layer of profitability on the income statement: revenue after cost of goods sold. It is different from the net profit margin calculator, which starts with bottom-line net profit after operating expenses, interest, taxes, and other items. Gross margin is also different from the ROI calculator, which compares a gain with an investment cost. Here the denominator is revenue and the cost line is COGS.

The calculator above returns gross profit, gross margin percentage, COGS ratio, operating expenses entered, profit after operating expenses, and gross profit divided by overhead when overhead is greater than zero. That makes it useful for reviewing a product line, a service package, a sales channel, or a whole company before moving lower on the income statement.

Formula this calculator uses

The first step is gross profit:

gross profit=revenueCOGS\text{gross profit} = \text{revenue} - \text{COGS}

Gross margin expresses that gross profit as a percentage of revenue:

gross margin=gross profitrevenue×100\text{gross margin} = \frac{\text{gross profit}}{\text{revenue}} \times 100

The calculator also reports the COGS ratio:

COGS ratio=COGSrevenue×100\text{COGS ratio} = \frac{\text{COGS}}{\text{revenue}} \times 100

If operating expenses are entered, they do not change gross margin. They are subtracted after gross profit for a secondary readout:

after operating expenses=gross profitoperating expenses\text{after operating expenses} = \text{gross profit} - \text{operating expenses}

When operating expenses are greater than zero, the tool also shows gross profit divided by overhead:

gross profit / overhead=gross profitoperating expenses×100\text{gross profit / overhead} = \frac{\text{gross profit}}{\text{operating expenses}} \times 100

Revenue must be greater than zero, and COGS and operating expenses must be zero or positive.

Worked example matching the calculator

The default inputs are 500,000 dollars of revenue, 300,000 dollars of cost of goods sold, and 125,000 dollars of operating expenses. Gross profit is:

gross profit=500,000300,000=200,000\text{gross profit} = \text{500,000} - \text{300,000} = \text{200,000}

Gross margin is:

gross margin=200,000500,000×100=40.00%\text{gross margin} = \frac{\text{200,000}}{\text{500,000}} \times 100 = \text{40.00\%}

The COGS ratio is:

COGS ratio=300,000500,000×100=60.00%\text{COGS ratio} = \frac{\text{300,000}}{\text{500,000}} \times 100 = \text{60.00\%}

After operating expenses, the remaining amount is:

after operating expenses=200,000125,000=75,000\text{after operating expenses} = \text{200,000} - \text{125,000} = \text{75,000}

And overhead coverage is:

gross profit / overhead=200,000125,000×100=160.00%\text{gross profit / overhead} = \frac{\text{200,000}}{\text{125,000}} \times 100 = \text{160.00\%}

The primary result is therefore 40.00% gross margin. The calculator’s tone rules label margins above 40% as positive, margins from 20% through 40% as brand or acceptable, nonnegative margins below 20% as warning, and negative margins as negative. Because 40.00% is not greater than 40, the default result sits in the middle band rather than the highest band.

Interpreting good and bad values

Gross margin benchmarks vary widely. A software subscription may have a high gross margin because delivery costs are relatively low after the product exists. A grocery store may run on thin gross margins because inventory cost is a large share of sales. A manufacturer may sit between those extremes depending on labor, materials, capacity utilization, freight, and warranty costs. The best benchmark is usually your own trend plus peers with similar products.

A rising gross margin can mean better pricing, lower input costs, more efficient production, less discounting, or a better product mix. A falling margin can mean supplier inflation, waste, underused capacity, aggressive discounts, higher fulfillment costs, or misclassified expenses. The COGS ratio is the mirror image of gross margin: if COGS ratio rises from 60% to 70%, gross margin falls from 40% to 30%.

Gross margin is not the final answer. A company can have a strong gross margin and still lose money if operating expenses are too high. That is why the optional overhead field is included. If gross profit does not cover payroll, rent, software, marketing, and administration, the business model needs either higher volume, better pricing, lower COGS, or lower overhead.

The ratio is also useful for diagnosing mix. Suppose a store sells one product line at 55% gross margin and another at 22%. Total gross margin can fall even when both products keep the same price if more sales shift toward the lower margin line. The same effect appears in services when a high-margin subscription business adds a lower-margin implementation package. A blended result is helpful, but a product-level or channel-level calculation often explains why the blended number moved.

Limitations and tips

The largest judgment call is what belongs in COGS. For a retailer, product cost, inbound freight, packaging, and marketplace fees may belong there. For a manufacturer, direct labor, materials, factory overhead, and scrap may be included. For a service or SaaS business, hosting, implementation labor, customer-support labor tied to delivery, or payment processing may be direct costs. Be consistent so month-to-month comparisons remain meaningful.

Be careful with discounts and refunds. Revenue should normally be net of returns and allowances for the period being analyzed. If refunds are recorded in a later month than the original sale, a short-period gross margin can be noisy. The cure is not to change the formula; it is to align revenue and direct costs with the same accounting period and to review enough history to see the underlying trend.

Do not use gross margin as a cash-flow measure. Inventory purchases, receivable collection, payables timing, capital spending, and debt service can move cash even when gross margin is stable. Use the budget calculator for spending plans, the margin calculator for unit price and markup decisions, and the net profit margin calculator for the bottom-line percentage after all expenses.

Sources

  • AccountingTools, Gross margin — definition, formula, and examples of gross margin analysis.
  • Corporate Finance Institute, Gross Margin Ratio — gross margin interpretation and profitability context.
  • Corporate Finance Institute, Net Profit Margin — distinction between gross margin and bottom-line margin.

Frequently asked questions

What does gross margin measure?
Gross margin measures the share of revenue left after cost of goods sold. It focuses on direct production or service delivery costs, so it helps evaluate pricing, purchasing, fulfillment, discounting, channel mix, and product-level economics before overhead decisions for the period.
What is the gross margin formula?
Gross margin equals revenue minus cost of goods sold, divided by revenue, multiplied by 100. The calculator also shows gross profit in dollars and the COGS ratio, which is cost of goods sold divided by revenue for comparison across products.
What should be included in COGS?
Include costs directly tied to producing or delivering the sale, such as inventory, materials, production labor, inbound freight, packaging, merchant fees, warranties, or usage-based hosting. Do not include general administration unless it directly supports delivery of revenue for customers.
How is gross margin different from net profit margin?
Gross margin stops after cost of goods sold. Net profit margin uses the bottom line after operating expenses, interest, taxes, and other items. Gross margin diagnoses product economics; net margin diagnoses final company profitability after the entire income statement closes.
Why does this calculator include operating expenses?
Operating expenses do not change gross margin in this calculator. They are optional context. Entering them shows whether gross profit is large enough to cover overhead and what remains before interest, taxes, financing costs, and other non-COGS items below.
Can gross margin be negative?
Yes. If cost of goods sold exceeds revenue, gross profit is negative and gross margin falls below zero. That usually means pricing, purchasing, waste, discounts, fulfillment, or cost classification needs urgent review before overhead is even considered seriously by management.

Related calculators

Gross Margin Calculator updated at