Profit & margins
How to calculate cost per unit and contribution margin
Cost per unit is what one unit of a product really costs you once every cost of getting it into stock is included. You calculate it by dividing the total cost of a batch, covering product, freight, duties and packaging, by the units in that batch. Contribution margin then shows what each sale leaves after its variable costs.
How to calculate cost per unit
Cost per unit = Total costs for the batch ÷ Units in the batch
For an online store, "total costs" means landed cost: everything you pay to get the stock to your warehouse, ready to sell.
Worked example: landed cost for a batch of 500 unitsExample numbers
| Cost | Amount |
|---|---|
| Supplier price (500 × $8.00) | $4,000 |
| Inbound freight | $600 |
| Import duties and customs fees | $300 |
| Packaging | $250 |
| Total landed cost | $5,150 |
Cost per unit = $5,150 ÷ 500 = $10.30
The real cost is about 29% higher than the $8.00 supplier price. Using the supplier price alone would overstate your margin on every sale.
Recalculate cost per unit for each new batch. Freight and duty costs change, and an old cost per unit quietly inflates your margins.
Contribution margin per unit
Cost per unit tells you what the product costs. Contribution margin tells you what each sale actually leaves after all the costs that come with it.
Contribution margin = Price − Variable costs per unit Contribution margin ratio = Contribution margin ÷ Price
- Variable costs
- costs that rise with each unit sold: landed cost, outbound shipping, payment and marketplace fees, pick-and-pack
Continuing the example, with the product selling for $29:
- Variable costs = $10.30 (landed cost) + $5.00 (shipping) + $1.20 (fees) = $16.50
- Contribution margin = $29.00 − $16.50 = $12.50 per unit
- Contribution margin ratio = $12.50 ÷ $29.00 = 43.1%
That $12.50 is what each sale contributes toward fixed costs (apps, staff, rent) and profit.
Contribution Margin per SKU CalculatorWhat a single SKU actually contributes after COGS, shipping, and fees.Comparing SKUs side by side
The real value comes from putting every product in one table:
| SKU | Price | Landed cost | Shipping | Fees | Contribution | Ratio |
|---|---|---|---|---|---|---|
| A: Water bottle | $29.00 | $10.30 | $5.00 | $1.20 | $12.50 | 43.1% |
| B: Phone grip | $18.00 | $7.40 | $5.00 | $0.80 | $4.80 | 26.7% |
| C: Travel bag | $48.00 | $19.00 | $6.00 | $1.70 | $21.30 | 44.4% |
SKU B looks fine on gross margin: ($18 − $7.40) ÷ $18 = 59%. But shipping costs nearly as much for a cheap item as for an expensive one, so its contribution is under half of SKU A's. Options for B include a higher price, selling it only as an add-on with other items, or bundling it.
Want this handled automatically?Forecast demand and know exactly when to reorder, before you stock out or tie cash up in overstock.Try Verve AIFixed vs variable costs
Contribution margin only works if you split costs correctly:
| Variable costs (in contribution margin) | Fixed costs (not in contribution margin) |
|---|---|
| Landed product cost | Shopify plan and app subscriptions |
| Outbound shipping and packaging | Salaries and contractors |
| Payment and marketplace fees | Rent and utilities |
| Pick-and-pack fees per order | Software and design tools |
| Ad cost per order (if you track it) | Accounting and insurance |
The test is simple: if selling one more unit makes the cost go up, it's variable.
Once you know contribution per unit, you can work out how many units cover your fixed costs:
Break-even units = Monthly fixed costs ÷ Contribution margin per unit
With $6,000 of monthly fixed costs and the $12.50 contribution from the example above, you need to sell 6,000 ÷ 12.50 = 480 units a month to break even. Every unit after that adds $12.50 of profit.
Allocating shared freight across products
When one shipment carries several products, the freight bill has to be split between them. The two common methods give very different answers:
Worked example: splitting a $1,200 freight billExample numbers
| Product | Value in shipment | Weight | Freight by value | Freight by weight |
|---|---|---|---|---|
| A: Water bottles | $6,000 | 200 lb | $900 (75%) | $300 (25%) |
| B: Yoga mats | $2,000 | 600 lb | $300 (25%) | $900 (75%) |
| Total | $8,000 | 800 lb | $1,200 | $1,200 |
Allocate the way the freight was actually charged. If the carrier priced the shipment by weight or volume, split by weight or volume; otherwise heavy, cheap products look more profitable than they are. Duties are usually charged on value, so split them by value.
Gross margin vs contribution margin
| Gross margin | Contribution margin | |
|---|---|---|
| Subtracts | Product cost only | All per-unit variable costs |
| Best for | Supplier and pricing decisions | Deciding which products to promote, bundle or drop |
The guide to gross profit margin covers the first; the calculator above covers the second.
How to lower cost per unit
- Order in larger batches where the volume discount outweighs the extra holding cost. The economic order quantity calculator helps find the balance.
- Consolidate freight into fewer, fuller shipments.
- Review duty classifications with a customs broker; the wrong code can mean paying more than you need to.
- Simplify packaging without hurting the unboxing experience.
- Negotiate with suppliers using your order history and forecasts.
To see how unit costs roll up into your store's overall margin, see the guide to gross profit margin. For standard vs actual costing, see the guide to product costing.
FAQ
What's the formula for cost per unit?
Add up all the costs for a batch of stock, including product price, freight, duties and packaging, then divide by the number of units in the batch. That's your landed cost per unit.
What's the difference between cost per unit and COGS?
Cost per unit is the cost of one unit. COGS is the total cost of all the units you sold in a period. Multiply cost per unit by units sold to estimate COGS.
What's a good contribution margin ratio?
High enough that total contribution across all your sales covers your fixed costs and leaves a profit. Compare SKUs against each other; the lowest ratios are where to look first.
Should ad spend be in contribution margin?
Many stores include ad cost per order or per unit as a variable cost, because it rises with sales. Including it shows which products are profitable to advertise, not just to sell.