Accounting12

What Is the Moving Average Formula and How to Use It?

Posted by ThomasLast Updated October 13th, 2023
— 6 minutes reading

Costing methods are important to nail down. This is because each method can report very different profits and cost of goods sold (COGS), even when you calculate from the same stock levels and purchase prices. We’ve discussed FIFO (First in first out) and LIFO (Last in first out) costing methods in other articles, so now it’s time to discuss a third option, the moving average formula. The moving average formula is a solid choice for ensuring your costs are always up to date.

A moving average formula will generate a product cost that falls between what FIFO and LIFO would report. This can be very useful if it isn’t possible or feasible to deal with multiple costing layers.

Be sure to download our handy Inventory Formula Cheat Sheet. It has 7 of the most common inventory formulas all in one convenient location.

Download your inventory cheat sheet now!

The moving average formula doesn’t use costing layers

You might recall this table for Zealot lens purchase and sales orders, which we used to discuss FIFO and LIFO. We tallied the cost of goods sold for 70 units by finding the sum of different costing layers.

costing layers per FIFO go from oldest to newest, costing layers per LIFO go from newest to oldest

FIFO used January and February’s orders to derive COGS because it took from the oldest stock first. LIFO used March and February for COGS because it took from the newest stock first. Now let’s examine COGS by tallying the sale of 70 units on March 19 and March 23:

An example of calculating cost of goods sold using the FIFO and LIFO costing method.

Whichever way you slice it, that’s two costing layers you have to account for when you sell those goods. Multiple cost layers can make it difficult to calculate profit or COGS. Especially when a sales order uses stock from different purchase orders (with varying layers of cost). The current example is neat and tidy because the sales orders use exactly two costing layers. However, you can often have sales orders that take all the Zealot lenses from January and just three from February. That would leave you with a partial cost layer from February that you still need to account for moving forward.

How to use the moving average formula

Using a moving average formula saves you from having to track any costing layers. Instead, you’ll re-calculate the average cost per unit each time you purchase more stock — hence the name “moving average”. Here’s the same set of POs for Zealot lenses, with an extra column for unit cost:

The Unit cost in the moving average formula is recalculated each time new stock comes in

You base the unit cost on the value of incoming stock + the value of leftover stock from previous orders. Your total cost is the value of what you have left + the value of the newly received stock. You get unit cost when you divide the total cost after a PO by the total quantity after a PO. Here’s how to use the moving average formula to arrive at the unit cost of $10.50:

Calculating cost with the moving average formula is Total Cost after PO divided by Total Quantity after PO equals Unit Cost

The big advantage of the moving average is that COGS becomes much easier to calculate. You would simply determine how much of a product you’ve sold and multiply that amount by your current unit cost. You’ll only have one unit cost to worry about because you’ll always recalculate unit costs after every PO. This makes it much simpler to track the actual cost of goods sold, regardless of whether you sell 10 or 100 products per order.

Now let’s go back to the sales orders of 70 units of Zealot lenses from earlier. This time we’ll calculate the COGS with moving average:

Given a quantity sold of 70 and unit costs of $10.50, the total COGS per the Moving Average Formula is $735.00

FIFO vs. moving average vs. LIFO

Using the moving average formula to derive COGS from Zealot lens sales, you can see that it falls between the figures that FIFO or LIFO report:

  • FIFO reported a COGS of $720.00
  • Moving Average reported a COGS of $735.00
  • LIFO reported a COGS of $750.00

It’s important to remember that the cost of goods sold will not be identical when comparing FIFO vs. moving average vs. LIFO in a particular period of time, like a financial year. This can affect how much revenue your business ends up reporting, which affects how much tax you pay. Determining which costing method suits your business and sticking to it is essential.

Disadvantages of moving average costing

Although the moving average costing method is pretty widely used, there are some downsides that you should be aware of before you fully commit. Some of those are:

  • Distorted data – Extreme fluctuations in prices can impact the validity of moving average costing. For example, if you were to buy some stock at a discount. This is why moving average costing isn’t the best for businesses that sell a lot of seasonal products. These products experience dynamic pricing, which changes drastically during the off-season, throwing off your data. 
  • Fluctuating profit margins – Since you continually adjust moving average cost with each purchase, your COGS and gross profit margins will both be impacted.
  • Complex financial reports – Compared to other costing methods like FIFO and LIFO moving average costing can make financial reporting much more complicated. The reason for this is because each inventory’s value is continually changing. This makes it challenging to provide clear and concise financial statements.

Whatever costing method you decide to use should be based on what’s good for your specific situation. There really isn’t a “one size fits all” for businesses, but using moving average costing is a pretty good option. 

inFlow Inventory makes moving average costing easy

Some businesses track their FIFO and LIFO costs on paper, but if you choose to use moving average, you’ll want software to help you keep all the math manageable. Excel can work if you have a formula to keep rolling the totals from a previous cell, but that requires consistent fine-tuning. inFlow handles all of these critical, continuous calculations on the back end so you can focus on other aspects of your business.

This method of cost tracking works very well for many small businesses. For this reason, we’ve made it the default costing method in our software (although you can change this). If you start using inFlow, it will automatically use the moving average formula so that you can see how unit cost has changed over time.

Try inFlow for free
No credit card required. Sign up now!