Finance & Economics · Corporate Finance & Valuation · Profitability Ratios
Gross Margin Calculator
Calculates gross margin percentage and gross profit from revenue and cost of goods sold (COGS).
Calculator
Formula
Revenue is total sales or net revenue earned during a period. COGS (Cost of Goods Sold) represents the direct costs attributable to the production of goods sold — including materials, direct labour, and manufacturing overhead. Gross Profit equals Revenue minus COGS. Gross Margin % expresses Gross Profit as a percentage of Revenue, showing how much of each dollar of revenue is retained after covering direct production costs.
Source: Generally Accepted Accounting Principles (GAAP); CFA Institute — Financial Statement Analysis, 13th Edition.
How it works
Gross margin measures the proportion of revenue that exceeds the cost of goods sold. COGS includes only the direct costs tied to production — raw materials, direct labour, and manufacturing overhead — and explicitly excludes indirect expenses such as selling, general and administrative (SG&A) costs, interest, or taxes. This distinction makes gross margin a pure measure of production and pricing efficiency, independent of the company's overhead structure or capital decisions.
The formula is straightforward: subtract COGS from Revenue to obtain Gross Profit, then divide Gross Profit by Revenue and multiply by 100 to express it as a percentage. For example, if a company earns $500,000 in revenue and incurs $300,000 in COGS, its Gross Profit is $200,000 and its Gross Margin is 40%. This means 40 cents of every dollar of revenue remains after covering direct production costs. The COGS ratio (COGS ÷ Revenue) is the complement of gross margin and together they always sum to 100%.
Gross margin benchmarks vary significantly by industry. Software and pharmaceutical companies often achieve gross margins above 70–80% because their marginal cost of delivery is very low once the product is developed. Retailers and grocery chains typically operate at 20–35%. Manufacturers sit somewhere in between, often 30–50%. Comparing a company's gross margin against industry peers — and tracking it over time — provides critical insight into whether pricing power is improving, input costs are rising, or product mix is shifting. Investors and analysts use gross margin trends in discounted cash flow (DCF) models, leveraged buyout (LBO) analyses, and comparable company valuations.
Worked example
Consider a mid-sized consumer goods company with the following annual financials:
- Total Revenue: $1,200,000
- Cost of Goods Sold (COGS): $720,000
Step 1 — Calculate Gross Profit:
Gross Profit = Revenue − COGS = $1,200,000 − $720,000 = $480,000
Step 2 — Calculate Gross Margin Percentage:
Gross Margin = ($480,000 ÷ $1,200,000) × 100 = 40.00%
Step 3 — Calculate COGS as % of Revenue:
COGS Ratio = ($720,000 ÷ $1,200,000) × 100 = 60.00%
This means the company retains 40 cents of every dollar of revenue after direct production costs. If the industry average gross margin is 35%, this company is outperforming its peers, suggesting either superior pricing power, lower input costs, or a more premium product mix. With $480,000 in gross profit, the company still needs to cover SG&A expenses, depreciation, interest, and taxes before reaching net income.
Limitations & notes
Gross margin is a powerful but incomplete measure of profitability. It captures only direct production costs and ignores operating expenses such as marketing, rent, salaries for non-production staff, and research and development. A company can have an impressive gross margin of 60% yet still be deeply unprofitable at the operating or net income level if its overhead is excessive. Always analyse gross margin alongside operating margin and net profit margin for a complete picture.
COGS classification varies by company and accounting policy. Some businesses include depreciation of manufacturing equipment in COGS; others report it as a separate line item. This makes direct comparisons between companies from different reporting frameworks potentially misleading. Service businesses often use the term 'Cost of Revenue' rather than COGS, and the boundary between direct and indirect costs can be subjective. Additionally, gross margin does not account for inventory write-downs, returns, or discounts unless they are already reflected in the revenue and COGS figures provided. Always verify the source financial statements before drawing conclusions.
Frequently asked questions
What is a good gross margin percentage?
A 'good' gross margin depends heavily on the industry. Software-as-a-Service (SaaS) companies typically target 70–80%+, consumer goods companies aim for 40–60%, manufacturers often run 30–50%, and grocery retailers may operate as low as 20–25%. Always benchmark gross margin against direct industry peers rather than using a universal target.
What is the difference between gross margin and net profit margin?
Gross margin measures profitability after subtracting only COGS (direct production costs) from revenue. Net profit margin subtracts all expenses — COGS, operating expenses, interest, taxes, and depreciation — from revenue. Gross margin is always equal to or higher than net profit margin. The gap between the two reveals how much overhead and non-production costs the business carries.
Does COGS include employee salaries?
Only salaries directly tied to production are included in COGS — for example, factory floor workers, assembly line staff, or direct service delivery personnel. Salaries for sales teams, executives, administrative staff, and marketing are classified as SG&A (Selling, General & Administrative) expenses, which appear below the gross profit line on the income statement.
How does gross margin relate to markup percentage?
Gross margin and markup are related but different. Gross margin is Gross Profit divided by Revenue, while markup is Gross Profit divided by COGS. For example, if revenue is $100 and COGS is $60, the gross margin is 40% but the markup is 66.7% ($40 ÷ $60). Retailers often think in markup terms when setting prices, while analysts and investors use gross margin to evaluate the income statement.
Can gross margin be negative, and what does it mean?
Yes. A negative gross margin means COGS exceeds revenue — the company is selling products for less than it costs to produce them. This is unsustainable long-term but occasionally occurs in early-stage startups that subsidise growth, in distressed businesses, or during periods of extreme raw material cost spikes that have not yet been passed on to customers through price increases.
Last updated: 2025-01-15 · Formula verified against primary sources.