What Is Gross Margin? Formula and How to Calculate It

By Markets & Investing DeskUpdated Nov 10, 2026

Gross Margin
Illustration · Fintrev

Definition

Gross margin is the percentage of net sales a company keeps after subtracting the cost of goods sold, showing what remains to cover operating expenses, interest and taxes.

Key takeaways

  • The formula is net sales minus COGS, divided by net sales, multiplied by 100.
  • A 35% gross margin means $0.35 of each sales dollar remains after paying direct costs.
  • An item costing $60 and selling for $100 has a 40% gross margin but a 66.7% markup.
  • Software and services firms usually show higher gross margins than manufacturers or retailers.

Gross margin is the share of a company’s net sales left after subtracting the cost of goods sold (COGS), expressed as a percentage. It shows how much of each sales dollar the business keeps after paying the direct costs of making or buying what it sells, before operating expenses, interest and taxes. Gross margin is also called gross profit margin.

What Is Gross Margin?

Every sale carries a direct cost: the materials in a product, the labor that assembled it, or the wholesale price a retailer paid for it. What remains after those costs, the gross profit, has to pay for everything else: rent, salaries outside production, marketing, research, interest, taxes and, eventually, dividends to shareholders.

A higher gross margin means more of each sales dollar is available for those other obligations. A falling gross margin means direct costs are taking a larger share of revenue, which squeezes everything below it on the income statement.

How Gross Margin Works

Gross margin uses two lines from the income statement: revenue at the top and cost of goods sold directly beneath it.

Calculating Gross Margin

The gross margin formula is:

Gross margin (%) = (Net sales − COGS) ÷ Net sales × 100

  • Net sales is revenue for the period after deductions such as returns, allowances and discounts.
  • COGS covers the direct costs of producing goods or delivering services: raw materials, direct labor and, in manufacturing, production overhead allocated to inventory. It excludes selling, general and administrative expenses (SG&A).

The formula works for any period, such as a quarter or trailing twelve months, as long as sales and COGS cover the same period.

Interpreting Gross Margin

The percentage reads directly as cents retained per dollar of sales. A 35% gross margin means $0.35 of each dollar remains after direct costs, and $0.65 went to producing or acquiring the goods.

Changes over time carry as much information as the level. A falling gross margin means prices fell relative to costs, input costs rose faster than prices, or the sales mix shifted toward lower-margin products. A rising one can reflect price increases, cheaper sourcing, better production efficiency or a shift toward higher-margin products.

Gross margin can also be negative. That happens when a company sells goods for less than they cost to make, which sometimes occurs with early-stage businesses, clearance sales or commodity producers when prices drop below production costs.

Example of Gross Margin

Hypothetical manufacturer, one year:

  • Gross sales: $520,000
  • Returns and discounts: $20,000
  • Net sales: $500,000
  • COGS: materials $180,000 + direct labor $90,000 + production overhead $30,000 = $300,000

Gross profit = $500,000 − $300,000 = $200,000 Gross margin = $200,000 ÷ $500,000 × 100 = 40%

Now continue down the income statement, assuming $120,000 of operating expenses (sales staff, office rent, marketing) and $30,000 of interest and taxes:

  • Operating income = $200,000 − $120,000 = $80,000, an operating margin of 16%
  • Net income = $80,000 − $30,000 = $50,000, a net margin of 10%

The company keeps 40 cents per sales dollar after direct costs but only 10 cents after everything. Each margin answers a different question about where the money goes.

Why Is Gross Margin Important?

For managers, gross margin shows whether products are priced correctly relative to what they cost. A declining margin may prompt a company to renegotiate with suppliers, find cheaper materials, reduce labor costs per unit or raise prices. Because it isolates production and purchasing, it separates pricing and sourcing problems from overhead problems.

For investors, gross margin helps compare companies in the same industry. A business that consistently earns a higher gross margin than its peers may have pricing power, a stronger brand, lower production costs or a more favorable product mix. A steady decline can signal rising input costs or competitive pressure on prices.

For unit economics, the same calculation applies at smaller scales. A subscription business might compute gross margin per customer: if monthly revenue is $50,000 from 1,000 customers and monthly direct costs are $20,000 (a hypothetical example), gross profit per customer is $30 a month and gross margin is 60%. That per-customer figure is what pays back the cost of acquiring each customer.

Gross Margin vs. Gross Profit

The two terms are often used interchangeably, but they are different figures built from the same inputs.

  • Gross profit is a dollar amount: net sales minus COGS. In the example above, $200,000.
  • Gross margin is a ratio: gross profit divided by net sales. In the example, 40%.

Gross profit tells you the size of the cushion. Gross margin tells you how efficient the business is relative to its sales, which makes it the better tool for comparing companies of different sizes or tracking a company as it grows. A company can increase gross profit while its gross margin falls, for instance by growing sales quickly with discounted prices.

Gross Margin vs. Operating and Net Margin

Gross margin looks only at revenue and COGS. The other margins subtract more costs:

Margin Costs subtracted from net sales What it shows
Gross margin COGS Profitability of production or purchasing
Operating margin COGS + operating expenses (SG&A, R&D, depreciation) Profitability of core operations
Net margin All expenses, including interest and taxes Overall profitability

A company with a high gross margin and a low net margin is spending heavily on things outside production, such as distribution, sales staff, marketing or debt service. A company with a thin gross margin has little room for any of those expenses.

Gross Margin vs. Markup

Markup is calculated on cost, while gross margin is calculated on the selling price. Confusing them leads to pricing errors.

In a hypothetical example, an item costs $60 and sells for $100:

  • Gross margin = ($100 − $60) ÷ $100 = 40%
  • Markup = ($100 − $60) ÷ $60 = 66.7%

To convert, markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup). A retailer that wants a 40% gross margin and applies a 40% markup instead would end up with a margin of about 28.6%.

What Is a Good Gross Margin?

There is no single benchmark, because the answer depends on industry. Services and software businesses generally carry low direct costs relative to revenue and tend to have higher gross margins. Manufacturers and retailers carry substantial COGS (materials, factory labor, purchased inventory), so their gross margins are typically lower. A gross margin that would be weak for a software company could be strong for a grocery chain.

The more useful comparisons are a company against its direct competitors and against its own history. A young company that has not yet broken even may still show a healthy gross margin, because its losses usually come from operating expenses incurred ahead of scale. That is why gross margin is watched closely in early-stage businesses where net income is not yet meaningful.

Limitations of Gross Margin

  • COGS is not defined identically everywhere. Companies make different choices about which costs go into COGS versus operating expenses, such as shipping, certain labor or depreciation. Two companies with similar economics can report different gross margins.
  • Inventory accounting affects COGS. Methods such as FIFO and LIFO assign different costs to the goods sold when prices are changing, which shifts gross margin from one period to another.
  • A single period can be noisy. Seasonal sales, one-time inventory write-downs or a temporary product mix can move the figure without a lasting change in the business.

The Bottom Line

Gross margin matters to managers checking whether prices cover direct costs and to investors comparing companies in the same industry. The most useful readings come from comparing a company with its direct competitors and with its own history, since industry norms vary widely. Because COGS definitions and inventory methods differ, reported gross margins should be compared with care across companies.

About this page

Written by Markets & Investing Desk

The Markets & Investing Desk covers investing guides, the financial dictionary, companies, people, economics and market data.

Published
Last updated

Spotted an error? Tell the editors. This page is general information, not financial advice.