Gross Margin Calculator
Compute gross margin using GM% = ((Revenue − COGS) / Revenue) × 100. Solve for gross margin, revenue, or COGS. Includes step-by-step math, a live revenue-to-gross-profit breakdown schematic, and companion metrics including markup on cost, gross profit dollars, and industry comparison.
Gross margin measures production efficiency
Gross margin is the percentage of revenue that remains after subtracting the direct costs of producing what was sold — raw materials, direct labor, and manufacturing overhead. It answers: "For each dollar of sales, how many cents are left to pay for operating expenses, interest, taxes, and profit?" A 40% gross margin means the business keeps 40 cents of every sales dollar to cover its operating costs. It is the first and most fundamental profitability measure because it shows whether the core product or service is economically viable before considering overhead.
Gross margin is the ceiling for net margin
Gross margin sets the maximum possible net margin: every other expense (marketing, R&D, sales, admin, interest, taxes) must come out of gross profit. A company with a 20% gross margin cannot have a net margin above 20% — in fact, it will be much lower after operating expenses. This is why high-gross-margin businesses (like software, with 70–90% GM) are so valuable: they have tremendous room to invest in growth, absorb shocks, or generate profit. Low-gross-margin businesses (like grocery, with 20–30% GM) must be extremely disciplined about every other cost just to earn a modest net margin.
GM% vs. markup — same profit, different base
Gross margin and markup both measure the profit on a product, but use different bases. Gross margin divides profit by revenue (the selling price). Markup divides profit by cost (the COGS). A product that costs $60 and sells for $100 has a 40% gross margin ($40 / $100) but a 66.7% markup ($40 / $60). Both are correct; they answer different questions. Margin tells you how much of each sales dollar is profit; markup tells you how much you marked up the cost. Pricing errors often come from confusing the two — a business that wants 40% margin and prices with 40% markup will only achieve a 28.6% margin.
Industry variation is enormous
Gross margin varies dramatically by industry and business model. Software and SaaS companies routinely achieve 70–90% gross margins because the marginal cost of serving an additional customer is near zero. Pharmaceuticals run 60–80% (after the R&D is amortized). Restaurants average 55–65% (food cost only). Retailers run 20–50%. Grocery stores are the lowest at 15–25%. Automobile manufacturers average 15–25%. This variation means gross margin comparisons only make sense within the same industry. A 30% gross margin is disastrous for a SaaS company but excellent for a grocery chain.
How to Use This Calculator
The gross margin formula links revenue and COGS. Pick what you want to compute, and the calculator solves for the remaining quantity.
1. Choose what to solve for
Pick GM%, Revenue, or COGS from the toggle. The calculator rearranges GM% = ((Revenue − COGS) / Revenue) × 100 for whichever variable you choose.
2. Use realistic presets
Presets cover typical values: revenue from $50K to $500M, COGS from $100K to $900K. The default ($1M revenue, $600K COGS) gives a 40% gross margin — typical of a healthy manufacturer or retailer.
3. Include only direct costs in COGS
COGS should include only the costs directly tied to producing what was sold: materials, direct labor, and manufacturing overhead. Do not include sales & marketing, R&D, administration, interest, or taxes — those are operating expenses, and they are subtracted after gross profit.
4. Read the result and verdict
The result card shows gross margin as a percentage. A colour-coded verdict classifies from very low (below 20%) through typical retail, healthy, strong (40–60%), and excellent (above 60%).
5. Check the schematic and chart
The schematic shows revenue as a full bar split into COGS and gross profit, with the margin badge displayed prominently. The chart plots gross margin vs. COGS at the current revenue level.
6. Switch to Advanced for depth
Advanced mode adds an industry benchmark comparison chart, a sensitivity check, and companion metrics including markup on cost, gross profit dollars, and comparison to typical margins for retail, manufacturing, and software.
What This Tool Offers
Built around the standard gross margin formula GM% = ((Revenue − COGS) / Revenue) × 100, one of the most fundamental profitability measures in business analysis.
Three-way solving
Solve for gross margin, revenue, or COGS. The calculator rearranges the formula for whichever variable you choose.
Live revenue breakdown
A visual showing revenue as a full bar, split into COGS and gross profit, with the margin badge displayed prominently.
Margin verdict
Each result is classified from very low (below 20%) through retail-typical, healthy, strong (40–60%), and excellent (above 60%).
Companion metrics
Markup on cost, gross profit dollars, COGS ratio, and comparison to typical industry margins for retail, manufacturing, and software.
Dual comparison charts
Gross margin vs. COGS at fixed revenue, plus an advanced chart comparing the current margin against industry benchmarks.
Reference tables
Typical gross margins by industry, markup-to-margin conversion, and full variable reference table.
Reference Tables & Conversions
Gross margin benchmarks by industry, markup-margin conversion, and interpretation thresholds.
Gross margin interpretation thresholds
Typical Gross Margins by Industry
Long-term average gross margins by sector. Individual companies within an industry can vary widely.
| Industry | Typical Gross Margin | Character | Notes |
|---|
Markup-to-Margin Conversion
How markup on cost translates to margin on revenue. Frequently confused, but critical for pricing.
| Markup on Cost | Gross Margin | Multiplier | Example |
|---|---|---|---|
| 10% | 9.09% | 1.10× | Cost $100 → Price $110 → Gross Profit $10 |
| 20% | 16.67% | 1.20× | Cost $100 → Price $120 → Gross Profit $20 |
| 25% | 20.00% | 1.25× | Cost $100 → Price $125 → Gross Profit $25 |
| 33% | 25.00% | 1.33× | Cost $100 → Price $133 → Gross Profit $33 |
| 50% | 33.33% | 1.50× | Cost $100 → Price $150 → Gross Profit $50 |
| 67% | 40.00% | 1.67× | Cost $100 → Price $167 → Gross Profit $67 |
| 100% | 50.00% | 2.00× | Cost $100 → Price $200 → Gross Profit $100 |
| 150% | 60.00% | 2.50× | Cost $100 → Price $250 → Gross Profit $150 |
| 200% | 66.67% | 3.00× | Cost $100 → Price $300 → Gross Profit $200 |
Variable Reference
| Symbol | Meaning | Typical range | Notes |
|---|---|---|---|
| GM% | Gross margin percentage | 15% – 90% | Gross profit as % of revenue |
| GP | Gross profit dollars | > 0 | Revenue − COGS |
| R | Revenue (sales) | > 0 | Top line |
| COGS | Cost of goods sold | > 0, < R | Direct production costs |
| MK% | Markup on cost | — | GP / COGS × 100 |
| OpEx | Operating expenses | — | SG&A, R&D, marketing |
| NM% | Net profit margin | — | Profit after all expenses |
What Does GM% = ((Revenue − COGS) / Revenue) × 100 Measure?
Gross margin measures how much of each dollar of sales remains after the direct costs of producing what was sold. It is the first and most fundamental measure of profitability because it isolates the economics of the product or service itself, before considering the overhead of running the business. A 40% gross margin means the business keeps 40 cents of every sales dollar to cover sales, marketing, R&D, administration, interest, taxes, and profit. It is a critical metric for evaluating pricing power, production efficiency, and long-term competitive position.
Gross Margin Formula
The defining relationship is:
Rearranged to solve for the other two quantities:
COGS = Revenue × ( 1 − GM% / 100 )
Gross profit dollars (not percentage):
Markup on cost (frequently confused with margin):
Relationship between margin and markup:
Markup% = Margin% / (100% − Margin%) × 100%
Gross Margin Variables
| Symbol | Meaning | Notes |
|---|---|---|
| GM% | Gross margin percentage | Gross profit as % of revenue |
| GP | Gross profit dollars | Revenue minus COGS |
| R | Revenue | Total sales |
| COGS | Cost of goods sold | Direct costs of goods sold |
| MK% | Markup percentage | Gross profit as % of cost, not revenue |
| OpEx | Operating expenses | Overhead costs after COGS |
How Each Variable Affects Gross Margin
Gross margin increases when revenue increases at constant COGS (e.g., through higher prices) or when COGS decreases at constant revenue (e.g., through cost reductions). In practice, sustainable margin improvements come from both levers. Pricing power — the ability to raise prices without losing customers — usually reflects a strong brand, network effects, switching costs, or regulatory protection. Cost reductions come from operational improvements, economies of scale, better supplier terms, or process automation. Businesses that achieve both simultaneously build a "margin moat" that compounds over years and creates enormous shareholder value.
Gross margin is not the same as net profit margin. A company could have an 80% gross margin (great!) but a −5% net margin (losing money) if it spends heavily on R&D and marketing. Conversely, a company with a 25% gross margin could have a 10% net margin if it is extremely lean on operating expenses. Both metrics matter: gross margin tells you about the economics of the product; net margin tells you about the profitability of the overall business. Analyzing both together, along with operating margin (in between), reveals the full cost structure of the business.
Gross Margin Calculation Examples
GM% = ((1,000,000 − 600,000) / 1,000,000) × 100
GM% = (400,000 / 1,000,000) × 100 = 40.00%
Gross profit = $400,000; markup = 400,000 / 600,000 = 66.67%
COGS = 500,000 × (1 − 60/100) = 500,000 × 0.40 = $200,000
Revenue = 650,000 / (1 − 35/100) = 650,000 / 0.65 = $1,000,000
GM% = ((100 − 60) / 100) × 100 = 40.00%
Markup = (100 − 60) / 60 × 100 = 66.67%
Frequently Asked Questions
Gross margin is profit after subtracting only COGS (direct production costs) from revenue. Net margin is profit after subtracting ALL expenses — COGS, operating expenses (SG&A, R&D, marketing), interest, and taxes. Gross margin measures the economics of the product or service itself; net margin measures the profitability of the whole business. A company can have a high gross margin but a low (or negative) net margin if it spends heavily on overhead. This is common in growth-stage tech companies: high gross margin (70%+) but net losses due to massive R&D and sales investment. Both metrics are essential — gross margin shows the ceiling, net margin shows the reality.
Both measure profit, but on different bases. Gross margin = profit / revenue (the selling price). Markup = profit / cost (the COGS). A product that costs $60 and sells for $100 has a 40% gross margin ($40 / $100) but a 66.7% markup ($40 / $60). The two are always linked: margin = markup / (1 + markup) and markup = margin / (1 − margin). Confusing them is a common source of pricing errors. If you want a 40% gross margin and you apply a 40% markup, you will only achieve a 28.6% margin — significantly less profit than intended. Always check which metric you're using in pricing decisions.
It depends entirely on the industry. Software and SaaS companies routinely achieve 70–90% gross margins. Pharmaceuticals average 60–80%. Manufacturing typically runs 30–50%. Restaurants average 55–65% (food cost only). Retailers operate at 20–50%. Grocery stores run 15–25%. Auto manufacturers average 15–25%. So a "good" gross margin is any margin above the industry median. Comparing a software company's 80% margin to a grocery store's 20% margin is meaningless — they have completely different business models, capital requirements, and economics. Always benchmark against industry peers when evaluating whether a specific margin is strong or weak.
Software has essentially zero marginal cost — once the code is written, distributing it to one more customer costs almost nothing (just a bit of server time and bandwidth). This means nearly all revenue from additional customers flows through to gross profit. Contrast that with a restaurant, where every additional meal requires buying more ingredients, paying more labor, and consuming more utilities. This is why software companies are so valuable: high gross margins mean each incremental sale is highly profitable, allowing the company to reinvest in growth (or generate cash for shareholders) without needing to raise prices or scale production costs. The same logic applies to digital content, SaaS, and platform businesses.
COGS includes only the direct costs of producing goods or services sold: raw materials, direct labor (production workers), manufacturing overhead (factory rent, utilities, depreciation on production equipment), and freight-in on raw materials. Operating expenses (OpEx) include everything else: sales & marketing, research & development, general & administrative (executives, finance, HR, legal), depreciation on non-production assets, and (for some companies) distribution costs. The distinction matters because it determines whether a cost reduces gross margin or operating margin. Companies sometimes have flexibility in classification (e.g., shipping costs), so it's worth checking how a specific company defines COGS when comparing margins.
Gross margin and contribution margin measure similar things but differ in what costs are subtracted. Gross margin subtracts only COGS (production costs). Contribution margin subtracts all variable costs — both production variable costs AND variable selling/admin costs (like sales commissions, payment processing fees, and shipping). For a company with mostly fixed costs and few variable operating costs, the two are close. For a company with high sales commissions or transaction fees, contribution margin is more useful for decisions about pricing, product mix, and profitability at the margin. Contribution margin is used primarily for internal management decisions (breakeven analysis, product line decisions); gross margin is the standard reported metric in external financial statements.
There are two fundamental levers: increase revenue per unit (price) or decrease cost per unit (COGS). Raising prices works when the company has pricing power — strong brand, differentiated product, network effects, or high switching costs. Cost reductions come from: negotiating better supplier terms; shifting to lower-cost manufacturing locations; automating production; achieving economies of scale; redesigning products for lower material cost; reducing waste and defects; and improving supply chain efficiency. In practice, the best companies work on both simultaneously — a "margin expansion" strategy that pairs modest price increases with aggressive cost reduction. During inflationary periods, passing cost increases to customers while holding the line on overhead is especially important for protecting margins.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| Gross Margin | Gross margin | % |
| Revenue | Total revenue | currency |
| Cost of Goods Sold | Direct production/service costs | currency |
What it means
Gross margin is the percentage of revenue that exceeds the cost of goods sold (COGS). It reflects how well a company manages its production costs relative to sales. A higher gross margin means more money available for operating expenses and profit. It is used to compare companies within the same industry, to evaluate pricing strategy, and to identify cost control issues. Understanding gross margin is essential for operational analysis and for making pricing and sourcing decisions.
Worked example
Gross Margin – Two Detailed Examples
Real‑World| Parameter | Value |
|---|---|
| Revenue | 500000 |
| COGS | 300000 |
| Parameter | Value |
|---|---|
| Revenue | 1000000 |
| COGS | 650000 |
Common mistakes
- Gross margin: Gross profit divided by revenue – expressed as a percentage.
- Revenue: Total sales.
- Cost of Goods Sold (COGS): Direct costs attributable to production – not including operating expenses.
- Interpretation: Higher gross margin indicates more room to cover operating expenses.
- Industry variance: Gross margins vary significantly – compare to sector averages.
Applications
Gross margin is the percentage of revenue remaining after deducting the cost of goods sold, reflecting the efficiency of production and pricing. It is a key profitability metric for manufacturing, retail, and service companies. By calculating gross margin, managers can assess pricing strategies, cost control, and product mix. A higher gross margin indicates more room for operating expenses and profit. Investors use it to compare companies and to identify trends. This metric is also used in break‑even analysis and in setting contribution margins. Understanding gross margin helps in making decisions about pricing, sourcing, and product development.
- Pricing strategy evaluation and adjustment
- Cost of goods sold management and supplier negotiations
- Product line profitability analysis
- Competitive positioning and industry comparison
- Strategic planning and resource allocation
Related calculators · Corporate Finance
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.