Talk to a CFO
Eightx Talk to a CFO
← All Guides

Guide · Margins & Unit Economics

How to Calculate Gross Margin (Formula, DTC and Public-Company Benchmarks, and a Calculator)

· 14 min read

Gross margin is the easiest margin to fix because it's the one a founder controls most directly. The two levers (price and product cost) sit on the founder's desk, not the marketer's or the ops team's. And yet most ecom brands we audit are running with a gross margin number that's 3-8 percentage points wrong, usually because inbound freight is in the wrong bucket, or because the cost on the Shopify variant hasn't been updated in eighteen months. This page is the fractional-CFO version of gross margin: the formula, vertical benchmarks from 35 DTC brands and the leading public comparables (Allbirds, Warby Parker, Olaplex, e.l.f. Beauty), channel-specific math for Shopify and Amazon and wholesale, the seven levers that actually move it, and a free calculator. If you only fix one margin layer this quarter, this is the one with the highest dollar return per hour of work.

Gross margin is the only layer of margin where the founder controls both inputs. Pricing and product cost both sit on your desk. Most brands leave 3-8 percentage points on the table because they never audit either one.

What is gross margin?

Gross margin is the dollar amount (or percentage) that's left of revenue after subtracting the cost of the goods sold. The "cost of goods sold" (COGS) is what you paid to produce or acquire the product, plus the cost to land it in your warehouse: supplier invoice, inbound freight, duties, and any inspection or quality-control cost tied to that shipment.

Everything else (fulfillment, outbound shipping, payment fees, returns, marketing, rent, salaries) sits below gross margin. Gross margin is the first cut at "does this product economics work." It's the most important number on the income statement that you can move with a decision the founder gets to make alone, without having to coordinate a marketing or operations change.

The gross margin formula

The gross margin formula has two forms: dollars and percent. Use both.

Plain English: revenue minus the cost of the products you sold.

Dollar form: Gross Profit ($) = Revenue - COGS

Percent form: Gross Margin (%) = (Revenue - COGS) ÷ Revenue

Per-unit form: Unit Gross Margin = Selling Price - Unit Cost

A brand with $10M revenue and $4M COGS has $6M of gross profit and a 60% gross margin. A SKU that sells for $89 and costs $24 has $65 of gross profit and a 73% unit gross margin. Both numbers describe the same thing at different granularities. SKU-level for sourcing and pricing decisions; brand-level for benchmarking and reporting.

Gross margin ratio (percentage)

The gross margin ratio is gross profit divided by revenue, expressed as a percentage. It's the scale-independent version of the metric. A 70% gross margin on a $50 product and a 70% gross margin on a $500 product describe identical efficiency at different scales. Compare percentages across SKUs and brands; use absolute dollars when you're sizing the contribution to fixed costs.

For multi-SKU rollups, weight by units sold: Blended GM% = SUMPRODUCT(unit margins, units) / SUMPRODUCT(prices, units). A simple average of SKU margins overstates the blended margin if your low-margin SKUs sell the most volume, which is the normal case.

Gross margin vs contribution margin

Gross margin and contribution margin are often used interchangeably and they shouldn't be. The difference is what you subtract from revenue.

Cost lineIn Gross Margin?In CM2?In CM3?
Product COGSYesYesYes
Inbound freight + dutiesYes (under GAAP)YesYes
Pick-pack-ship (3PL)SometimesYesYes
Outbound shippingRarelyYesYes
Payment processing feesNeverYesYes
Returns reserveRarelyYesYes
Variable marketing / CACNeverNoYes

Gross margin is the right metric for product-cost decisions (sourcing, pricing, supplier negotiation). It's the wrong metric for whole-business operating decisions because it leaves out variable fulfillment, payment fees, and marketing, which together can be 20-30 points of margin in DTC. A brand with a 60% gross margin can easily have a 30% CM3, and the gap is the difference between thinking the business works and actually knowing. For the full ladder, see our contribution margin guide.

Gross margin vs net profit margin

Net profit margin is net income divided by revenue. It's revenue minus all costs (variable + fixed + interest + taxes). Gross margin sits at the top of the P&L; net margin sits at the bottom.

MetricNumeratorWhat it tells you
Gross marginRevenue - COGSDoes the product economics work?
Contribution margin (CM2)Revenue - COGS - operational variable costsDo the order economics work?
Operating marginOperating income / RevenueDoes the whole business work before financing and tax?
Net profit marginNet income / RevenueWhat's left after everything?

Gross margin is the upstream signal; net margin is the downstream score. A brand with strong gross margin can still be unprofitable at the net line if fixed costs are too high. A brand with weak gross margin will never be profitable no matter how much it scales, because no amount of revenue covers a thin product margin once you stack everything else on top.

Gross margin vs operating margin

Operating margin is operating income (gross profit minus operating expenses) divided by revenue. The gap between gross margin and operating margin is where the operating expense base lives: marketing, salaries, rent, software, and depreciation.

For DTC, the typical 2026 gap between gross margin and operating margin runs 30 to 55 percentage points for scaling brands and 20 to 40 percentage points for mature, profitable brands. A brand with a 60% gross margin and a 5% operating margin has a 55-point gap; that's the cost base. A brand with a 60% gross margin and a 25% operating margin has a 35-point gap; that's a more disciplined cost base or higher operating leverage. We've tracked this gap across public DTC companies in our gross vs operating margin gap analysis — it's the cleanest single read on how lean a public company actually runs.

Gross margin vs markup (and why operators confuse them)

Margin and markup measure the same dollar gap (selling price minus cost) but use different denominators. Margin uses the selling price; markup uses the cost. A product that costs $40 and sells for $100 has $60 of gross profit, which is a 60% gross margin ($60 / $100) but a 150% markup ($60 / $40).

The conversion formulas if you're moving between them:

  • Margin = Markup / (1 + Markup). A 100% markup becomes a 50% margin.
  • Markup = Margin / (1 - Margin). A 60% margin becomes a 150% markup.

The cheat sheet most operators end up memorising:

MarkupEquivalent gross margin
50%33%
67%40%
100%50%
150%60%
200%67%
300%75%

Why this matters in real conversations. When a supplier says "I'll give you a 50% margin," they mean a 50% margin (sells for $80 if cost is $40). When a retailer says "we need a 50% markup," they mean a 33% margin (sells for $60 if cost is $40). Same words, two completely different prices. We've seen wholesale negotiations get redone after the brand realised the buyer's "keystone markup" (100% markup) gave the brand a 50% margin, not the 100% margin the founder had been planning to.

The discounting trap. A 20% discount off a 60% gross margin product doesn't just cut profit by 20%. It cuts gross profit by 33%, because the discount comes off the top line while COGS stays flat. A $100 product at 60% gross margin earns $60 of gross profit; the same product discounted to $80 earns $40 ($80 - $40 COGS). One in three dollars of gross profit, gone, for a 20% headline discount. Run every promo calendar through that math before launching.

A worked gross margin example (with real DTC numbers)

Take the same representative apparel SKU we used in the CM pillar: an $89 AOV from an Eightx portfolio brand at the median.

Line item$ per orderRunning marginMargin %
Selling price (AOV)$89.00$89.00100%
Less: Supplier invoice price($19.00)$70.0079%
Less: Inbound freight + duties($4.00)$66.0074%
Less: Shrink & QC allowance($1.00)$65.00 (Gross Profit)73%

Gross margin: 73%. That's the headline number this brand would report. Now watch what happens when the same SKU travels down the operational variable cost stack on its way to CM2:

Line item$ per orderRunning marginMargin %
Gross profit (from above)$65.00$65.0073%
Less: Pick-pack-ship (3PL)($6.00)$59.0066%
Less: Outbound shipping($7.00)$52.0058%
Less: Payment fees (2.9% + 30c)($2.88)$49.1255%
Less: Returns reserve (5%)($4.45)$44.67 (CM2)50%

Gross margin says 73%. CM2 says 50%. Both are correct; they answer different questions. The 23-percentage-point gap is what most brands miss when they look at the Shopify "gross profit" report and conclude their unit economics are healthier than they really are. To stress-test your own SKU economics with the full ladder, use the contribution margin calculator — the first layer it builds is gross margin.

What is a good gross margin for ecommerce?

Benchmarks from our 35-brand DTC portfolio, cross-referenced with public-company filings:

VerticalEightx portfolio median GMEightx rangePublic-co reference
Apparel DTC60%55-65%Allbirds 49%, Warby Parker 56%
Beauty DTC70%65-75%Olaplex 73%, e.l.f. Beauty 71%
Supplements DTC75%70-80%Vital Proteins ~55%, GNC ~35% (retail mix)
Food / Beverage DTC45%35-50%Vita Coco 39%, Beyond Meat 21%
Home / Lifestyle DTC55%50-60%Solo Brands ~48%

Public companies and DTC portfolio companies often look different at the gross-margin line for two reasons. First, public companies frequently have a wholesale channel mix that dilutes blended gross margin (wholesale is 20-30 points lower at the gross line because retailer keystone math takes that margin out). Second, public companies define COGS more conservatively (more freight, more depreciation, more reserves). The Eightx portfolio numbers are 100% DTC and use the cleaner GAAP definition, which makes them the better operator benchmark.

Read the table as orientation, not as your target. A "good" gross margin for your brand is the one that supports your operating model. If your operating expense base is lean and you run a low-spend acquisition strategy, you can be profitable at 45% gross. If you spend aggressively on paid acquisition, you typically need 65%+ gross to make the math work after CM2 and CM3 erosion.

Gross margin by channel: DTC, Shopify, Amazon, wholesale

Gross margin math has channel-specific gotchas worth calling out.

Shopify DTC

Shopify's gross profit calculation uses the cost you've entered at the variant level. If you haven't updated variant cost in twelve months and your supplier has raised prices three times, your reported gross profit is overstated by 5-15%. Pull cost from your bill-of-materials or supplier-invoice source quarterly and reconcile against Shopify's variant cost field. The fix takes an afternoon and recovers the most-distorted line on the P&L.

Shopify also generally excludes inbound freight and duties from variant cost unless you've manually loaded them. Brands sourcing from Asia in 2026 commonly pay 5-12% of landed cost in freight and duties; treating that as an OpEx line instead of a product cost overstates gross margin by 3-8 percentage points.

Amazon

Amazon has the highest fee stack of any channel. Referral fees run 8 to 18% of order revenue depending on category. FBA fees (pick-pack-ship plus storage allocation) run another 15 to 20%. All-in, Amazon takes 30 to 35% of order revenue before you've subtracted product COGS or ad spend.

For comparability with DTC, keep gross margin focused on product cost (COGS) only and put Amazon referral fees in selling expenses. That way Amazon gross margin = DTC gross margin at the product level, and the channel cost difference shows up cleanly in the CM2 layer. The dirty alternative is to net referral fees against revenue, which makes Amazon margins look like DTC at first glance but breaks any vendor or channel comparison. Pick one method and stay consistent.

Wholesale (CPG accounts)

Wholesale gross margin runs 15 to 25 percentage points lower than the equivalent DTC SKU because the retailer takes their margin out of the selling price. If your DTC SKU sells at $89 and your wholesale price to a boutique is $42, your gross margin on that channel drops mechanically. That's not a sourcing problem; it's the cost of distribution.

What you save in wholesale is the absence of acquisition cost (no Meta CPM, no Google CPC), which is why a well-run wholesale CPG business can hit CM3 between 30 and 40% even with a much lower gross margin than the DTC channel. Don't compare gross margin across channels without normalizing for what each channel pays for.

Subscription DTC

Subscription introduces a discount-on-first wrinkle: the first order's gross margin (typically 30-60% off list) is much lower than the renewal order's gross margin. Build the cohort gross margin: weighted average gross margin per order across the verified retention curve, not the headline-price gross margin.

How to improve gross margin (without raising prices)

Seven levers, ordered by how often they actually work in our portfolio:

  1. Renegotiate the top 3 SKUs when you cross a volume threshold. Annual volume increase of 25%+ on a SKU is leverage to ask for 3-7% off the unit price. Most suppliers will not volunteer it; you have to ask. A 5% reduction on three top SKUs that represent 60% of volume moves blended gross margin 2-3 percentage points.
  2. Audit inbound freight and consolidate. Brands sourcing from multiple suppliers often pay LCL (less-than-container-load) rates when FCL (full container) would be 10-20% cheaper. A freight forwarder reconciliation once a year typically saves 5-15% of inbound freight cost.
  3. Cut the worst 10% of SKUs by margin and units. Carrying low-margin slow-movers drags blended gross margin and ties up working capital you could deploy on top sellers. The exercise is uncomfortable; the gain is immediate.
  4. Mix-shift toward higher-margin SKUs. Promote higher-margin SKUs in email, on PDPs, and in upsells/bundles. Mix shift can move blended margin 200-400 bps without touching any single SKU price. The change is invisible to customers.
  5. Reduce shrink, returns-to-trash, and damages. Tighten your 3PL contract on damage rates, improve PDP accuracy to reduce wrong-product returns, and tighten the unsellable-on-return threshold. Each percentage point of shrink recovered is a percentage point of gross margin recovered.
  6. Reformulate or repackage to lower COGS. Beauty and supplements have the most room here. Switching a packaging supplier, changing a fill weight, or swapping a non-hero ingredient for a comparable one can reduce COGS 5-15% without a noticeable change to the consumer.
  7. Raise price (last because customers feel it). The largest single lever and the one most founders won't pull. A 5% price increase on a 60% gross margin product takes gross margin to 62.4% — and if elasticity is below 1 (typical for DTC brands with brand affinity), units lost don't offset the margin gain. Test on one SKU; don't blanket the catalog.

Each lever is independent. The gains stack. A brand that runs all seven over six months typically picks up 4-8 percentage points of gross margin, which is the difference between a struggling 50% gross apparel brand and a healthy 56-58% one.

Gross margin on the income statement

Gross margin lives at the top of a GAAP income statement: Revenue, COGS, Gross Profit, Operating Expenses, Operating Income, Other Income/Expense, Pre-Tax Income, Tax, Net Income. The placement matters because everything below depends on the dollars left after gross profit. A 3-percentage-point gross margin improvement on a $10M brand drops $300K straight to the operating line if operating expenses don't change, which usually translates to $200K+ at the net line after tax.

For management reporting (the version the CFO actually runs the business off), break gross profit into product gross profit and channel gross profit, and show inbound freight and duties as separate lines so you can see when one is moving against you. The standard P&L hides those movements behind a single COGS line.

DTC gross margin trends 2020-2026

Gross margin compressed across most public DTC companies between 2021 and 2024 — inbound freight inflation, higher promotional intensity, and channel-mix shifts toward Amazon (which dilutes blended gross at the public-co reporting level) all played a part. The recovery in 2025-2026 has been uneven, with beauty and supplements regaining margin faster than apparel and food.

We've tracked the full curve across the public DTC cohort in DTC gross margin evolution 2020-2026. For your brand, what matters is the trend not the level: if your gross margin is declining 100+ bps per year and you can't point at the specific line driving it (inbound freight, mix, promotional intensity, channel shift), you have a leak that's going to show up at the net line in 12-18 months.

Common gross margin mistakes

  1. Treating inbound freight as OpEx. Under GAAP, freight-in is a product cost. Putting it in shipping or operations overstates gross margin 3-8 points.
  2. Using stale variant cost in Shopify. If your variant cost was set in 2024 and the supplier has raised prices, your gross profit is overstated. Reconcile quarterly.
  3. Ignoring shrink and write-offs. Inventory write-offs are a COGS line. If you're consistently writing off 2-3% of inventory and not reflecting it in COGS, gross margin is overstated by 2-3 points.
  4. Using list price instead of net selling price. Discounts, promo codes, and Shopify gift-card redemptions reduce realized price. Use net revenue, not gross revenue, in the denominator.
  5. Not separating channels. A 10% Amazon mix can drag blended gross margin 3-5 points if Amazon FBA fees are bundled into COGS. Report gross margin by channel before blending.
  6. Confusing margin with markup. A 50% markup is a 33% margin. A 100% markup is a 50% margin. Always confirm the term with the counterparty.

Free gross margin (and CM) calculator

The Eightx contribution margin calculator builds gross margin (the CM1 layer) as its first step, then layers in the operational variable costs to get CM2 and the marketing layer to get CM3. Free, no email required, exports to Google Sheets. Open the calculator.

If you want help running gross margin against the Eightx 35-brand portfolio and identifying which of the seven levers above will move yours the most, book a 30-minute call.

Gross margin in context: channel, capital, and the rest of the stack

The same brand can post very different gross margins depending on where it sells and how it is funded. Compare gross margin on Shopify versus Amazon and the gap between bootstrapped and venture-funded brands. Gross margin is only the first line of the stack, so read it alongside operating margin, net profit margin, and net margin by vertical for public DTC. For category detail, see the public benchmarks for beauty and personal care and food and beverage CPG.

Conclusion

Gross margin is the highest-leverage margin layer to fix and the easiest one to get wrong. Get the definition right: COGS includes inbound freight, duties, and shrink, not just the supplier invoice. Get the benchmark right: apparel 60%, beauty 70%, supplements 75%, food 45%, home 55% are the medians in our portfolio. Get the channel breakdown right: never blend Amazon and DTC into one gross-margin number; the channels have different cost structures. Then run the seven levers in order, one per month, and you'll typically pick up 4-8 percentage points over two quarters. For most $5M-$50M DTC brands, that's worth more than any single marketing optimization or operational efficiency project.

The next two layers below gross margin (CM2 and CM3) are where order economics and customer economics get answered — read our contribution margin guide next, and pair it with the customer acquisition cost guide to understand the full chain from product cost to acquisition spend.

Frequently Asked Questions

what is the difference between gross margin and contribution margin?

Gross margin subtracts product COGS (and usually inbound freight) from revenue. Contribution margin keeps going and subtracts everything else that scales with order volume: pick-pack-ship, outbound shipping, payment processing fees, returns reserve, and (at the CM3 layer) variable marketing. A Shopify apparel brand with a 60% gross margin commonly has a 35-40% CM2 once those operational variable costs come out, and a 15-25% CM3 after marketing. Gross margin tells you the product economics. Contribution margin tells you whether each order is actually making money.

how do you calculate gross margin in shopify?

Shopify's reports show gross profit if you have inventory costs entered on each variant. Pull Reports > Finance summary or Reports > Profit by product for the period. Gross profit = product revenue minus product cost. Gross margin percent = gross profit divided by product revenue. Two gotchas: (1) Shopify only counts the cost you entered at the variant level, so if your cost is stale your margin is overstated; (2) Shopify gross profit usually excludes inbound freight, duties, and shrink, which a CFO version of gross margin should include. Adjust manually or use Cogsy / Inventory Planner / Drape to land at a true gross margin.

what is a good gross margin for an ecommerce brand?

Depends on the vertical. From our 35-brand DTC portfolio: apparel 55-65% (median 60%), beauty 65-75% (median 70%), supplements 70-80% (median 75%), food and beverage 35-50% (median 45%), home and lifestyle 50-60% (median 55%). Public-company benchmarks from the same categories sit in roughly the same bands: Allbirds 49%, Warby Parker 56%, Olaplex 73%, e.l.f. Beauty 71%, Vital Proteins ~55%. A good gross margin for your brand is one that leaves enough room for 25-35 percentage points of operational variable costs (fulfillment, shipping, payment fees, returns) plus your acquisition cost and still lands in the scalable CM3 band of 17-25%.

why is gross margin different from gross profit?

Gross profit is the dollar amount: revenue minus COGS. Gross margin is the percentage: gross profit divided by revenue. A brand with $10M revenue and $4M COGS has $6M of gross profit and a 60% gross margin. The two numbers move together but answer different questions. Gross profit is what you use to fund operating expenses. Gross margin is what you compare across brands, channels, and periods.

does inbound freight count in gross margin?

Under GAAP, freight-in (the cost to ship product from supplier to your warehouse, including duties) is a product cost and belongs in COGS. Under most internal accounting setups, brands include freight-in too. So yes, gross margin should include inbound freight. The mistake to avoid is treating freight-in as an operating expense, which artificially inflates gross margin by 3-8 percentage points depending on the product and lane. For brands sourcing from Asia in 2026, inbound freight can be 5-12% of landed cost; leaving it out makes your margins look better than they are.

how does amazon affect gross margin?

Amazon's referral fee (8-18% of order revenue depending on category) is a sales channel cost, not a product cost. Whether it sits in gross margin or below it depends on the accounting setup. The cleaner method is to put referral fees in selling expenses and keep gross margin focused on product cost only, which makes Amazon gross margin comparable to DTC gross margin. The dirty method is to net the referral fee against revenue, which lowers reported revenue and makes margins look optically similar to DTC but breaks vendor comparability. FBA pick-pack-ship and storage fees are operational variable costs and sit below gross margin (in the CM2 layer). All-in Amazon takes 30-35% of order revenue before you've subtracted product COGS or ad spend.

what is the gross margin formula in excel?

Gross margin dollars: =Revenue - COGS, or =A1 - B1. Gross margin percent: =(Revenue - COGS) / Revenue, or =(A1 - B1) / A1. For per-unit gross margin: =(Selling Price - Unit Cost) / Selling Price. Format the cell as a percentage. For multi-SKU rollups, use SUMPRODUCT to weight by units: =SUMPRODUCT(Margins, Units) / SUMPRODUCT(Prices, Units). The free Eightx contribution margin calculator at /tools/contribution-margin-calculator computes gross margin (CM1) as the first layer and then builds the full ladder down to CM3.

is gross margin the same as markup?

No, and confusing the two is the most common pricing mistake we see. Margin is calculated against the selling price; markup is calculated against the cost. A product that costs $40 and sells for $100 has a 60% gross margin ($60 / $100) and a 150% markup ($60 / $40). If you tell a supplier you want a 100% margin, you mean a 50% margin (because 100% markup = 50% margin). The simple rule: a 50% markup gives you a 33% margin; a 100% markup gives you a 50% margin; a 200% markup gives you a 67% margin. Always confirm which one a supplier, retailer, or designer is talking about.

why don't all public DTC companies report the same gross margin?

Because GAAP gives companies discretion on what to include in COGS. Some put outbound shipping in COGS (which compresses gross margin); others put it in selling expenses (which keeps gross margin higher). Some include warehouse depreciation in COGS; others don't. Allbirds historically included shipping in COGS, Warby Parker historically didn't, and that single decision creates 4-6 percentage points of apparent gross margin difference even when the underlying product economics are similar. When comparing public-company gross margins, always read the footnote that defines COGS or you'll draw the wrong conclusion.

how can I improve gross margin without raising prices?

Five non-price levers, in order of how often they work: (1) renegotiate the largest 3 SKUs with your supplier when you cross a volume threshold; even a 5% supplier reduction on top sellers moves blended gross margin 2-3 points. (2) Audit inbound freight and consolidate; many brands overpay 10-20% on FCL vs LCL. (3) Reduce shrink, returns-to-trash, and damages by tightening 3PL contracts and PDP accuracy. (4) Change SKU mix by promoting higher-margin SKUs in your email and bundles; mix shift can move blended margin 200-400 bps without touching any single SKU price. (5) Cut the worst 10% of SKUs by margin and units; carrying low-margin slow-movers drags margin and ties up working capital. Each lever is independent so the gains stack.

About the Author

Matt Putra, Managing Partner

Matt is the Managing Partner of Eightx and a fractional / interim CFO for ecommerce, DTC, and CPG brands. A former PE investor with $500M+ deployed, Matt and the Eightx team manage $650M+ in combined revenue across 35+ portfolio brands. He specialises in gross margin optimization, contribution margin laddering, max-CAC frameworks, and capital stack design for $5M–$150M ecom brands.

Want results like these?

Get Your Free
Profit Audit

30-minute call. We'll find at least one profit leak in your business—no strings attached.

Talk to a CFO