Gross Profit Margin Calculator
Calculate gross profit margin — the percentage of revenue left after deducting the direct cost of producing the goods or services sold. Use it to evaluate product pricing, compare profitability across product lines, and benchmark against industry norms.
About this calculator
The formula is: gross profit margin = (revenue − cost of goods sold) ÷ revenue × 100. The numerator is gross profit, the dollars left after paying for materials, direct labor, and other directly variable production costs; dividing by revenue expresses it as a percentage. Gross margin is the first profitability checkpoint on the income statement — anything earned beyond this line has to cover operating expenses, interest, and taxes before becoming net profit. COGS scope is the source of most disagreement: at minimum it includes raw materials and direct production labor; many businesses also include shipping inbound, packaging, and direct production overhead, but exclude SG&A, marketing, R&D, and corporate overhead. The formula breaks at zero revenue (division by zero); negative gross profit (COGS exceeds revenue) produces a negative margin, meaning every sale loses money before any other costs are even considered. Typical gross margins vary enormously by industry: software/SaaS 70–90%, pharmaceuticals 70–80%, consumer-packaged goods 40–60%, apparel 50–65%, restaurants 60–70% on food, automotive 10–20%, supermarkets 20–30%, commodity wholesale 5–15%. A high gross margin gives a business room to spend on growth, R&D, and marketing while still ending the year in profit; a low margin leaves the business one cost-shock or price war away from operating losses. This metric is gross only — for the full profitability picture, also look at operating margin and net margin.
How to use
Example 1 — DTC apparel brand. Annual revenue is $4,200,000 and COGS (fabric, manufacturing, packaging, inbound shipping) totals $1,680,000. Enter 4200000 for Revenue and 1680000 for COGS. Result: 60.0%. Verify: (4,200,000 − 1,680,000) / 4,200,000 × 100 = 2,520,000 / 4,200,000 × 100 = 60.0. ✓ A 60% gross margin is healthy for DTC apparel — leaves $2.52M to fund marketing, customer acquisition, returns, and overhead before producing net profit. Example 2 — Grocery chain. Revenue is $850,000,000 and COGS (cost of goods purchased for resale, plus inbound logistics) is $663,000,000. Enter 850000000 and 663000000. Result: 22.0%. Verify: (850M − 663M) / 850M × 100 = 187 / 850 × 100 ≈ 22.0%. ✓ A 22% gross margin is typical for supermarket retailers, and operational efficiency (inventory turns, store labor, shrink) determines whether the business is profitable at the operating level — there is very little buffer for waste at this margin level.
Frequently asked questions
What is the difference between gross profit margin and net profit margin?
Gross margin only subtracts the cost of goods sold from revenue, while net margin subtracts everything: COGS, operating expenses (SG&A, R&D, marketing, rent), interest expense, and taxes. Gross margin tells you whether the product itself is profitable; net margin tells you whether the entire business is profitable after all costs. A company can have a 70% gross margin and still lose money at the net level if it overspends on growth — many high-growth SaaS startups operate that way deliberately. Conversely, a company with a 20% gross margin (like a supermarket) can have a healthy 2–4% net margin if operating expenses are tightly controlled. Both metrics matter, and the trajectory of gross margin over time often signals competitive pressure or pricing power before it shows up in net margin.
What is a good gross profit margin?
The answer is almost entirely industry-dependent. Software and digital services routinely achieve 70–90% gross margins because the marginal cost of an additional user is near zero. Pharmaceuticals run 70–80% on patented drugs and far lower on generics. Apparel and consumer-packaged goods typically run 40–60%, with luxury brands at the high end. Grocery retail operates on 20–30%, automotive at 10–20%, and commodity wholesale at 5–15%. Below your industry median, your business is exposed to margin pressure and competitive risk; above it, you typically have either pricing power, operational excellence, or a differentiated product. Compare to publicly traded competitors' 10-K filings or industry benchmark databases (NYU Damodaran, BizMiner, IBISWorld) rather than relying on a generic "good" number.
What should I include in cost of goods sold?
COGS includes all costs directly tied to producing the goods or services sold during the period — raw materials, direct labor, manufacturing supplies, freight inbound, and direct overhead that scales with production volume. It excludes selling, general, and administrative expenses (SG&A), marketing and advertising spend, research and development costs, corporate overhead, depreciation of office buildings, and interest and tax expenses. Service businesses sometimes lack a clean COGS line and report "cost of revenue" instead, which typically includes direct service-delivery labor and infrastructure. Be consistent in what you include — switching COGS scope between periods makes gross margin trends meaningless. For SaaS specifically, COGS usually includes hosting/infrastructure costs, customer support, and the portion of engineering directly tied to service delivery, but excludes R&D for new features.
What are the most common mistakes when calculating gross profit margin?
The biggest is misclassifying costs — putting variable costs above the line as COGS when they belong below as operating expenses, or vice versa, distorts the margin. The second is comparing margins across products with different cost structures without acknowledging the differences; a 40% margin on a fast-moving SKU may produce more dollar profit than a 70% margin on a slow seller. The third is averaging margins instead of computing a weighted average — a 60% margin on a tiny product line and a 30% margin on a huge one do not average to 45% in any meaningful sense. The fourth is calculating margin on gross revenue when net revenue (after returns, discounts, chargebacks) is the right denominator. Finally, people focus on margin percentage and forget you can't bank percentages — a high-margin business doing tiny revenue can be less profitable in dollars than a thin-margin business doing huge revenue.
When should I not use this calculator?
Skip it for service businesses where "cost of goods" is ambiguous — a consulting firm's "cost" is mostly labor, which is partially fixed and partially variable, and gross margin loses meaning when the entire business runs on people. It is the wrong tool when you need operating or net margin instead — for those, subtract additional cost layers before dividing. Do not use it for businesses with significant returns, discounts, or rebates without first computing net revenue (gross revenue minus returns/discounts). It is also misleading for SaaS or subscription businesses where the relevant unit-economics metric is contribution margin per customer over their lifetime (LTV minus CAC), not gross margin on a single transaction. For competitive benchmarking, compare against industry averages from databases like NYU Damodaran or your industry's 10-K filings, not against an abstract "good" number.