Moving Average Filter Calculator

Paste your numbers and choose a window size to get the moving average series.

How it is calculated

The tool reads every number in the text box and slides a window of w consecutive values along the series. Each output is SMAi = (xi + xi+1 + ... + xi+w-1) / w. Only complete windows are used, so n values give n - w + 1 results and the first w - 1 positions have no output; the count is shown as well. The window must be a whole number of at least 1 and no larger than the number of values, otherwise there is no result. A window of 1 returns the series itself. Separators can be spaces, new lines, semicolons or commas. If the text contains a space, new line or semicolon, a comma between two digits is read as a decimal comma (1,5 means 1.5); with no whitespace at all, commas separate values. Forms such as .5 and 1e3 are understood. Results are rounded to two decimals.

Worked example

Series 10, 12, 14, 18, 20, 19 with a window of 3. Six values and w = 3 give 6 - 3 + 1 = 4 results. First window: (10 + 12 + 14) / 3 = 12.00. Second: (12 + 14 + 18) / 3 = 14.67. Third: (14 + 18 + 20) / 3 = 17.33. Fourth: (18 + 20 + 19) / 3 = 19.00. The tool lists 12.00 14.67 17.33 19.00 and reports 4 points. The raw series climbs unevenly from 10 to 19, while the averages form a smoother upward line.

Try this example →

Common mistakes

  • Expecting one output per input value. The filter uses full windows only, so the result is shorter by window - 1 points.
  • Mixing comma styles, such as 10,12, 14,16. Because the text has a space, the commas between digits are read as decimals and you get 10.12 and 14.16 instead of four values. Pick one style: separate values with spaces or new lines, or use commas alone and dots for decimals.
  • Choosing a window as long as the whole series and expecting a trend. That gives a single overall average, so pick a window much shorter than the data.
  • Entering a fractional or zero window such as 2.5. The window must be a whole number of at least 1, and no longer than the series.
  • Choosing too large a window and lagging the trend. A bigger window smooths more but reacts later to real changes.

About this calculator

This calculator applies a simple moving average (SMA) filter to a sequence of numbers: for each point, it averages that value with its neighbours across a chosen window size, sliding the window across the whole series. The result is a smoothed version of the original data with high-frequency noise damped out.

It's one of the most basic finite impulse response (FIR) filters in signal processing, and it's widely used in time-series analysis — stock price smoothing, sensor-data cleanup, audio processing — anywhere short-term fluctuations need to be filtered out to reveal the underlying trend.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators