Moving Average Calculator screenshot

Moving Average Calculator

Simple moving averages of a pasted series for a window you choose, printed window by window.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Runs in this tab
No signup

What this page computes

Paste one number per line and type the window length. The simple moving average ending at observation i is the mean of the w values ending there: (x[i − w + 1] + … + x[i])/w, kept in a running sum so the whole series is one pass. Each line names the last observation it covers, and the window is printed at the top. Figures print to six significant figures, and inputs longer than forty windows print the first forty with the total count.

A moving average lags the series and loses w − 1 points at the start; the page does not backfill them or shift the line. A window of 1, or a window longer than the data, is refused with the numbers involved.

The series never leaves the tab, and the same values and window give the same lines on every reload.

The page smooths a series with a simple moving average: each printed value is the mean of the last w values, placed at the line where that window ends. A window of 3 over the eight values 2, 4, 4, 4, 5, 5, 7, 9 gives 3.33333 ending at line 3 and 7 ending at line 8, with the first w − 1 positions left empty because a full window has not yet arrived. A window below 2 or longer than the series is refused.

Smooth a series with a trailing simple moving average. One value per line in; one average per completed window out.

How to use it

Paste your series with one value per line, then type the window length. Each output line names the window size and the input line the window ended at, so the alignment is explicit rather than implied. The page prints up to forty averages and then says how many were left out.

Trailing, not centred

The average is trailing, not centred: it is the mean of the window that ends at that line, so the smoothed series lags the original by about half a window. This is why the first w − 1 lines have no average — there is no full window behind them — and the page does not backfill them with a partial mean, which would make the first values incomparable with the rest.

What to Expect

Best for

  • Removing short-term noise from a pasted series

What this tool keeps

  • Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.

Sample input

2 4 4 4 5 5 7 9

Sample output

window = 3, n = 8 SMA3 ending at line 3 = 3.33333 SMA3 ending at line 4 = 4 SMA3 ending at line 5 = 4.33333 SMA3 ending at line 6 = 4.66667 SMA3 ending at line 7 = 5.66667 SMA3 ending at line 8 = 7

Frequently asked questions

Where is each average placed?

At the line where its window ends, and each printed line names that input line. The average is trailing, so it lags the original series by about half a window rather than sitting centred on it.

Why are the first values missing?

A window of w needs w values behind it. The first w − 1 positions have no full window, so they produce no average rather than a partial mean that would not be comparable with the rest.

Is my series uploaded?

No. The averages are computed in this page from the pasted column, and nothing is posted to a server or stored.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.