Sign in

Blog · Finance metrics and formulas · Industrial distributors

Weighted average cost per unit: inventory formula and example

Weighted average cost per unit divides inventory cost available by the units available. Compare periodic and moving inventory averages on the same purchase and issue records, then reconcile ending inventory and cost of goods sold.

The short answerWeighted average cost per unit is total inventory cost available divided by total units available for the same SKU and cost pool. A periodic average combines opening inventory and purchases for the period. A moving average recalculates after each receipt, so transaction order can change cost of goods sold and ending inventory.

Weighted average cost per unit is inventory cost available divided by inventory units available for the same SKU and cost pool. Weight each receipt by its quantity, including opening inventory in the calculation. Choose periodic or moving averaging before interpreting the result, because the same purchases and issues can produce different cost assignments.

The inventory formula

Periodic weighted average cost per unit = (Opening inventory value + Net purchase cost) / (Opening units + Net units purchased)

Moving average after a receipt = (On-hand value before receipt + Receipt cost) / (On-hand units before receipt + Receipt units)

The numerator and denominator must describe the same inventory. Purchase cost should reflect the company's consistent cost policy, including the treatment of inbound freight, discounts and other acquisition adjustments. Do not mix a freight-inclusive opening value with receipt prices that exclude the freight later added to inventory.

OpenStax's periodic inventory example divides the total cost of goods available by the total available units. The general weighted average definition explains why quantity is the weight; this page applies that principle specifically to inventory cost flow.

The calculation does not establish the physical picking order. A warehouse can pick goods according to shelf life while finance applies an approved inventory cost method. Keep the physical stock records and the costing schedule connected without assuming they answer the same question.

The export rows you need

Start with a stock movement export and its opening inventory balance. Keep the following fields rather than relying only on the latest purchase price:

Field Why it matters
SKU and cost-pool identifier Prevents unlike items or separate pools from being mixed
Transaction date and sequence Establishes the order used for moving average
Movement ID and type Distinguishes receipts, issues, returns and corrections
Quantity and unit of measure Supplies the weights in a consistent unit
Extended inventory cost (USD) Supplies the value entering or leaving the pool
Opening quantity and value Carries forward stock acquired before the period

Check whether the export quantity is pieces, cartons or another pack size. A supplier price per carton cannot be averaged with a stock quantity in pieces until the conversion is made. Keep the original movement identifier when grouping transactions so an exception can be traced back to its receipt.

This inventory valuation job differs from average manufacturing cost per unit, which compares the cost of making completed output. A distributor's stock balance may contain goods bought at several prices over several periods.

Worked example: a distributor's bearing inventory

An Illinois industrial distributor values one bearing SKU for September 2026. Every quantity below is in individual bearings, every receipt cost includes the same acquisition-cost components, and the records contain no returns, losses or adjustments.

The opening balance is 100 bearings costing $1,000. Purchases and customer shipments follow this sequence:

Date Movement Units added Units issued Cost added (USD) Receipt or opening cost per unit (USD)
September 1 Opening inventory 100 0 1,000 10.00
September 5 Purchase receipt 300 0 4,200 14.00
September 10 Customer shipment 0 200 0 —
September 20 Purchase receipt 200 0 3,200 16.00
September 25 Customer shipment 0 100 0 —
Total available or issued 600 300 8,400

The cost-added column excludes the cost removed on shipments; that amount is calculated under the chosen method below. Available units are 100 + 300 + 200 = 600. Ending physical units are 600 - 300 = 300.

Calculate the periodic weighted average

The periodic method pools all opening units and receipts for September, regardless of when the shipments occurred.

Step Calculation Cost or unit cost (USD) Units
Opening inventory value 100 × 10.00 1,000
First receipt value 300 × 14.00 4,200
Second receipt value 200 × 16.00 3,200
Total available cost 1,000 + 4,200 + 3,200 8,400
Total available units 100 + 300 + 200 600
Periodic average per unit 8,400 / 600 14.00
Cost of goods sold 300 issued × 14.00 4,200
Ending inventory 300 remaining × 14.00 4,200

The simple average of the three unit prices is (10.00 + 14.00 + 16.00) / 3 = $13.33, rounded to two decimal places. It is wrong for this pool because the three cost layers contain different quantities. The periodic weighted figure is $14.00.

Calculate the moving inventory average

Moving average recalculates when a purchase receipt enters the pool. Each shipment removes value at the average already in effect. OpenStax's perpetual inventory example demonstrates this recalculation after acquisitions and the use of that latest average for subsequent sales.

Event Calculation of balance or issue Units on hand Value on hand (USD) Average (USD per unit) Issue cost (USD)
Opening 100 × 10.00 100 1,000 10.00 0
First receipt (1,000 + 4,200) / (100 + 300) 400 5,200 13.00 0
First shipment 200 × 13.00 removed 200 2,600 13.00 2,600
Second receipt (2,600 + 3,200) / (200 + 200) 400 5,800 14.50 0
Second shipment 100 × 14.50 removed 300 4,350 14.50 1,450

Moving-average COGS is $2,600 + $1,450 = $4,050. Ending inventory is $4,350. The shipment itself does not change the average: it removes quantity and value in the same proportion.

The final moving average is $14.50 because some cheaper units left before the higher-priced second receipt arrived. It is not a rolling time-series average; moving averages in a spreadsheet address a different question about smoothing observations over time.

The reconciliation that both methods must pass

Cost available = Cost of goods sold + Ending inventory value

Units available = Units issued + Ending units

Method COGS (USD) Ending inventory (USD) Total assigned cost (USD) Units issued Ending units Total units
Periodic average 4,200 4,200 8,400 300 300 600
Moving average 4,050 4,350 8,400 300 300 600

Moving average leaves $150 more in ending inventory: $4,350 - $4,200. It assigns the same $150 less to COGS. Neither method creates or loses cost; the timing changes which goods carry it. The broader cost of goods sold calculation explains how that assigned cost reaches the income statement.

These examples calculate exactly before showing dollars per unit to two decimal places. When a real average repeats beyond the displayed decimals, retain sufficient precision for postings and record any rounding adjustment rather than forcing the reconciliation with a rounded unit price.

Where it goes wrong

  • Opening stock is omitted. Averaging only new receipts forgets the quantity and value carried from the previous period.
  • Transaction order is lost. Sorting only by date can reverse a receipt and shipment posted on the same day. Preserve the sequence used by the inventory records.
  • Quantity units are mixed. Cartons and pieces need a consistent conversion before their costs can be weighted together.
  • Negative inventory is ignored. An issue before sufficient stock exists can distort moving cost. Resolve missing receipts and follow the established correction policy.
  • Receipt prices stand in for inventory cost. Freight, supplier credits and returns need their documented cost treatment before comparing unit costs across periods.

Check your inventory records in Covirage

Bring your opening stock values and purchase and issue export to Covirage, with the SKU, quantities, costs and transaction sequence intact. Covirage maps the columns, and its tools compute and check the supplied inventory cost calculations; the external AI model explains the differences with every figure traced to its rows. Create a free Covirage account and bring a sample of your own data.

See Covirage for industrial distributors for the inventory and purchasing context.

Questions people ask

Why is inventory cost weighted by quantity?

Receipts often contain different quantities. Weighting gives each physical unit equal influence on the inventory cost, rather than giving a small purchase the same influence as a large purchase. Divide the summed extended costs by the summed quantities.

Is moving average the same as periodic weighted average?

Both divide a cost pool by its units, but they calculate at different times. Periodic averaging uses the period's available goods together. Moving averaging updates the on-hand unit cost after each receipt and uses that current cost for subsequent issues.

Do sales change the moving average unit cost?

An ordinary issue removes units and value at the current average, leaving the average unchanged before rounding. A receipt at a different unit cost changes it. Returns, corrections and negative inventory require the company's documented costing treatment.

Can I average inventory unit costs across all SKUs?

Usually that obscures the comparison because SKUs have different specifications and units of measure. Establish the permitted cost pool first. For a management comparison across unrelated products, review inventory value, quantity changes and product-level unit costs separately.