A moving average calculator smooths a series of numbers, such as daily prices, sales or temperatures, so that the underlying trend is easier to see. Paste your values in date order and choose the period, the number of values each average covers, and the calculator gives the latest simple moving average and exponential moving average, along with their most recent values. Use the simple average for an equal-weight view and the exponential one when recent values should count for more.
The moving average formulas
Simple moving average: SMA = (latest k values added together) ÷ k
Exponential moving average: s₀ = x₀, sₜ = α·xₜ + (1 − α)·sₜ₋₁
α = 2 ÷ (k + 1)
Wikipedia's Moving average article gives the simple moving average as the mean of the last k values, which can be updated by adding the newest value divided by k and dropping the oldest. Its Exponential smoothing article gives the exponential form, starting from the first value and blending each new value with the previous average using the smoothing factor α. It notes that the two have roughly the same distribution of forecast error when α = 2 ÷ (k + 1), which is the link between an exponential average and a k-period simple one that the calculator uses.
How to use the moving average calculator
- Paste your values in date order, oldest first.
- Enter the period: how many values each average should cover.
- Choose which average to show first.
- Press Calculate.
Worked example
A series rises steadily: 10, 11, 12, 13, 14 and 15. With a period of 3, the simple moving averages are 11, 12, 13 and 14, so the latest is 14. The exponential average uses α = 2 ÷ 4 = 0.5. Starting from 10, it moves to 10.5, 11.25, 12.125, 13.0625 and 14.03. Both averages trail the latest value of 15, because they include older, lower values, which is the lag that every moving average has in a rising series.
Simple or exponential
A simple moving average weights every value in the window equally and drops each one completely when it leaves the window. An exponential moving average gives the newest value the most weight and lets older values fade gradually, never dropping them entirely. As a result, the exponential average reacts faster to recent changes. The Exponential smoothing article notes that the term smoothing factor is something of a misnomer: a larger α gives less smoothing, because more weight goes to the latest value.
Choosing the period
A longer period smooths more but lags further behind changes; a shorter one follows the data more closely but lets more noise through. There is no single right choice. For monthly sales with a yearly pattern, a twelve-month average removes the seasonal swings. For daily prices, people often compare a short average with a long one to see whether recent movement is above or below the longer trend. Try a few periods in the calculator to see the trade-off for your data.
The starting value
The exponential average needs a starting point. The Exponential smoothing article sets the first smoothed value to the first data value, which is what this calculator does, and suggests averaging ten or more values for a more robust start. The effect of the starting value fades over time: the article notes a constant signal takes about 3 ÷ α steps to reach 95 percent of its value. For short series, the starting value matters more, so treat the earliest exponential values with care.
Other averages
The Moving average article also describes a weighted moving average, in which the newest value in an n-value window has weight n, the next n − 1, and so on down to 1, and a cumulative average of all values so far. For a plain average of a whole list, the average calculator works it out, and for spread around the average, the standard deviation calculator.
Updating as new values arrive
Both averages are easy to update. For the simple average, add the newest value divided by the period and take away the value that has just left the window divided by the period, which is the update rule in the Moving average article. For the exponential average, blend the newest value with the previous average using α. The calculator recalculates from the whole list, so you can paste the latest data each time and see the averages and recent values straight away.
Reading the recent values
The lists of recent averages show the direction of the trend. Rising averages show the values are generally increasing, and falling ones show they are decreasing. When the latest value moves above or below its moving average, the series has moved away from its recent typical level; how much that means depends on how noisy the data usually is. Comparing the simple and exponential lists shows how much the faster exponential average leads the simple one when the trend changes.
Common mistakes
- Entering values newest first. List them oldest first.
- Choosing a period longer than the data. You need at least as many values as the period.
- Expecting the average to predict. It describes the past.
- Comparing averages with different periods as if they were the same measure.
What next
Use this often? Add Moving Avera to your Home screen.
Frequently asked questions
How does a moving average calculator work?
It averages the last k values for the SMA and blends each value with the previous average for the EMA.
What is the 3-period SMA of 10, 11, 12, 13, 14, 15?
The latest is 14; the series of SMAs is 11, 12, 13, 14.
What smoothing factor does the EMA use?
α = 2 ÷ (period + 1), so 0.5 for a period of 3.
Which reacts faster, SMA or EMA?
The EMA, because it gives the newest value the most weight.
How does the EMA start?
With the first value, as in Wikipedia's Exponential smoothing article.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.