In e-commerce, gross margin measures the profit remaining after deducting the direct cost of goods sold (COGS), while contribution margin measures the profit remaining after deducting all variable costs associated with a sale, including shipping, pick/pack labor, and payment gateway fees.
Answering the primary search intent immediately: optimizing solely for gross margin is dangerous in direct-to-consumer retail. A product might boast an 80% gross margin but yield a negative contribution margin once fulfillment costs, transaction fees, and acquisition costs are accounted for.
The Illusion of High Gross Margins
Traditional accounting standards (like GAAP) were built for wholesale and manufacturing. Under these rules, Gross Margin focuses exclusively on production efficiency.
Gross Margin = (Net Sales − COGS) / Net Sales
In e-commerce, COGS generally includes the landed cost of the product: manufacturing, raw materials, duties, and inbound freight to your warehouse. It explicitly excludes what happens after the customer clicks "Buy."
If you run a direct-to-consumer brand, celebrating a 75% gross margin is premature. You have not yet paid the payment gateway, the warehouse team, or the postal service. Carrying catalog items that look profitable on paper but drain margins in fulfillment is the root cause of cash-drain SKUs.
The Contribution Margin Reality
Managerial accounting introduces the Contribution Margin, a vital operational metric for tracking e-commerce unit economics. It deducts every variable cost required to get the product into the customer's hands.
Contribution Margin = Net Sales − (COGS + All Variable Costs)
Depending on your business's cost model, common variable costs can include:
- Payment Gateway & Platform Fees: Credit card processing and transaction fees (e.g., a US-based merchant on the Basic Shopify plan using Shopify Payments online incurs a 2.9% + $0.30 USD fee).
- Pick, Pack, and Outbound Shipping: Warehouse labor per order, packaging materials, and postage. Unmodeled delivery subsidies are often the largest variable leak; see our guide on the true cost of free shipping.
- Return Logistics: The blended variable cost of processing returns, restocking, and unsellable inventory.
A Concrete Scenario
Consider a merchant selling a premium jacket. The unit economics on a single order look like this:
| Metric | Amount | Margin % |
|---|---|---|
| Retail Price (Net Sales) | $150.00 | 100.0% |
| Landed COGS | -$45.00 | 30.0% |
| Gross Profit | $105.00 | 70.0% (Gross Margin) |
| Payment Processing (e.g., US Basic Shopify online) | -$4.65 | 3.1% |
| Outbound Shipping (Net of customer paid) | -$12.00 | 8.0% |
| Pick & Pack Labor | -$3.50 | 2.3% |
| True Contribution Profit | $84.85 | 56.5% (Contribution Margin) |
The merchant's gross margin looks incredibly healthy at 70%, but the actual cash generated to cover fixed overhead and marketing is only 56.5% of the sale.
Calculate Your Contribution Margins
Use our free E-Commerce Profit Margin Simulator to calculate gross, operating, and net profit margins after accounting for COGS, shipping, ad spend, and gateway overhead.
Moving Below the Contribution Line
Once you have calculated your total net contribution across all orders, you must cover your fixed operating overhead (software subscriptions, salaries, warehouse rent).
At Margain, we define this specific threshold clearly:
Operating Contribution After Fixed Overhead = Total Net Contribution − Fixed Operating Overhead
Understanding the exact difference between gross margin and contribution margin ensures that you are scaling real cash, not just top-line vanity metrics.
Margain Financial Clarity
True contribution margins, burn rate, cash flow, and payment fee reconciliations.