guides·9 min read·

Gross Margin Explained: Formula, Benchmarks, and What It Tells You About a Business

Gross margin measures how much revenue a company keeps after paying the direct costs of producing its product — and it reveals more about pricing power, competitive position, and unit economics than almost any other single metric.


Two companies report $1 billion in revenue. One keeps $750 million after production costs. The other keeps $220 million. That difference — the spread in gross margin — tells you almost everything about the nature of their competitive advantages before you look at a single other number.

Gross margin is the first filter serious investors apply to any business. It measures what a company earns from its core product or service after stripping out only the direct costs of producing it. It has nothing to do with overhead, executive salaries, or marketing budgets. It is the purest signal of whether the product itself is valuable enough — and defensible enough — to justify the price being charged for it.

This guide covers the gross margin formula, what the number reveals about pricing power and unit economics, how it compares to operating and net margin, sector benchmarks that give raw percentages real meaning, the concept of operating leverage, gross margin compression as an early warning signal, and how to use gross margin in competitive analysis.


The Gross Margin Formula

Gross margin is calculated as:

Gross Margin = (Revenue - Cost of Goods Sold) / Revenue

Where cost of goods sold (COGS) includes all direct costs tied to producing the product or delivering the service: raw materials, manufacturing labor, inbound freight, direct packaging, and for software companies, cloud hosting and customer support costs directly tied to service delivery.

Expressed as a percentage:

Gross Margin % = ((Revenue - COGS) / Revenue) x 100

A simple example:

A consumer goods company reports:

  • Revenue: $400 million

  • Cost of goods sold: $260 million

  • Gross profit: $140 million

    Gross Margin = $140M / $400M = 35%

That 35% means the company keeps 35 cents from every dollar of revenue after paying the direct cost of making and delivering its products — before spending a single dollar on sales teams, marketing, R&D, or corporate overhead.

Gross Profit vs Gross Margin

These two terms are often used interchangeably but are not the same thing. Gross profit is the dollar amount left after subtracting COGS from revenue. Gross margin is that dollar amount expressed as a percentage of revenue. Both appear on the income statement. Gross margin is the more useful metric for comparisons across companies of different sizes and across time periods.

Where to Find These Numbers

Revenue and COGS both appear at the top of the income statement, reported quarterly and annually. The gross profit line sits directly below COGS. Financial research platforms — including Equity Rank — surface these figures automatically as part of a stock's profitability breakdown so you can track trends without rebuilding income statements by hand.


What Gross Margin Tells You About a Business

Gross margin is a signal about at least three distinct qualities of a business: pricing power, unit economics, and competitive moat. Understanding which dynamic is driving a particular company's margin is more useful than the number alone.

Pricing Power

A high gross margin means the company charges significantly more than what it costs to produce. That spread only exists if customers perceive enough value in the product to pay a premium over alternatives. Companies with strong brand equity, proprietary technology, or network effects can sustain wide margins because switching costs or perceived differentiation let them hold price.

Companies in commoditized markets — where the product is largely interchangeable with a competitor's offering — compete primarily on price. Their gross margins reflect that race to the floor. Comparing two companies in the same sector: the one with the higher gross margin is usually the one with more durable pricing power. That is not always true, but it is the right starting hypothesis.

Unit Economics

Gross margin is the foundation of unit economics analysis. If a company earns $50 in gross profit on every $100 sale, it has $50 available per unit to cover overhead, R&D, sales, and marketing before generating any operating income. If gross margin is only 15%, the business needs to run much leaner operations — or generate enormous volume — to turn a profit at the operating level.

This is why investors care so deeply about gross margin in early-stage or growth-stage companies that are not yet profitable at the operating level. A SaaS startup burning cash on sales and marketing but running 75% gross margins has a structurally sound product. A hardware startup burning at the same rate but running 20% gross margins faces a much steeper path to profitability — the unit economics do not give the business room to grow into.

Competitive Moat

Durable gross margins — held stable or expanded over a full business cycle including recessions and supply shocks — are one of the clearest observable signals of competitive advantage. When input costs rise, commodity-price-exposed businesses pass some of it to customers and absorb the rest as margin compression. Businesses with genuine moats pass through cost increases more completely, protecting their margin.

Declining gross margins over multiple years, without an explicit strategic explanation, are among the most reliable early indicators of competitive deterioration. The product is getting cheaper to compete with, alternative options are multiplying, or the company is discounting to hold volume. Any of those dynamics deserves investigation before accepting a lower price-to-earnings multiple as sufficient compensation.


Gross Margin vs Operating Margin vs Net Margin

These three metrics form a progression down the income statement. Each one subtracts a broader set of costs and reveals something different about the business.

Gross Margin

Gross Margin = (Revenue - COGS) / Revenue

Measures the profitability of the product or service itself. Excludes all overhead. The ceiling on everything below it — operating margin and net margin will always be lower than gross margin.

Operating Margin

Operating Margin = Operating Income / Revenue

Subtracts all operating expenses from gross profit: research and development, sales and marketing, general and administrative costs. Operating margin measures whether the full business model — not just the product — is profitable. A company with a 70% gross margin can still run at break-even or a loss at the operating level if overhead spending is heavy enough.

Net Margin

Net Margin = Net Income / Revenue

Subtracts interest expense (the cost of carrying debt), income taxes, and any non-operating items from operating income. Net margin reflects the actual bottom-line profitability of the business as a whole, including financing decisions.

The hierarchy always holds:

Gross Margin > Operating Margin > Net Margin

If you ever see these out of order in a data source, the underlying figures are being defined inconsistently or there is a data error. The relationship is not optional — it follows directly from the structure of the income statement.

Which one matters most?

It depends on the question you are answering. Gross margin is the right metric for evaluating product economics and competitive position. Operating margin is the right metric for evaluating cost efficiency and business model quality. Net margin is the right metric for evaluating what shareholders actually earn. All three together tell the full story. Gross margin is usually the best place to start.


Sector Benchmarks: What "Good" Actually Means

A 30% gross margin is outstanding in grocery retail and mediocre in professional software services. Raw percentages only become useful when measured against the right peer group. Here are the typical ranges by sector.

Software / SaaS

  • Typical range: 65% to 80%
  • Best-in-class: 75% to 85%+
  • Software has structurally high gross margins because the marginal cost of delivering an additional unit is near zero — no physical materials, minimal incremental labor. Cloud infrastructure costs and customer success functions are the primary COGS items. Companies at scale often approach 80% gross margins. Below 60% in software typically indicates heavy professional services revenue mixed into the product line, or significant cloud infrastructure costs tied to a compute-intensive product.

Retail (General)

  • Typical range: 25% to 35%
  • Best-in-class (specialty): 40% to 55%
  • Retail margins vary enormously by category. Luxury and specialty retail with strong brand positioning can reach 50%+. Mass-market and discount retail competes structurally on price and runs thinner. The key variable is whether the retailer is selling branded proprietary products (higher margin) or reselling third-party merchandise (lower margin, dependent on supplier pricing power).

Manufacturing / Industrials

  • Typical range: 25% to 40%
  • Best-in-class (specialty/defense): 35% to 55%
  • Manufacturers with proprietary processes, specialized components, or regulated markets command higher gross margins. Commodity manufacturers — steel, basic chemicals, standard agricultural inputs — face structural pressure from input price volatility and interchangeable competition.

Grocery / Food Retail

  • Typical range: 20% to 28%
  • Best-in-class: 26% to 32%
  • Among the tightest gross margins in any sector. Grocery is a volume business with highly substitutable products, intense price competition, and significant shrinkage and waste costs. A 25% gross margin in grocery is healthy. Whole-company profitability depends on extraordinary cost discipline at the operating level.

Pharmaceuticals / Biotech

  • Branded drugs: 65% to 85%+
  • Generics: 30% to 55%
  • Patent-protected branded drugs carry exceptional gross margins because pricing power is near-absolute within the patent window and the marginal cost of manufacturing a pill is a fraction of the price charged. Generic drug manufacturers operate closer to commodity economics once exclusivity expires.

Healthcare Services

  • Typical range: 30% to 50%
  • Wide variation by segment. Outpatient services and ambulatory surgery centers run tighter margins than specialty diagnostics or device companies. Reimbursement rates from insurers and government payers constrain pricing power across the sector.

Restaurants / Food Service

  • Typical range: 25% to 40% (on food and beverage cost alone)
  • Food cost as a percentage of revenue is commonly tracked but does not fully equal gross margin since labor is classified differently depending on accounting methodology. The operational metric most comparable to gross margin in restaurants is "restaurant-level operating margin" after food costs and direct labor.

Operating Leverage: Why Gross Margin Expansion Creates Outsized Profit Growth

Operating leverage is the relationship between a company's fixed costs and variable costs. The higher the proportion of fixed costs in a business, the more sensitive operating income is to changes in revenue. Gross margin is the starting point for understanding that relationship.

A company with 75% gross margins has $75 of gross profit available for every $100 in revenue. If fixed operating costs are $50 million annually and revenue grows from $100 million to $150 million, gross profit grows from $75 million to $112.5 million — and all of that $37.5 million increase flows down to operating income (assuming fixed costs do not change). Operating income went from $25 million to $62.5 million, a 150% increase on a 50% revenue gain.

That amplification effect is operating leverage. It is why high-gross-margin businesses that achieve scale can generate earnings growth that significantly outpaces revenue growth. The underlying mechanism is simple: once fixed costs are covered, each new dollar of revenue at a 75% gross margin generates 75 cents of operating income. At a 25% gross margin, each new dollar of revenue generates 25 cents.

This is also why gross margin sets the upper bound on business quality. A low-gross-margin business cannot offset structural product economics with operational efficiency. You can run a lean operation, but you cannot push operating margin above gross margin. A business with 20% gross margins cannot be a 30% operating margin business — mathematics prevents it.

On Equity Rank, the valuation engine incorporates gross margin trajectory as one of the inputs to normalized earnings power assumptions in DCF and residual income models, because the path to long-run profitability is constrained by the gross margin ceiling.


Gross Margin Compression: A Red Flag Worth Taking Seriously

Gross margin compression — a sustained decline in gross margin percentage over multiple reporting periods — is one of the most reliable early signals of deteriorating business quality. It almost always means one of the following:

Input Cost Inflation Without Pricing Power

When raw materials, components, labor, or logistics costs rise and the company cannot pass those increases to customers without losing volume, gross margins compress. This reveals that the product is more substitutable than a wide margin suggested. Temporary cost spikes affect margins for a quarter or two; persistent compression that does not recover when input costs stabilize indicates structural competitive weakening.

Product Mix Shift to Lower-Margin Revenue

Companies that add new product lines, expand into new markets, or pursue enterprise contracts at discounted prices can see blended gross margins decline even if underlying product economics are healthy. This is not always bad — it can reflect a deliberate strategy to gain market share or enter adjacencies. The question is whether management has disclosed the mix shift and whether the new revenue stream has a credible path to margin expansion over time.

Price Competition Intensifying

When a market becomes more competitive — new entrants, commoditization of a previously differentiated product, platform shifts — gross margins compress because companies cut prices to defend volume. This is often the earliest sign of a moat eroding. Gross margin compression that precedes operating margin compression and then revenue deceleration is the classic three-stage sequence of a competitive position unwinding.

Scaling Problems in Cost Structure

Some businesses discover that their COGS grows nearly as fast as revenue — meaning the product does not get cheaper to deliver at scale in the way the original investment thesis assumed. This is especially common in businesses that claimed to be "software companies" but depend heavily on manual service delivery or high-touch customer support baked into COGS.

Watching gross margin alongside revenue growth is a simple but powerful screen. If a company is growing revenue 30% annually but gross margin is declining by 2 to 3 percentage points per year, the market share being gained is not translating into improved unit economics. That is a question that demands an answer before accepting the growth story at face value.


Gross Margin in Competitive Analysis

The most practical use of gross margin is side-by-side peer comparison within a sector. Here is a structured approach.

Step 1: Identify the Peer Group

Compare companies that serve the same market, have similar product types, and operate under similar cost structures. Comparing a SaaS company's gross margins to a hardware company's gross margins tells you nothing useful. Comparing two SaaS companies targeting the same buyer tells you a great deal.

Step 2: Compare Gross Margin Levels

Which company in the peer group has the highest gross margin? Is the gap meaningful — 5 percentage points or more — or within normal variation? A consistent, durable gross margin advantage is evidence of a differentiated position: better product, stronger brand, lower production costs, or superior supplier relationships.

Step 3: Compare Gross Margin Trends Over Three to Five Years

A company with a declining gross margin but currently high absolute levels is a different investment than a company with a rising gross margin from a lower starting point. Trend often predicts where margin will be in three years better than current level does.

Step 4: Look for Gross Margin Divergence Under Stress

Pull gross margins during the most recent economic contraction or sector disruption. Which companies held margin and which compressed? Companies that held gross margin during demand shocks or input cost spikes have demonstrated pricing power under real-world conditions, not just favorable ones.

Step 5: Ask Whether Gross Margin Differences Explain Valuation Premiums

A company trading at a 35x price-to-earnings multiple while a peer trades at 18x should have a structural explanation. Often, the higher-multiple company is simply running 20 percentage points more gross margin. The market is paying up for better unit economics and higher operating leverage potential — not just growth. Understanding whether that premium is justified by gross margin durability is a core part of valuation discipline.

Equity Rank surfaces gross margin history and peer comparisons automatically as part of each stock's full analysis page, so you can run this comparison without building spreadsheets from scratch.


A Practical Gross Margin Checklist

When evaluating any stock, work through these questions:

  • What is the current gross margin and how does it compare to the five-year average?
  • Is gross margin expanding, stable, or compressing over the trailing three to five years?
  • How does it compare to the closest sector peers?
  • Is the company's gross margin defensible — does the product have switching costs, brand equity, or cost advantages that protect it?
  • Is operating margin expanding or contracting relative to gross margin? (If gross margin holds but operating margin falls, overhead is growing too fast. If gross margin falls, the product economics are changing.)
  • What would happen to gross margin if input costs rose 10%? Could the company pass that through?
  • Has gross margin ever been tested by a competitive shock, and how did it respond?

None of these questions require a finance degree. They require knowing where to look and what to compare.


Summary

Gross margin is the first number to check when evaluating whether a business is actually good — not just big, not just fast-growing, but structurally sound enough to convert revenue into durable profit.

The formula is:

Gross Margin = (Revenue - Cost of Goods Sold) / Revenue

The interpretation requires context: 75% is ordinary for software and extraordinary for retail. Benchmarking against the right peer group, tracking the trend over multiple years, and asking whether the margin is structurally defensible will give you far more signal than the raw number alone.

Gross margin is the ceiling on all profitability below it. Businesses with high gross margins have room to invest heavily in growth, absorb cost shocks, and still deliver strong operating income at scale. Businesses with thin gross margins must execute with near-perfect cost discipline to survive. That structural difference compounds over decades in ways that show up directly in long-run shareholder returns.

When you find a company with gross margin expanding while revenue grows, and the expansion holds across multiple business cycles, you are looking at one of the most reliable signatures of a compounding-quality business. That is the kind of pattern worth spending time on.


Start your 7-day free trial at equity-rank.com to access full gross margin histories, multi-year profitability trends, peer benchmarks, and valuation analysis across 30,000+ stocks — all in one view.

7-day free trial. Cancel anytime. 30-day money-back guarantee on every paid month.

Free Weekly Update

800+ stocks re-scored every week. Delivered free every Sunday.

  • Top 5 most undervalued stocks by margin of safety — with valuation breakdown
  • Biggest score changes from the prior week across 800+ equities
  • Best options setups from the screener (covered calls, cash-secured puts)

No spam. Unsubscribe in one click.

Research and educational purposes only. Not investment advice.

Try Equity Rank

Institutional-depth analysis for every stock in your portfolio.

Equity Rank scores 800+ stocks daily using 19 valuation methods — DCF, Graham Number, EV/FCF, sector multiples, DDM, EPV, Justified P/B, and more — and surfaces the ones trading at a meaningful discount to model fair value.

Start free trial →