Inventory & Finance4 September 2026·19 min read

Moving Average Cost: Formula, Examples and Inventory Valuation

When the same item is purchased repeatedly at different prices, a business needs a consistent rule for what those units are worth and what cost leaves inventory when goods are sold or issued. This guide follows one inventory item through six receipts and issues to show exactly how a moving average is recalculated — and when it normally stays the same.

Inventory can be easy to count and surprisingly difficult to value.

When the same item is purchased repeatedly at different prices, a business needs a consistent rule for deciding what each unit in stock is worth and what cost should leave inventory when goods are sold or issued.

The moving average cost method solves that problem by maintaining a continuously updated average inventory cost.

When new valued inventory enters at a different cost, the average is recalculated. When inventory leaves, the current average cost is normally used to value the issue.

The basic idea is simple:

New valued receipts can change the average cost.

Inventory issues normally consume stock at the current average without changing that average.

The accounting becomes more interesting once several receipts and issues happen in sequence.

This guide walks through the calculation transaction by transaction and shows how moving average costing affects inventory value and potentially cost of goods sold.

What is moving average cost?

Moving average cost is an inventory valuation method in which the average unit cost is typically recalculated when new valued inventory enters stock.

Instead of keeping each purchase price separate for issue valuation, the method combines the value of the existing inventory with the value of the new receipt.

The result becomes the new average inventory cost per unit.

For example, assume a company currently holds:

10 units × €10 = €100

It then receives:

10 units × €15 = €150

After the receipt, inventory contains 20 units with a total inventory value of €250. The new moving average cost is:

New moving average
€250 ÷ 20
=
€12.50 / unit

The original €10 units and the new €15 units are therefore represented by one average inventory cost of €12.50.

This differs from methods such as FIFO, where different receipt costs remain represented through separate cost layers.

Moving average cost formula

The moving average cost formula is:

Moving average cost formula
Moving Average Cost = (Existing Inventory Value + New Receipt Value) ÷ (Existing Quantity + New Receipt Quantity)

The same formula can be written using unit costs:

Unit-cost form
New Average Cost = [(Existing Quantity × Existing Average Cost) + (Receipt Quantity × Receipt Unit Cost)] ÷ (Existing Quantity + Receipt Quantity)

For example, existing inventory of 10 units × €10 = €100 combined with a new receipt of 10 units × €15 = €150 gives:

  • Combined inventory: €100 + €150 = €250
  • Combined quantity: 10 + 10 = 20 units
  • New moving average: €250 ÷ 20 = €12.50

This calculation is generally triggered when a valued transaction introduces new inventory quantity and value.

An inventory issue normally works differently.

Rather than recalculating the average, the issue normally uses the current moving average to determine the value leaving inventory.

Step-by-step moving average cost example

Consider one inventory item. The business starts with:

Opening position
Quantity
10 units
Unit cost
€10.00
Inventory value
€100.00

Initial moving average cost: €100 ÷ 10 = €10.00. Now follow the item through several receipts and issues.

StepTransactionQty inQty outUnit costInventory qtyInventory valueMoving avg
OpeningOpening balance10€10.0010€100.00€10.00
1Purchase receipt10€15.0020€250.00€12.50
2Inventory issue8€12.5012€150.00€12.50
3Purchase receipt8€18.0020€294.00€14.70
4Inventory issue5€14.7015€220.50€14.70
5Purchase receipt10€12.0025€340.50€13.62
6Inventory issue10€13.6215€204.30€13.62

The pattern is immediately visible.

Receipts can change the average when their unit cost differs from the existing average. Issues normally do not change the average because they remove quantity and value using the current average cost.

Step 1: a higher-cost purchase receipt increases the average

Before the receipt, inventory contains 10 units, an inventory value of €100 and a moving average of €10.00.

The company receives another 10 units × €15 = €150.

After the receipt, quantity is 20 units and inventory value is €250. The new average is €250 ÷ 20 = €12.50.

The moving average therefore changes from €10.00 to €12.50. The new receipt was more expensive than the previous average, so the average inventory cost increased.

A goods receipt therefore affects more than physical quantity when inventory is valued continuously. It can also change the cost basis that later inventory issues will use.

Our guide to goods receipt accounting explains how a valued receipt can affect inventory quantity, value and accounting before a supplier invoice is even posted.

Step 2: an inventory issue uses the current average

The business now issues eight units at the current moving average of €12.50.

Issue value: 8 × €12.50 = €100.

Before the issue: 20 units, €250 inventory value. After the issue: 12 units, €150 inventory value.

Check the remaining average: €150 ÷ 12 = €12.50.

The moving average remains unchanged. This is one of the most important properties of the method:

An inventory issue normally reduces quantity and inventory value proportionally at the current moving average cost, so the issue itself does not change the average.

If the issue represents a customer shipment, that inventory value may become part of the cost-of-goods-sold calculation, depending on the ERP and accounting flow.

Step 3: another expensive receipt raises the average again

The business currently holds 12 units, €150 inventory value and a moving average of €12.50.

It now receives 8 units × €18 = €144.

New quantity: 12 + 8 = 20 units. New inventory value: €150 + €144 = €294.

New moving average
€294 ÷ 20
=
€14.70 / unit

The higher purchase cost pushes the moving average from €12.50 to €14.70.

The system does not simply use the latest €18 purchase price. It combines the new receipt value with the value already held in inventory. That distinction is central to the moving average method.

Step 4: another issue leaves the average unchanged

Five units are issued at the current average cost of €14.70. Issue value: 5 × €14.70 = €73.50.

Before the issue: 20 units, €294 inventory value. After the issue: 15 units, €220.50 inventory value.

Check: €220.50 ÷ 15 = €14.70. The moving average therefore remains €14.70.

Again, the issue reduces quantity and inventory value but does not create a new average cost.

Step 5: a cheaper receipt lowers the moving average

Moving average cost does not only increase.

Assume the next supplier receipt has a lower purchase price: 10 units × €12 = €120.

Before the receipt: 15 units, €220.50 inventory value, moving average €14.70.

After the receipt: quantity is 15 + 10 = 25 units, inventory value is €220.50 + €120 = €340.50.

New moving average
€340.50 ÷ 25
=
€13.62 / unit

The average therefore falls from €14.70 to €13.62.

A receipt above the current average tends to increase the moving average. A receipt below the current average tends to decrease it.

This is why moving average costing can smooth the effect of changing purchase prices over the inventory that remains on hand.

Step 6: inventory is issued at the new average

The company now issues ten units. Current moving average: €13.62. Issue value: 10 × €13.62 = €136.20.

Before the issue: 25 units, €340.50 inventory value. After the issue: 15 units, €204.30 inventory value.

Check: €204.30 ÷ 15 = €13.62. The issue once again reduces quantity and value proportionally while the moving average remains unchanged.

When does moving average cost change?

One of the most useful questions in practice is not simply how the formula works, but which ERP transactions should cause the average to change.

The exact behavior depends on the ERP, accounting configuration and inventory policy, but the following patterns are common.

Purchase receipt

Usually yes. A valued purchase receipt introduces quantity and inventory value. If the receipt cost differs from the current average, the moving average is normally recalculated.

Sales shipment or inventory issue

Usually no. An issue normally uses the current moving average cost. Quantity and value therefore leave inventory proportionally.

Positive inventory adjustment

It may. If an adjustment introduces quantity together with inventory value, the ERP may need to recalculate the moving average. The exact treatment depends on how the system values adjustments.

Our guide to inventory adjustments explains why valued corrections should stay tied to a documented reason rather than an unexplained balance change.

Purchase return

It depends. Some ERP systems reverse or reference the original receipt. Others apply different costing logic. The financial effect depends on the inventory valuation rules implemented by the system.

Retroactive or backdated transaction

Additional receipt costs can arrive after the goods. See landed cost for how qualifying freight and other costs may affect valuation, depending on timing and ERP costing logic.

ERP-dependent and potentially complex. A receipt entered with an earlier posting date may affect inventory that has already been issued.

Depending on the ERP, the system may recalculate later costs, post valuation adjustments, revalue COGS, restrict backdating, or apply another correction mechanism.

This is why moving average costing should not be treated as only a spreadsheet formula. Transaction chronology matters.

Moving average cost and COGS

Moving average costing can affect both the inventory balance sheet value and cost of goods sold.

The inventory journal entries guide shows the same COGS entry side by side under moving average and FIFO, from goods receipt through freight, invoice and count correction.

Assume the current moving average is €13.62 and five units are shipped to a customer. The inventory value associated with those units is:

5 × €13.62 = €68.10

Conceptually, where the accounting design recognizes inventory relief and COGS at shipment, the resulting entry may look like:

Conceptual shipment entry
Cost of Goods Sold
Recognizes the shipped inventory value
Debit €68.10
Inventory
Removes the moving-average cost of the shipped units
Credit €68.10

The exact journal design depends on the ERP, accounting policy and posting configuration.

The important valuation principle is that the inventory issue uses the applicable moving average cost to determine the value leaving stock.

That is why operational inventory movement and costing should remain connected. The warehouse transaction determines what quantity moved. The costing logic determines what value moved. The accounting flow determines where that value appears financially.

Moving average cost vs weighted average cost

Moving average cost and weighted average cost use closely related mathematics, but the terms can refer to different calculation timing.

Moving average cost
Transaction-driven
Generally associated with a perpetual inventory approach. The average is recalculated as relevant valued transactions occur: receipt → recalculate → issue → use current average → receipt → recalculate again. Inventory cost can change throughout the period.
Periodic weighted average cost
Period-driven
Calculated for a defined accounting period rather than after each relevant receipt: (Beginning Inventory Cost + Purchases During the Period) ÷ (Beginning Units + Units Purchased During the Period).

The main distinction is therefore timing. Moving average is transaction-driven. Periodic weighted average is period-driven.

Our guide to perpetual vs periodic inventory explains that broader distinction in more detail.

Moving average cost vs FIFO

Moving average and FIFO solve the inventory valuation problem differently.

Assume inventory contains 10 units at €10 and then 10 units at €15. Total inventory: 20 units. Total value: €250.

QuestionMoving averageFIFO
How is the 20 units represented?One combined average cost: €250 ÷ 20 = €12.50Two separate cost layers: 10 × €10 and 10 × €15
Value of an 8-unit issue8 × €12.50 = €1008 × €10 = €80, consumed from the oldest layer first
Audit explanationExplains the issue through the current average-cost basisCan explain which specific cost layers supplied the issue value

The methods can therefore produce different inventory and COGS values when purchase prices change.

Neither method should be selected simply because it creates a more attractive margin. The appropriate inventory valuation method depends on accounting policy, reporting requirements, the nature of the inventory and ERP configuration.

Our overview of inventory valuation methods places both approaches alongside periodic weighted average and specific identification, and works through a single 12-unit issue to show how each method splits the same inventory value between COGS and ending stock.

Why moving average costing becomes an ERP control problem

The mathematics are straightforward. The operational control is harder.

A reliable ERP implementation needs to explain:

  • what transaction created the quantity
  • what value entered inventory
  • when the transaction occurred
  • what the moving average was before the transaction
  • what the average became afterwards
  • which later issues consumed inventory using that average
  • whether the source transaction was reversed or corrected

Without that evidence, the current moving average can be mathematically correct while still being difficult to audit.

Consider a supplier receipt entered at the wrong price. If inventory has already been consumed, simply overwriting the old receipt cost can create questions about remaining inventory value, previously recognized COGS, gross margin, historical accounting entries, prior-period reports and audit evidence.

Source traceability
If the moving average changed from €12.50 to €14.70, can the system name the exact receipt that caused it?
And can it name every issue that consumed inventory at each average before the next receipt changed it again?

The moving average should be the result of controlled business transactions, not an isolated number that somebody manually maintains.

Common moving average cost mistakes

The moving average formula itself is difficult to get wrong. The underlying transactions are easier to get wrong.

Common causes of unreliable inventory valuation include:

  • incorrect receipt quantity
  • incorrect purchase cost
  • backdated transactions
  • undocumented positive adjustments
  • negative inventory
  • manual inventory-value overrides
  • incorrect returns
  • corrections performed directly on balances instead of through the source transaction

The stronger control principle is:

Correct the business event that caused the wrong inventory value whenever possible, rather than manually forcing the average to the number you expect.

If a purchase receipt was recorded incorrectly, the correction should remain traceable to that receipt or to an appropriate controlled correction.

If physical inventory was lost, damaged or otherwise removed from stock, the business needs evidence for that inventory event. Those are different business events even when both eventually affect inventory value.

Our guide to inventory reconciliation explains how to investigate a difference between system and physical stock before deciding how the moving average and inventory value should be corrected.

What happens when inventory reaches zero?

Zero inventory requires slightly different thinking. If quantity is 0 and inventory value is €0, there is no current inventory balance from which to calculate an average.

When the next valued receipt enters stock, its value normally establishes the new inventory cost basis. For example, from an opening position of 0 units and €0 inventory value, a new receipt of 10 units × €20 = €200 gives a new moving average of:

New moving average from zero
€200 ÷ 10
=
€20.00 / unit

An ERP may preserve historical cost information for reporting or reference, but historical cost should not be confused with the value of the new stock position.

What about negative inventory?

Negative inventory makes moving average costing significantly more complicated.

If an ERP permits inventory to be issued before the corresponding stock receipt exists, the final cost of those units may not yet be known.

When the later receipt arrives, the system may need to determine how the new cost affects transactions that already occurred. Depending on the ERP, that can involve:

  • cost adjustments
  • inventory revaluation
  • COGS revaluation
  • recalculation of later transactions
  • special negative-stock costing logic

There is no single universal treatment across every ERP system.

For inventory-heavy businesses, preventing unsupported negative stock can be a cleaner control than repairing its valuation consequences later.

Moving average cost example summary

The complete example can be reduced to the following transaction chain.

Opening — 10 units × €10 → €100.00 → AVG €10.00
Receipt — 10 units × €15 → 20 units, €250.00 → AVG €12.50
Issue — 8 units × €12.50 → 12 units, €150.00 → AVG €12.50
Receipt — 8 units × €18 → 20 units, €294.00 → AVG €14.70
Issue — 5 units × €14.70 → 15 units, €220.50 → AVG €14.70
Receipt — 10 units × €12 → 25 units, €340.50 → AVG €13.62
Issue — 10 units × €13.62 → 15 units, €204.30 → AVG €13.62

The central pattern is:

Receipts can move the average. Issues normally consume inventory at the current average.

Test your understanding

Quick control check
A company has 12 units in stock with a total inventory value of €150. It receives 8 more units at €18 each. What is the new moving average cost?
Scenario
System inventory: 12 units, €150.00 total value
New receipt: 8 units at €18.00 each
Gruvero Pilot Program
Evaluate inventory control from source document to finance.
Gruvero is being developed around traceable operational flows connecting inventory, costing evidence and finance. If you are evaluating ERP control for an inventory-heavy business, apply for a controlled pilot and review the workflows that matter to your operation.

FAQ

What is the moving average cost formula?

Moving average cost is calculated by dividing the combined value of existing inventory and a new valued receipt by the combined quantity: (Existing Inventory Value + New Receipt Value) ÷ (Existing Quantity + New Receipt Quantity).

Does an inventory issue change moving average cost?

Normally, no. An issue is normally valued using the current moving average cost, so quantity and inventory value decrease proportionally while the average remains unchanged. Negative inventory, retrospective transactions and certain adjustments can create more complex ERP behavior.

When is moving average cost recalculated?

It is typically recalculated when valued inventory enters stock, such as through a purchase receipt. Other transactions, including inventory adjustments, returns and retroactive postings, depend on the ERP's costing rules.

Is moving average cost the same as weighted average cost?

They use closely related mathematics but can differ in timing. Moving average normally refers to a perpetual method in which the average is recalculated as relevant transactions occur. Periodic weighted average generally calculates one average for a defined accounting period.

What is the difference between FIFO and moving average cost?

FIFO maintains inventory cost layers and normally consumes older costs first. Moving average combines inventory value into a continuously updated average unit cost. When purchase prices change, the two methods can therefore produce different inventory and COGS values.

Can moving average cost decrease?

Yes. If inventory is received at a unit cost below the current moving average, the new weighted average will normally decrease. In the example in this guide, a receipt at €12 reduced the moving average from €14.70 to €13.62.

Conclusion

Moving average costing is simple when viewed as one formula, but much more useful when viewed as a sequence of business transactions.

A valued receipt introduces quantity and value. The inventory system combines that value with the stock already on hand and calculates a new average. An issue then consumes inventory using the current average. The next valued receipt can change the average again.

That creates a continuous relationship between the source document, inventory quantity, inventory value, average cost, COGS and accounting evidence.

The formula matters. For a reliable ERP environment, however, the more important question is whether the business can explain which transactions created the number.

Evaluate inventory control from source document to finance.

Request pilot access to review how Gruvero is building traceable inventory, costing evidence and finance workflows for inventory-heavy businesses.

Check pilot fit