Supply and demand is the basis of inventory management, and making sure you have enough inventory on hand to meet order requests can be challenging, especially if you have variable peaks in your industry. By using the Moving Average analysis tool in Microsoft Office Excel 2003, you can use historical inventory levels to predict future demand, enabling you to better plan financial and physical resources.
Avoid shortages and overstock
The following illustration shows a summary of Contoso Pharmaceutical's inventory for their 10 best-selling products from last year. This report shows a large variance in the ending inventory quantities from month to month, indicating both shortages and stagnant product — neither of which is good for business. With a few simple steps, you can use this information to manage your inventory levels more precisely this year.

Note To use this feature, you must have the Excel Analysis Toolpak installed on your computer. If the Data Analysis command doesn’t appear on the Tools menu, you must install the Analysis ToolPak.
How?
To install the Analysis ToolPak, click Add-Ins on the Tools menu, select the Analysis ToolPak check box, and then click OK.
If the Analysis ToolPak check box is not visible, be sure you have your original Microsoft Office or Excel installation media nearby, double click the Add/Remove Programs icon in Control Panel and then do one of the following:
For Microsoft Windows® 2000, Windows Millennium Edition, and Windows XP:
- If you installed Excel as part of Microsoft Office, click Microsoft Office in the Currently Installed Programs box and then click Change.
- If you installed Excel individually, click the Excel program entry in the Currently Installed Programs box, and then click Change.
Follow the instructions on the screen. The Analysis ToolPak can be found by expanding the Microsoft Excel for Windows node and then expanding the Add-Ins node.
The Moving Average analysis tool
The Moving Average analysis tool projects values in the forecast period, based on the average value of the variable over a specific number of preceding periods. A moving average provides trend information that a simple average of all historical data would mask. This example uses the data for Contoso product 1176 to predict a target inventory level for the new fiscal year.
Chart a target inventory level
- On the Tools menu, click Data Analysis.
- In the Data Analysis dialog box, click Moving Average, and then click OK.
- The Moving Average dialog box opens.

- In the Input Range box, enter a single row or column of data. This example uses the row of data from product 1176 on the Contoso top-10 products report.
-
In the Interval box, enter the number of values that you want to include in the moving average. In this example, enter 3, the default interval.
Note The interval is the number of data points used to calculate the moving average. The larger the interval, the smoother the moving average line; the smaller the interval, the more the moving average is affected by individual data point fluctuations.
-
In the Output Range box, enter the cell address where you want the results to start.
- Select the Chart Output check box to see a graph comparing the actual and forecasted inventory levels.
- Click OK.
The resulting chart gives a better picture of ideal inventory levels, and with a little fine-tuning, can show exactly what the optimal monthly ending inventory should be.

Add data labels to a chart
- Double-click the first data point in the Forecast series to open the Format Data Series dialog box.
- On the Data Labels tab, select the Value check box, and then click OK.

- Double-click the first data label to open the Format Data Label dialog box.
- On the Font tab, set the font size to 8.
- On the Number tab, select number from the list on the left.
- Set the decimal places to 0.
- Click OK.
Your chart now clearly shows your forecasted inventory levels and identifies each month’s optimal ending quantity.
