Gross Margin Calculator: Gross Profit Margin and Markup

Work out the gross profit margin on your sales — the share of revenue left once the direct cost of producing what you sold is taken out.

Revenue & Cost
$
Total sales for the period.
$
Direct cost of producing the goods sold — materials and direct labor.
Your estimate $—

Adjust the inputs and select Calculate for a full breakdown.

Compare Common Scenarios

How the numbers shift across typical situations for this calculator:

ScenarioProfit marginMarkupProfit
$250k rev · $150k COGS40.00%66.67%$100,000.00
$100k rev · $40k COGS60.00%150.00%$60,000.00
$500k rev · $460k COGS8.00%8.70%$40,000.00
$75k rev · $90k COGS-20.00%-16.67%-$15,000.00

How This Calculator Works

Enter your total revenue and the cost of goods sold, meaning the direct materials and labor that went into the products. The calculator subtracts cost from revenue to find gross profit, then expresses it two ways: as a margin against revenue, and as a markup against cost. Gross margin is the figure investors and lenders look at first.

The Formula

Profit Margin and Markup

Margin = (Revenue − Cost) / Revenue × 100

Markup = (Revenue − Cost) / Cost × 100 — the same profit measured against cost instead of revenue

Worked Example

A business with $250,000 of revenue and $150,000 of cost of goods sold has $100,000 of gross profit. That is a 40% gross margin — 40 cents of every revenue dollar survives production — and the equivalent of a 66.7% markup on cost.

Key Insight

Gross margin sets the ceiling on every other margin. Operating and net margin can only ever be lower, because they subtract further costs, so a thin gross margin leaves no room for overheads, marketing, or profit.

What counts as COGS — the dividing line that decides everything

Gross margin is only as meaningful as the COGS line below it. The dividing line under U.S. GAAP and IFRS is whether a cost is required to produce the units actually sold. Direct materials, direct labor, and inbound freight are unambiguously in. Outbound shipping (to customer) is technically a selling expense but is widely included in COGS in e-commerce reporting — this practice produces lower headline gross margin than the GAAP-strict treatment, so always check the methodology in benchmarks.

Manufacturing overhead (factory rent, supervisor salaries, depreciation of production equipment) is included under absorption costing — the GAAP-required method for external reporting. Under variable costing (allowed for internal management reporting only), overhead is treated as a period expense and gross margin is structurally higher. When comparing two companies' gross margins, confirm both use absorption costing — variable costing comparisons are misleading.

Service businesses face a harder classification problem. A consulting firm's billable consultant salaries are in COGS; a non-billable consultant on the bench is in SG&A. The distinction matters: a firm that misclassifies bench time as COGS reports a lower gross margin but a healthier operating margin than reality. The IRS publication 535 (Business Expenses) and FASB ASC 330 are the standard references for the boundary.

Sector benchmarks — gross margin varies 10× across industries

Gross margin is not a universal yardstick — it is sector-specific. According to Damodaran's annual dataset of U.S. companies (NYU Stern), median 2024 gross margins range from ~9% in food processing and ~12% in trucking, through ~30% in retail, ~50% in industrials and ~65% in software (packaged), to ~80%+ in pure SaaS and ~85%+ in software-as-a-service with low infrastructure cost. A 40% gross margin is excellent for a grocery chain and disastrous for a SaaS company.

Within sectors, gross margin is one of the strongest predictors of valuation multiples. SaaS companies trading at 8-12× revenue typically maintain ≥75% gross margin; SaaS companies at ≥80% gross margin trade at premium multiples (12-20× revenue) because their cost structure scales gracefully. A SaaS startup with 50% gross margin signals either heavy professional-services exposure (lower margin than pure subscription) or inefficient infrastructure — both reduce valuation per dollar of revenue.

For private-company benchmarking, the SBA's Industry Profiles and the IRS Statistics of Income (SOI) Corporation Returns are the best free U.S. data sources. Pratt's Stats and BizComps provide paid private-company transaction multiples by SIC/NAICS code and include gross margin as a standard line.

Median gross margin by U.S. industry sector (Damodaran 2024)

Reference gross margins from Aswath Damodaran's annual U.S. sector dataset — useful for benchmarking your own gross margin against the right peer group.

SectorMedian gross marginNotes
Software (System & App)~76%Highest sustainable margins; minimal COGS
Pharmaceuticals (Branded)~74%Heavy R&D below the gross profit line
Software (Internet)~63%Infrastructure costs depress margin vs packaged
Beverage (Soft)~55%Brand premium; raw materials commoditized
Healthcare Services~32%Labor-intensive, payer-mix variable
Retail (General)~30%High SKU velocity, low margin per SKU
Food Wholesalers~12%Volume play; thin per-unit margin
Trucking~9%Diesel, labor, and equipment dominate COGS

Always benchmark against the most precise sector match available. Cross-sector gross margin comparison (e.g. SaaS vs trucking) is economically meaningless — it reflects different business models, not different operating quality.

Frequently Asked Questions

What is gross profit margin?

Gross profit margin is gross profit — revenue minus the cost of goods sold — expressed as a percentage of revenue. It shows how efficiently a business turns production cost into sales.

What counts as cost of goods sold?

COGS is the direct cost of producing what you sold: raw materials, components, and direct labor. It excludes overheads such as rent, non-production salaries, and marketing.

How is gross margin different from markup?

Both use the same gross profit. Margin divides it by revenue; markup divides it by cost. Markup is always the larger percentage, which is why the two should never be confused when pricing.

What is a good gross margin?

It varies widely by industry — software can exceed 80%, while grocery retail runs in single digits. Compare against the benchmark margins for your sector rather than a universal target.

Why does gross margin matter so much?

It is the money available to cover every other cost. A business cannot pay overheads or earn a profit out of revenue that has already gone to production, so gross margin caps profitability.

When is this calculator unreliable?

When COGS classification is inconsistent across periods (e.g. shipping cost moved from SG&A to COGS mid-year), when discounting policies have shifted (returns, allowances and chargebacks reduce revenue but may be reported gross or net), or when comparing absorption vs variable costing without adjustment. For sector benchmarking, always use peer companies in the same sub-industry — cross-sector gross margin comparisons are economically meaningless.

References & Authoritative Sources

Related Calculators

Data Sources & Benchmarks

This calculator draws on 3 independent, dated sources.

10.50% Provisional
U.S. manufacturing after-tax profit margin
Quarterly Financial Report — After-Tax Profit Margin, Manufacturing
U.S. Census Bureau · as of March 31, 2026
View source ↗
3.20% Provisional
U.S. retail trade after-tax profit margin
Quarterly Financial Report — After-Tax Profit Margin, Retail Trade
U.S. Census Bureau · as of March 31, 2026
View source ↗
3.10% Provisional
U.S. inflation, 12-month change
Consumer Price Index for All Urban Consumers — All Items, 12-Month Change
U.S. Bureau of Labor Statistics · as of April 30, 2026
View source ↗

Methodology & Review

Ugo Candido ✓ Editor
Founder & Editor-in-Chief at CalcDomain — responsible for the methodology, sourcing, and technical review of this calculator.

Gross margin equals (revenue − cost of goods sold) divided by revenue, expressed as a percentage. The calculator works at any granularity — single unit, single transaction, monthly P&L, annual P&L — provided revenue and COGS are measured over the same period and at the same level. COGS includes only the costs directly attributable to producing the goods or services sold: materials, direct labor, freight-in, and manufacturing overhead under absorption costing. It excludes selling, general and administrative (SG&A), research and development, depreciation of non-production assets, and interest. Mis-classifying any of these inflates or deflates gross margin without changing the underlying economics — a common error in startup financial modelling. RELIABILITY: Reliable for a stable product mix with consistent cost classification across periods. Less reliable when discounting policies change mid-period, when freight or returns processing is treated inconsistently, or when service businesses include or exclude billable labor in COGS in different reports.

Updated