InfyCalculator
➗

Moving Average Calculator

Smooth a series with a simple moving average — pick a window size and see the averaged values that reveal the underlying trend.

Values (comma or space separated)
Window size
Loading calculator…

How it works

MAₜ = (xₜ₋ₙ₊₁ + … + xₜ) ÷ n, for a window of n values

A simple moving average replaces each point with the average of it and the previous n − 1 points, sliding the window one step at a time. It damps short-term noise so a trend stands out, at the cost of lag — the average reacts to change more slowly as the window grows. A window of n produces (length − n + 1) averaged points, because the first full window only forms once n values are available.

Worked example

For 10, 12, 14, 13, 15, 16, 18 with a window of 3, the first average is (10 + 12 + 14) ÷ 3 = 12, the next is (12 + 14 + 13) ÷ 3 = 13, and so on, ending with (15 + 16 + 18) ÷ 3 = 16.33. Seven values yield 7 − 3 + 1 = 5 moving averages.

Sources: Moving average — Wikipedia

Frequently asked questions

How do I choose a window size?

A larger window smooths more but lags more. Pick a window that matches the cycle you want to remove — for example 7 for daily data with a weekly pattern.

Why are there fewer averages than data points?

The first moving average needs a full window of values, so a window of n over m points produces m − n + 1 averaged points.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.