CalculatorMasters

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

Weighted-average cost per unit = Cost of goods available for sale ÷ Units available for sale

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

VariableWhat It MeansUnit
beginningInventoryUnits - Beginning inventory unitsNumber of units held at the beginning of the accounting period.number
beginningUnitCost - Beginning cost per unitRecorded inventory cost for each beginning unit.currency
purchasedUnits - Units purchasedAdditional units acquired during the period.number
purchaseUnitCost - Purchase cost per unitAverage recorded cost for each unit purchased during the period.currency
endingInventoryUnits - Ending inventory unitsUnits remaining at the end of the period.number
goodsAvailableCost - Cost of goods available for saleCombined cost of beginning inventory and purchases.currency
goodsAvailableUnits - Units available for saleCombined units in beginning inventory and purchases.number

Step-by-Step Calculation

1

Calculate beginning inventory cost

Multiply opening units by their recorded cost per unit.

beginningInventoryUnits * beginningUnitCost

2

Calculate purchase cost

Multiply units purchased by the average purchase cost per unit.

purchasedUnits * purchaseUnitCost

3

Find goods available for sale

Add beginning inventory units and purchased units.

beginningInventoryUnits + purchasedUnits

4

Find total available inventory cost

Add beginning inventory cost and purchase cost.

beginningInventoryUnits * beginningUnitCost + purchasedUnits * purchaseUnitCost

5

Calculate the weighted-average unit cost

Divide total available inventory cost by total available units.

goodsAvailableCost / goodsAvailableUnits

6

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 inventory100 units at $10.00 each
Purchases400 units at $12.00 each
Ending inventory150 units
1

Beginning inventory cost

100 × $10.00

$1,000.00

2

Purchase cost

400 × $12.00

$4,800.00

3

Goods available for sale

100 + 400

500 units

4

Cost of goods available

$1,000.00 + $4,800.00

$5,800.00

5

Weighted-average cost per unit

$5,800.00 ÷ 500

$11.60 per unit

6

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.

Try the Calculator →

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

1

Entering sales price instead of inventory cost per unit.

2

Using ending inventory units greater than beginning inventory plus purchases.

3

Mixing currencies or periods in the same calculation.

4

Applying the weighted-average cost to revenue rather than to units sold.

5

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.

Try Cost of Goods Sold Per-Unit