Updated March 16, 2026

Gross Margin Calculator

Gross margin is the percentage of revenue left after subtracting the cost of goods sold (COGS). The formula is (Revenue - COGS) / Revenue x 100. Enter your numbers below to see your gross margin, gross profit, and how you compare to industry benchmarks.

$
$

Key Takeaways

  • Gross margin measures what you keep from each dollar of revenue after direct production costs.
  • The formula is (Revenue - COGS) / Revenue x 100. A $500K business with $175K COGS has a 65% gross margin.
  • Healthy margins vary by industry: SaaS averages 70-85%, retail 25-40%, manufacturing 20-35%.
  • Gross margin and markup are not the same. A 50% margin equals a 100% markup.
  • Track gross margin monthly. A declining trend signals pricing pressure or rising input costs.

What Is Gross Margin?

Gross margin is the percentage of revenue that remains after subtracting the cost of goods sold (COGS). It measures how efficiently a business turns revenue into profit at the production level, before accounting for operating expenses like rent, salaries, and marketing.

The formula is: Gross Margin = ((Revenue - COGS) / Revenue) x 100

COGS includes direct costs tied to producing your product or delivering your service: raw materials, direct labor, manufacturing overhead, and shipping to your warehouse. It does not include sales commissions, office rent, or executive salaries.

A B2B SaaS company with $2M in annual revenue and $400K in hosting, infrastructure, and support costs has a gross margin of 80%. That means 80 cents of every dollar goes toward operating expenses and profit.

Gross Margin Benchmarks by Industry

Gross margin varies widely by industry because different business models have different cost structures. A software company has near-zero marginal cost per customer, while a manufacturer pays for raw materials on every unit. Use the table below to benchmark your margin against your industry.

Industry Typical Gross Margin Notes
Software / SaaS70-85%Low marginal cost. Hosting and support are primary COGS.
Professional Services40-60%Labor-intensive. Utilization rate is the key driver.
Healthcare / Pharma60-75%High R&D is operating expense, not COGS.
Financial Services50-70%Varies by product type (insurance vs lending vs advisory).
E-commerce25-55%Wide range depending on private label vs resale.
Retail (General)25-40%Grocery runs 20-30%, apparel 45-55%.
Manufacturing20-35%Raw materials and direct labor dominate COGS.
Food & Beverage25-45%Branded products higher than commodity ingredients.
Restaurants55-68%Food cost target is 28-35% of revenue.
Construction15-25%Materials and subcontractor costs are high.
Distribution / Wholesale15-30%Low margin, high volume model.
Automotive8-18%Thin margins; volume and financing drive profit.

Source: NYU Stern (Damodaran), compiled from public company filings. Margins for private companies may differ.

How to Calculate Gross Margin

The gross margin formula has two variables: revenue and cost of goods sold.

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

Worked example: A mid-size e-commerce company generates $850,000 in quarterly revenue. Their COGS (product cost, freight to warehouse, packaging) totals $340,000.

  • Gross Profit = $850,000 - $340,000 = $510,000
  • Gross Margin = ($510,000 / $850,000) x 100 = 60%
  • Markup = ($510,000 / $340,000) x 100 = 150%

This means the company keeps $0.60 of every revenue dollar after direct costs. The remaining 60% covers operating expenses (marketing, salaries, rent) and profit.

Gross Margin vs Markup

Margin and markup measure the same profit from different angles. Margin uses revenue as the base. Markup uses cost as the base. They are not interchangeable.

Cost Selling Price Profit Gross Margin Markup
$40$100$6060%150%
$50$100$5050%100%
$70$100$3030%42.9%
$80$100$2020%25%

The quick conversion: Margin = Markup / (1 + Markup). A 100% markup always equals a 50% margin. A 50% markup equals a 33.3% margin.

Why Gross Margin Matters

Gross margin is one of the first numbers investors, lenders, and acquirers look at because it reveals how much room a business has to cover operating costs and generate profit.

Pricing power. A high gross margin means the market values your product well above its production cost. This signals strong brand, differentiation, or switching costs.

Scalability. Businesses with high gross margins (like software) can grow revenue without proportionally growing costs. Businesses with low gross margins (like distribution) need high volume to generate meaningful profit.

Early warning system. Declining gross margin over time signals trouble: rising input costs, pricing pressure from competitors, or a shift toward lower-margin products. Catching this trend early gives you time to adjust pricing or renegotiate supplier terms.

A Series A SaaS company presenting to investors with a 72% gross margin and expanding trend will get a very different reception than one at 55% and declining. The margin tells the story of unit economics before anything else.

How to Improve Gross Margin

There are two paths: increase revenue per unit or decrease cost per unit. Most businesses have more room on the cost side than they think.

1. Renegotiate supplier contracts. Request volume discounts, longer payment terms, or rebates. Even a 3-5% reduction in materials cost drops directly to gross profit.

2. Raise prices strategically. Test price increases on new customers or lower-volume products first. Many businesses underprice because they anchor to competitors rather than the value they deliver.

3. Reduce waste and defects. In manufacturing and food service, waste directly inflates COGS. Track waste as a percentage of materials purchased and set reduction targets.

4. Shift product mix toward higher-margin items. If you sell both products and services, calculate the gross margin on each. Promote and prioritize the higher-margin lines.

5. Automate production steps. Replacing manual processes with automation reduces direct labor cost per unit. The upfront investment is a capital expense, not COGS, so it improves gross margin immediately.

This calculator provides estimates for informational purposes only. It does not constitute financial advice. Actual results depend on your specific business circumstances, industry, and market conditions. Consult a qualified financial advisor or accountant before making financial decisions.


Related Calculators

Frequently Asked Questions

What is a good gross margin?

A good gross margin depends on your industry. SaaS companies typically target 70-85%, retail businesses 25-40%, and manufacturing 20-35%. Compare your margin against your specific industry, not a universal standard. A 30% margin is strong for a distributor but weak for a software company.

What is the difference between gross margin and net margin?

Gross margin only subtracts the cost of goods sold (COGS), which includes direct production costs like materials and labor. Net margin subtracts all expenses: COGS plus operating costs, taxes, interest, and overhead. Gross margin shows production efficiency. Net margin shows overall profitability.

What is the difference between gross margin and markup?

Gross margin is profit as a percentage of revenue (selling price). Markup is profit as a percentage of cost. A product that costs $40 and sells for $100 has a 60% gross margin but a 150% markup. They measure the same profit from different reference points.

Can gross margin be negative?

Yes. Negative gross margin means your COGS exceeds your revenue, so you lose money on every sale before operating expenses. This sometimes happens during aggressive growth phases (e.g., selling below cost to acquire market share) but is not sustainable long-term.

How often should I track gross margin?

Track gross margin monthly at minimum. Review it quarterly against industry benchmarks and your own trend line. Sudden drops may signal supplier price increases, production inefficiencies, or pricing pressure from competitors. Seasonal businesses should compare year-over-year rather than month-over-month.

How do I improve gross margin?

The two paths are increasing prices or reducing COGS. On the pricing side: raise prices, bundle products, or shift to higher-margin offerings. On the cost side: negotiate with suppliers, reduce waste, improve production efficiency, or automate manual steps. Most businesses see the fastest improvement from renegotiating supplier contracts.

Does gross margin include labor costs?

It depends on the type of labor. Direct labor (factory workers, production staff) is typically included in COGS and reduces gross margin. Indirect labor (sales, admin, management) is an operating expense and only affects net margin. How you classify labor costs should match your accounting standards.