How to Calculate Cost per Unit for an Ecommerce Product
Cost per Unit
Definition
The total specified cost of producing or acquiring a set of units divided by the number of units.
Overview
Cost per Unit is calculated by adding all variable production and fulfillment costs for a batch, plus an allocated portion of overhead, then dividing that total by the number of units in the batch. For ecommerce products this means including raw materials, direct labor, inbound freight, packaging, marketplace fees and a fair share of warehousing, software and administrative overhead to get an accurate per-unit cost.
The simplest formula to remember is: (Total Variable Costs + Allocated Overhead) ÷ Units = Cost per Unit. Below is a practical worksheet layout, the line items to capture, how to model different order sizes, and how to convert the result into margins and prices versus confusing unit cost with unit price.
Worksheet Layout
Set up a spreadsheet with one row per order or production run and these column groups so you can see how costs change with order size.
- Order Qty (Units): Total units produced or purchased in the batch.
- Variable Costs Per Unit: Sum of costs that scale with every unit (materials, piece-rate labor, per-unit freight to warehouse, packaging).
- Total Variable Costs: Variable Costs Per Unit × Order Qty.
- Allocated Overhead Total: The portion of period overhead you assign to this batch (see next section for allocation methods).
- Overhead Per Unit: Allocated Overhead Total ÷ Order Qty.
- Cost Per Unit: Variable Costs Per Unit + Overhead Per Unit.
Keep formulas in the sheet so you can change order qty and immediately see the cost-per-unit impact.
Variable Costs To Include
Variable costs are those that increase with each unit made or handled. For ecommerce, capture these per-unit items explicitly so your cost-per-unit is realistic.
- Materials: Component parts and raw materials cost per unit (including duty and import taxes if applicable).
- Direct Labor: Piece-rate or counted assembly labor directly tied to producing each unit.
- Inbound Freight: Freight to your warehouse apportioned per unit (or by pallet then divided by units per pallet).
- Packaging: Primary and secondary packaging, labels, polybags, inserts, per-unit protective materials.
- Per-Unit Fees: Marketplace referral fees, payment processing percentages, per-order carrier fees when charged per parcel.
Allocating Overhead
Overhead covers rent, WMS subscriptions, utilities, salaried staff, equipment depreciation and other indirect costs. You must choose an allocation driver that matches how overhead is consumed.
- Time-Based Allocation: Allocate monthly overhead across all units shipped that month (good for steady flows).
- Volume-Based Allocation: Use square footage, pallet positions or pick-lines consumed by a SKU to allocate warehouse rent and handling.
- Activity-Based Allocation: Allocate costs by activities (receiving, picking, packing) when you have activity data from a WMS.
Whichever method you use, express the allocated overhead as a total for the batch so Overhead Per Unit = Batch Overhead ÷ Order Qty.
Different Order Sizes And Scale Effects
Order size changes both variable and overhead-per-unit components. Variable cost per unit usually stays constant (unless quantity discounts apply), while overhead per unit falls as order size rises. Model multiple scenarios to find the breakeven and marginal cost improvements.
- Small Order Example: High overhead per unit because fixed setup or inbound freight is spread across few units.
- Large Order Example: Lower overhead per unit but watch for increased inventory carrying costs and obsolescence risk.
- Quantity Discounts: If suppliers offer lower material cost at higher MOQs, include tiered pricing rows in your worksheet.
Practical Example (Step-By-Step)
Use a concrete example you can reproduce in a spreadsheet. Assume you order 1,000 units with these numbers: materials $4.00/unit, direct labor $1.50/unit, inbound freight $0.80/unit, packaging $0.70/unit. Total variable = $7.00/unit → $7,000 for the batch.
If monthly warehouse and admin overhead you decide to allocate to this batch is $3,000, then Overhead Per Unit = $3.00. Cost Per Unit = $7.00 + $3.00 = $10.00.
Model a larger 5,000-unit order with the same total overhead allocated ($3,000) and variable per-unit costs unchanged: Overhead Per Unit = $3,000 ÷ 5,000 = $0.60, so Cost Per Unit = $7.00 + $0.60 = $7.60. The difference shows how scale reduces per-unit overhead.
Connecting Cost To Margins And Price
Cost per unit is an input to pricing, not the price itself. To reach a target gross margin, convert cost into price using the margin formula: Price = Cost ÷ (1 − Target Gross Margin%). For a $10 cost and 40% target margin: Price = 10 ÷ 0.6 = $16.67.
- Label: Markup vs margin: A 60% markup on cost is not the same as a 40% margin; use the margin formula above to avoid errors.
- Label: Include fulfillment-to-customer costs and promotional discounts in price planning even if they’re not in product COGS.
- Label: Track realized margins monthly; compare expected cost per unit vs actual COGS in accounting to catch discrepancies.
Tips For Accurate Costing
Maintain a rolling worksheet and update supplier rates, labor productivity and overhead allocations each month. Reconcile the worksheet against accounting COGS and inventory valuations (FIFO/LIFO or weighted average) to ensure consistency.
- Label: Run sensitivity scenarios for order size, freight rate changes, and marketplace fee changes to see margin impact.
- Label: Separate landed unit cost (arriving at your warehouse) from customer-fulfillment cost (shipping to buyer) for clearer pricing decisions.
- Label: When using third-party logistics, request detailed invoices (per-pick, per-pack) to convert those charges into accurate per-unit variables.
In short, the Cost per Unit for an ecommerce product is the sum of per-unit variable costs plus an allocated share of overhead divided by the batch quantity; use a clear worksheet with variable lines, overhead allocation and scenario rows for different order sizes so you can convert that cost into margins and set selling prices confidently.
Sources And Additional Reading (3)
- Calculate your fixed and variable costs
“Calculate your fixed and variable costs.” U.S. Small Business Administration, https://www.sba.gov/business-guide/plan-your-business/calculate-your-fixed-and-variable-costs.
- Cost Per Unit
“Cost Per Unit.” Investopedia, https://www.investopedia.com/terms/c/cost-per-unit.asp.
- How to Calculate Cost of Goods Sold for Small Business
“How to Calculate Cost of Goods Sold for Small Business.” Intuit QuickBooks, https://quickbooks.intuit.com/r/inventory-management/how-to-calculate-cost-of-goods-sold/.
More from this term
Looking for a 3PL?
Compare warehouses on Racklify and find the right logistics partner for your business.