Gross Margin Calculator
Calculate GAAP gross profit margin, cost markup, reverse target selling price from COGS, optional operating profit (EBIT), and industry-specific margin benchmarks.
gross profit margin
Profit, Markup & Benchmark Status: $40,000 gross profit · 66.67% markup · Within Retail & E-Commerce range (30–50%)
View breakdown
What the Gross Margin Calculator Measures
The Gross Margin Calculator computes GAAP gross profit margin, cost markup percentage, gross profit per revenue dollar, reverse target selling price from Cost of Goods Sold (COGS), optional operating profit (EBIT), and sector-specific benchmark standing. Switch Calculation Mode between evaluating actual revenue against COGS or solving the exact selling price required to hit a target gross margin, and select your industry sector to benchmark performance accurately.
Confusing markup with gross margin is one of the fastest ways growing companies silently underprice products and squeeze cash flow. On $100,000 in e-commerce sales with $60,000 in direct product costs, gross profit is $40,000—yielding a 40.00% gross margin ($0.40 retained per revenue dollar) alongside a 66.67% cost markup, placing the business squarely inside the 30%–50% Retail & E-Commerce benchmark corridor.
Tracking bottom-line net profitability after overhead, financing interest, and income taxes? Extend your income statement review inside the unit pricing profitability estimator.
Common use cases
- Margin vs. Markup VerificationPrevent pricing errors by viewing gross margin percentage and cost markup side by side on every product or order.
- Reverse Target-Margin PricingSwitch to Find Selling Price from Target Margin to convert wholesale SKU costs into exact retail list prices.
- Industry Benchmark DiagnosticsCompare unit economics against seven GAAP sector ranges—from
15%–30%Wholesale/Grocery up to70%–85%Software & SaaS. - Operating Margin (EBIT) BridgeCheck the opt-in operating expenses box to verify whether gross profit dollars adequately cover SG&A, rent, and marketing overhead.
How Gross Margin, Markup, and Target Selling Price Work
In Revenue & COGS mode, the calculator subtracts direct COGS from net revenue to determine gross profit, then divides by revenue for gross margin and by COGS for markup. In Target Margin mode, it inverts the gross margin formula to solve the exact selling price needed for a given cost and desired margin.
- Calculation Mode (
from_revenueortarget_margin): Toggles dynamically between Net Revenue / Selling Price and Target Gross Margin (%) so you can either audit historical P&L statements or price new inventory. - Cost of Goods Sold (
COGS): Direct wholesale purchase price, raw materials, direct factory labor, or cloud hosting costs directly attributable to delivering each unit sold. - Industry Benchmark Sector: Selects one of seven GAAP benchmark bands (
Retail & E-Commerce,Software & SaaS,Professional Services,Restaurants & Food Service,Manufacturing,Wholesale & Grocery, orGeneral Business). - Operating Expenses (Opt-In Toggle): Unchecked by default (
$0). Checking Include operating expenses for operating margin (EBIT) subtracts SG&A, rent, and marketing to calculate Operating Profit and Operating Margin.
Accounting standards summarized in the U.S. Securities and Exchange Commission (SEC) — Beginners Guide to Financial Statements frame the income statement as a staircase that subtracts direct Cost of Goods Sold from net revenues to yield gross profit before operating expenses.
Testing how a retail price increase or promotional discount affects total customer unit volume and gross profit dollars? Model demand sensitivity in the Price Elasticity Calculator.
How to Calculate Margin or Set Target Prices
Four visible inputs keep routine margin audits and SKU pricing instant, with operating overhead tucked behind one optional checkbox.
- Choose Calculation Mode: Keep Calculate Margin from Revenue & COGS to analyze an existing sale or P&L, or select Find Selling Price from Target Margin to price an item from wholesale cost.
- Enter Revenue (or Target Margin) and COGS: Type your net sales revenue (or desired margin percentage) alongside direct Cost of Goods Sold.
- Select Your Industry Benchmark: Choose the sector closest to your business model (
Retail & E-Commerce,Software & SaaS,Wholesale & Grocery, etc.) for accurate benchmark context. - Include Operating Expenses (Optional): Check Include operating expenses for operating margin (EBIT) to subtract SG&A, rent, and marketing and view Operating Profit and Operating Margin inside View breakdown.
For a SaaS business posting $500,000 in annual recurring revenue, $90,000 in cloud hosting and direct customer support COGS, and $260,000 in R&D and sales operating expenses, the calculator reports an 82.00% gross margin ($410,000 gross profit, 455.56% markup, inside the 70%–85% SaaS benchmark) alongside $150,000 in Operating Profit (30.00% operating margin).
Worked numerical examples
Gross profit $100,000 − $60,000 = $40,000; margin $40,000 ÷ $100,000 = 40.00%; markup $40,000 ÷ $60,000 = 66.67%
Gross profit $410,000 (82.00% margin, 455.56% markup); subtracting $260,000 SG&A leaves $150,000 EBIT
Required price $42.00 ÷ (1 − 0.50) = $84.00; gross profit $42.00; equivalent markup $42.00 ÷ $42.00 = 100.00%
| Business Profile & P&L Inputs | Gross Profit | Gross Margin | Cost Markup | Operating Margin | Sector Benchmark Standing |
|---|---|---|---|---|---|
| Advisory Service ($25k Rev · $0 COGS · $5k OpEx) | $25,000.00 | 100.00% | 0.00% (No COGS) | 80.00% | Above Services (50–70%) |
| Software & SaaS ($500k Rev · $90k COGS · $260k OpEx) | $410,000.00 | 82.00% | 455.56% | 30.00% | Within SaaS (70–85%) |
| Target Pricing ($42 Cost · 50% Target Margin) | $42.00 | 50.00% | 100.00% | 50.00% | Within E-Commerce (30–50%) |
| Retail & E-Commerce ($100k Rev · $60k COGS) | $40,000.00 | 40.00% | 66.67% | 40.00% | Within E-Commerce (30–50%) |
| Wholesale & Grocery ($250k Rev · $195k COGS · $35k OpEx) | $55,000.00 | 22.00% | 28.21% | 8.00% | Within Wholesale (15–30%) |
| Loss Leader ($80k Rev · $92k COGS · $15k OpEx) | -$12,000.00 | -15.00% | -13.04% | -33.75% | Negative margin (below COGS) |
Core Gross Margin & Pricing Concepts
Distinguishing margin ratios from cost markups and overhead allocation prevents silent profit erosion.
The Margin-vs-Markup Conversion Trap
Because markup uses smaller COGS as its denominator while margin uses larger revenue, markup is always higher for any profitable sale. Applying a 30% markup when targeting a 30% gross margin yields only a 23.08% gross margin—losing nearly 7 points of revenue on every invoice.
GAAP Matching Principle for COGS
Under US GAAP, COGS must match the exact revenue period in which goods are delivered. Direct materials, inbound shipping, payment processing, and production labor enter COGS, while office rent, executive payroll, and brand advertising remain in operating expenses.
Gross Profit Dollars as Overhead Fuel
Gross margin percentage alone does not pay fixed bills—gross profit dollars do. A grocery wholesaler running a 22% gross margin on $10 million in sales generates $2.2 million in gross profit to fund warehouse rent and trucks, out-earning a boutique shop running a 60% margin on $400,000 in sales.
Reverse Target-Margin Pricing
Setting prices via Cost ÷ (1 − Margin) protects profitability automatically whenever supplier costs rise. If a supplier increases wholesale cost from $42 to $46, holding a 50% gross margin requires moving retail price from $84 to $92 rather than adding a flat $4.
Why Sector-Benchmarked Margin & Reverse Pricing Tools Save Time
Combining forward margin diagnostics, reverse SKU pricing, and GAAP industry bands turns raw P&L figures into immediate pricing action.
- Two-Way Margin & Pricing Workflow: Audit historical income statements or generate target selling prices from wholesale unit costs in the same workspace.
- Sector-Aware Benchmarks: Evaluates a
22%margin accurately as healthy for Wholesale/Grocery rather than flagging it poorly against software norms. - Clean Zero-COGS & Loss Handling: Computes exact negative margins for loss leaders (
-15.00%) and clean100.00%margins for zero-COGS advisory engagements without errors. - Direct EBIT Bridge: Reveals how much of your gross profit survives fixed SG&A overhead via a single opt-in checkbox.
Sustained gross margin expansion directly lifts EBITDA multiples, which you can test in the small business valuation multiples worksheet.
Factors Affecting Gross Margin Accuracy
Several accounting and operational variables can shift reported gross margins across quarters even when list prices stay flat.
- Returns, Discounts, & Freight Leakage: Always enter net revenue after promotional discounts, customer returns, and allowances, and include inbound shipping and merchant processing fees in COGS if directly tied to order fulfillment.
- Inventory Costing Method (FIFO vs. Weighted Average): During inflationary raw-material cycles, FIFO expenses older, lower-cost inventory first (temporarily boosting gross margin), whereas LIFO or weighted average expenses higher recent costs sooner.
- Product Mix Shifts: Selling a higher share of low-margin entry products or discounted bundles compresses blended company gross margin even when every individual SKU maintains its list price.
### Limitations
Federal reporting rules in IRS Publication 334 — Tax Guide for Small Business (Cost of Goods Sold) define which direct purchases, raw materials, and factory labor belong in Cost of Goods Sold rather than below-the-line operating expenses.
Explore profit margin, pricing elasticity, and break-even tools inside our corporate finance and margin estimators collection.
Frequently asked questions
What is the difference between gross margin and markup?
Gross margin divides gross profit by net revenue (selling price), showing the share of each sales dollar you retain after direct costs. Markup divides gross profit by Cost of Goods Sold (COGS), showing how much you added on top of wholesale or production cost. For a $60 item sold at $100, gross margin is 40% while markup is 66.67%.
How do I calculate the selling price needed for a target gross margin?
Switch Calculation Mode to Find Selling Price from Target Margin and enter your unit COGS and target margin percentage. The calculator applies Selling Price = COGS ÷ (1 − Target Margin). For example, earning a 50% gross margin on a $42 product requires a $84.00 selling price (a 100% markup).
Which costs belong in GAAP Cost of Goods Sold (COGS) versus operating expenses?
Under US GAAP, COGS includes direct raw materials, wholesale inventory purchase cost, direct manufacturing labor, inbound freight, and production overhead tied directly to units sold. Rent for corporate offices, marketing campaigns, sales salaries, and administrative software sit below gross profit as operating expenses (SG&A).
What is a good gross profit margin for my industry?
Healthy margins vary sharply by business model. Software and SaaS businesses typically achieve 70%–85%, professional services 50%–70%, restaurants 60%–70% before labor/rent overhead, retail and e-commerce 30%–50%, manufacturing 25%–45%, and wholesale or grocery distribution 15%–30%.
Why can gross margin never reach 100% if COGS is above zero?
Because gross margin equals (Revenue − COGS) ÷ Revenue, any positive direct cost keeps the numerator strictly smaller than the denominator, capping gross margin below 100%. Only zero-COGS pure advisory or digital licensing revenue achieves a 100% gross margin.
How does gross margin differ from operating margin and net profit margin?
Gross margin measures profitability after direct production costs (COGS) alone. Operating margin (EBIT margin) subtracts SG&A, rent, and marketing overhead—which you can compute by checking Include operating expenses. Net profit margin goes further down the income statement by deducting interest expense and income taxes.