Gross margin

Also called gross profit margin.

Metrics and finance8min readGross margin calculator

Gross margin is the percentage of revenue left after subtracting cost of goods sold or cost of revenue. It shows how much of each sales dollar remains to cover operating expenses, interest and taxes, and eventually produce profit.

Some financial statements use "gross margin" for the dollar amount left over. On this page, gross margin means the percentage, and gross profit means the dollar amount.

Key takeaways

  • A 70% gross margin leaves $0.70 of every revenue dollar after delivery or production costs. That money still has to cover the rest of the business.
  • The formula is (Revenue - Cost of goods sold) / Revenue × 100.
  • Gross margin is not net profit margin. A company can have a high gross margin and still lose money.
  • Compare the costs included, not just the percentages. Excluding hosting or delivery staff can make a software company's margin look better without improving its economics.
  • For a startup, gross margin helps show how much revenue is needed to cover operating expenses. It does not calculate cash runway.

How to calculate gross margin

Start with revenue and cost of goods sold, often abbreviated COGS, for the same period. Service and software businesses often call the second figure cost of revenue.

Gross profit = Revenue - COGS

Gross margin (%) = Gross profit / Revenue × 100

For example, $100 of revenue minus $70 of COGS produces $30 of gross profit:

$30 / $100 × 100 = 30% gross margin

Use recognized revenue, after applicable returns and discounts, rather than orders placed or cash collected. A subscription business might collect a year's payment upfront but recognize that revenue over the service period. Mixing upfront collections with one month's delivery costs produces a misleading percentage.

The SEC's guide to financial statements separates gross profit from the operating expenses deducted later to reach operating income.[1]

What belongs in cost of goods sold?

The answer depends on what the business sells and how it accounts for production or service delivery.

BusinessCosts that commonly belong in COGS or cost of revenue
RetailerPurchase cost of inventory sold and applicable freight-in costs
ManufacturerMaterials, production labor and allocated manufacturing overhead
Professional services firmDelivery staff and subcontractors who perform customer work
Software companyProduction hosting, third-party services used to deliver the product, and applicable delivery or support personnel

COGS is not simply "all variable costs." A factory's allocated overhead can include fixed costs. A software company's delivery team can also be a fixed monthly expense.

Conversely, costs such as sales commissions can vary with revenue without belonging in cost of revenue. Sales and marketing, general administration, and product research are usually operating expenses below gross profit.

Customer support and customer success deserve particular attention in software businesses. Staff who resolve product issues and staff who sell renewals may perform different functions. Classify costs according to the work performed and the accounting policy, not whichever presentation produces the highest margin.

For internal management, a more detailed calculation can help. Just reconcile it to the financial statements and label any adjustments.

Why $100,000 of sales can still lose money

A software startup records $100,000 of monthly revenue. Its delivery costs are:

  • Production hosting: $18,000
  • Third-party services used by customers: $6,000
  • Delivery and support staff: $6,000

Total cost of revenue is $30,000. Gross profit is therefore:

$100,000 - $30,000 = $70,000

$70,000 / $100,000 × 100 = 70% gross margin

The company also has $90,000 of monthly operating expenses. The table compares its current position with two possible changes. Operating expenses stay fixed over the illustrated range; in the doubled-sales case, delivery costs also double. There are no interest, tax or other items.

Monthly resultCurrent businessSales and delivery costs doubleUsage costs rise without a price increase
Revenue$100,000$200,000$100,000
Cost of revenue$30,000$60,000$50,000
Gross profit$70,000$140,000$50,000
Gross margin70%70%50%
Operating expenses$90,000$90,000$90,000
Operating profit or loss-$20,000$50,000-$40,000

Two points matter for a founder.

First, revenue growth does not automatically improve gross margin. Doubling revenue and delivery costs leaves the percentage unchanged, but produces enough gross profit to cover operating expenses.

Second, usage can grow faster than revenue. If customers consume more computing resources under an unchanged subscription price, the business can become less profitable even while customer activity looks healthy.

The operating break-even calculation makes the difference concrete:

  • At 70% gross margin: $90,000 / 0.70 ≈ $128,571 of monthly revenue.
  • At 50% gross margin: $90,000 / 0.50 = $180,000 of monthly revenue.

This calculation holds the margin and operating expenses constant. It is a planning shortcut, not a forecast. Operating losses are also not the same as cash burn: customer prepayments, receivables and capital spending affect cash separately.

What the financial statement says

Microsoft's fiscal 2024 Form 10-K presents revenue, then cost of revenue, then a dollar subtotal labeled gross margin. Research and development, sales and marketing, and general and administrative expenses appear below that subtotal before operating income.[2]

That layout shows where the boundary sits. Gross margin measures what remains after the costs classified as producing or delivering revenue. It does not deduct the company's entire cost base.

It also explains the terminology trap: Microsoft's gross margin line is a dollar amount. To compare it with a startup's percentage, divide that subtotal by revenue.

When reviewing a spreadsheet or financial statement, check:

  • Whether the figure is dollars or a percentage.
  • Which costs sit above the gross profit subtotal.
  • Whether the classification changed between periods.

What is a normal gross margin?

There is no useful universal target across all businesses. A retailer that buys and resells goods has a different cost structure from a software business.

These public-company figures show the range, not targets for an early-stage startup. Dollar figures are in millions.

Fiscal 2024 disclosureRevenue usedCost of sales or revenueCalculated gross margin
Microsoft$245,122$74,11469.8%
Costco merchandise sales$249,625$222,35810.92%

Sources: Microsoft and Costco fiscal 2024 annual reports.[2][3] Costco's calculation uses net merchandise sales and merchandise costs; it excludes membership fee revenue. The percentages are not directly comparable measures of the entire businesses.

For your company, the better comparison is with businesses that sell a similar product, serve similar customers and classify costs similarly.

Question these situations:

  • A margin improves because expenses moved below gross profit, rather than because prices or delivery economics improved.
  • A forecast assumes supplier discounts that have not been negotiated.
  • A blended percentage hides a low-margin service business inside a higher-margin software business.
  • Gross margin is negative, but the growth plan does not explain how pricing, costs or capacity use will change.

A negative gross margin means total cost of revenue exceeds revenue. It does not necessarily mean every additional sale loses money, because cost of revenue can contain fixed costs. But it does require a specific explanation.

What founders should show investors

Present gross margin alongside revenue growth, not as a substitute for it. Investors need to understand both how fast sales are growing and how much of those sales remains to fund the company.

A useful presentation includes the historical percentage, its trend and a short explanation of cost of revenue. If software subscriptions and implementation services have different economics, show them separately as well as together.

For a forecast, identify the mechanism behind any improvement: a price increase, lower infrastructure cost per customer, a different product mix or better use of delivery capacity. Separate savings already secured from savings that depend on future scale.

Gross margin versus markup

Gross margin uses revenue as the denominator. Markup uses cost. Confusing them can lead to underpricing.

For an item that costs $70 and sells for $100:

MeasureCalculationResult
Gross margin($100 - $70) / $100 × 10030%
Markup($100 - $70) / $70 × 10042.9%

To price an item for a target gross margin:

Selling price = Cost / (1 - Target gross margin)

A $70 item needs a $100 selling price for a 30% gross margin: $70 / 0.70 = $100.

Contribution margin is different again. It subtracts variable costs rather than accounting cost of sales. The two measures differ when cost of sales includes fixed production costs or variable selling costs sit below gross profit.

Questions people ask

What does a 20% gross margin mean?

For every $100 of revenue, $80 goes to cost of goods sold and $20 remains as gross profit. Operating expenses still come out of that $20, so a 20% gross margin does not mean the company keeps 20% as net profit.

What is meant by gross margin?

Gross margin measures the share of revenue left after production or delivery costs. It helps show whether pricing and delivery economics leave enough money to support the rest of the business. Check whether the source uses the term for a percentage or a dollar subtotal.

What does a 70% gross margin mean?

The business retains $70 of gross profit from every $100 of revenue after $30 of cost of revenue. That can leave substantial room for operating expenses, but it does not prove profitability. A company spending more than that $70 on other expenses still loses money.

Is 30% gross margin good?

It depends on the business model and operating cost base. At 30%, $100,000 of revenue produces $30,000 of gross profit. If operating expenses are $40,000, the operating loss is $10,000. Compare similar businesses and cost classifications before judging the percentage.

Related terms

Sources

  1. U.S. Securities and Exchange Commission, "Beginners' Guide to Financial Statements," February 5, 2007.
  2. Microsoft Corporation, "2024 Annual Report," Form 10-K for the fiscal year ended June 30, 2024.
  3. Costco Wholesale Corporation, "2024 Annual Report," Form 10-K for the fiscal year ended September 1, 2024.