
Cost of Goods Sold Per-Unit Formula
Learn how to calculate weighted-average cost of goods sold per unit, total COGS, and ending inventory value.
This calculator applies the periodic weighted-average inventory method. It combines the cost and quantity of beginning inventory with purchases, calculates one average unit cost, and applies that cost to units sold and units remaining.
- 100% Free
- No Sign-Up Required
- Private & Secure
- Mobile Friendly
Weighted-Average Cost of Goods Sold Per Unit
Where:
Add the cost of opening inventory and purchases, then divide by all units available for sale. The result is the average inventory cost assigned to each unit sold.
Variables Explained
| Variable | What It Means | Unit |
|---|---|---|
| beginningInventoryUnits - Beginning inventory units | Number of units held at the beginning of the accounting period. | number |
| beginningUnitCost - Beginning cost per unit | Recorded inventory cost for each beginning unit. | currency |
| purchasedUnits - Units purchased | Additional units acquired during the period. | number |
| purchaseUnitCost - Purchase cost per unit | Average recorded cost for each unit purchased during the period. | currency |
| endingInventoryUnits - Ending inventory units | Units remaining at the end of the period. | number |
| goodsAvailableCost - Cost of goods available for sale | Combined cost of beginning inventory and purchases. | currency |
| goodsAvailableUnits - Units available for sale | Combined units in beginning inventory and purchases. | number |
Step-by-Step Calculation
Calculate beginning inventory cost
Multiply opening units by their recorded cost per unit.
beginningInventoryUnits * beginningUnitCost
Calculate purchase cost
Multiply units purchased by the average purchase cost per unit.
purchasedUnits * purchaseUnitCost
Find goods available for sale
Add beginning inventory units and purchased units.
beginningInventoryUnits + purchasedUnits
Find total available inventory cost
Add beginning inventory cost and purchase cost.
beginningInventoryUnits * beginningUnitCost + purchasedUnits * purchaseUnitCost
Calculate the weighted-average unit cost
Divide total available inventory cost by total available units.
goodsAvailableCost / goodsAvailableUnits
Calculate units sold and total COGS
Subtract ending units from available units, then apply the weighted-average cost per unit.
(goodsAvailableUnits - endingInventoryUnits) * (goodsAvailableCost / goodsAvailableUnits)
Weighted-Average COGS Calculation Example
Beginning inventory cost
100 × $10.00
$1,000.00
Purchase cost
400 × $12.00
$4,800.00
Goods available for sale
100 + 400
500 units
Cost of goods available
$1,000.00 + $4,800.00
$5,800.00
Weighted-average cost per unit
$5,800.00 ÷ 500
$11.60 per unit
Total COGS
(500 - 150) × $11.60
$4,060.00
Final Result
Weighted-average COGS is $11.60 per unit. Total COGS is $4,060.00, and ending inventory is $1,740.00.
Assumptions
- ✓The calculation uses the periodic weighted-average inventory method.
- ✓All unit costs are entered in the same currency.
- ✓Beginning inventory and purchases are available for sale during the same period.
- ✓Ending inventory units do not exceed units available for sale.
Limitations
- !The estimate does not separately account for individual purchase layers as FIFO or LIFO would.
- !Freight, discounts, returns, write-downs, and other inventory adjustments can change reported amounts.
- !Rounding the average unit cost may create small differences from records that retain more decimal places.
- !The calculation does not determine which costs are eligible for capitalization under a particular reporting framework.
Common Mistakes to Avoid
Entering sales price instead of inventory cost per unit.
Using ending inventory units greater than beginning inventory plus purchases.
Mixing currencies or periods in the same calculation.
Applying the weighted-average cost to revenue rather than to units sold.
Forgetting to include inventory returns or adjustments in source records where applicable.
Related Formulas
Frequently Asked Questions
What is the weighted-average COGS per-unit formula?
Divide the cost of goods available for sale by the units available for sale.
How do you calculate total COGS using weighted average?
Multiply units sold by the weighted-average cost per unit. Units sold equal available units minus ending inventory units.
How is ending inventory calculated under this method?
Multiply ending inventory units by the weighted-average cost per unit.
Why is the result called weighted average?
Costs are weighted by the number of units at each cost, rather than simply averaging the two unit prices.
Can the weighted-average cost fall outside the entered unit costs?
With nonnegative quantities and costs, it will normally fall between the beginning unit cost and purchase unit cost.
Ready to calculate your result?
Use the calculator to get instant results with your own inputs.