E-commerce COGS Calculation & Profitability Tracking
By the I&S Accounting teamReviewed by a licensed U.S. CPA
E-commerce COGS calculation and profitability tracking are critical for online businesses that sell physical products. Without accurate COGS, e-commerce brands misprice products, overpay taxes, and misunderstand real profit margins.
Running an e-commerce business in retail or D2C means dealing with multiple vendors, changing costs, and high order volume. Profitability becomes hard to see when costs are scattered.
The only way to know your real margins is accurate e-commerce COGS calculation.
The Challenge: Identifying True E-commerce COGS
Say you sell custom T-shirts through Shopify, and production relies on three vendors:
- Vendor A supplies blank T-shirts
- Vendor B handles printing
- Vendor C provides packaging
Each cost contributes directly to your Cost of Goods Sold. Missing one breaks your margin.
Step 1: Calculating COGS per Unit
To calculate e-commerce COGS per unit, you combine all direct costs:
- Blank T-shirt cost: $5
- Printing cost: $3
- Packaging cost: $1
Total COGS per T-shirt equals $9. This number is your baseline. Every decision starts here.
Step 2: Matching Shopify Orders With Fulfillment Costs
Shopify gives you sales data:
- Sales price per T-shirt: $25
- Discount applied: $5
- Net sales per unit: $20
But revenue alone is not profit. You must include fulfillment costs:
- Shipping cost per order: $4
- Pack-out fee per order: $2
These costs must be linked to each Shopify order for accurate e-commerce profitability tracking.
Step 3: Measuring Profit Per Order
Example order with two T-shirts:
- Total sales: $50
- Discounts: $10
- Net sales: $40
- COGS for two units: $18
- Fulfillment costs: $6
Gross profit equals $16. This is real profit — not estimated, not assumed.
Step 4: Using COGS Data to Improve Profitability
When you track e-commerce COGS at the order level, patterns appear. You can:
- Spot high fulfillment-cost periods
- Adjust pricing and discounts
- Negotiate better supplier rates
- Promote higher-margin order sizes
If orders with three or more units reduce fulfillment cost per unit, bulk pricing increases profit without increasing ad spend.
Profitability Factors E-commerce Sellers Miss
Accurate e-commerce bookkeeping includes more than inventory. You should also track:
- Inventory turnover and aging stock
- Payment processing fees from Shopify, Stripe, and PayPal
- Refund and return rates
- Advertising costs from Google, Meta, and TikTok
- Customer lifetime value for repeat buyers
Ignoring these hides risk. Tracking them creates control.
Why Accurate E-commerce COGS Matters
Revenue does not equal profit. Accurate e-commerce COGS calculation leads to:
- Clean financial statements
- Better pricing decisions
- Lower tax exposure
- Stronger cash-flow forecasting
This is how profitable e-commerce businesses scale.
Keep reading