Moving Average Calculator

Compute simple (SMA), exponential (EMA), and weighted (WMA) moving averages over any number series. Choose the window size and get the smoothed value at each point — all in your browser, nothing uploaded.

Moving averages (JSON)

About this tool

The moving average calculator smooths a number series by averaging values over a sliding look-back window. It computes the three most widely used moving averages side by side:

Paste your series (separated by spaces, commas, semicolons, or newlines), choose a period (the window size), and the tool returns the SMA and EMA at every point. During the warm-up region — before enough points are available to fill the window — the value is reported as null.

How to use it

  1. Paste or type your numbers into the Number series box.
  2. Set the Period — e.g. 3 for a 3-point average, 20 for a 20-day average.
  3. Read off the SMA and EMA arrays, one entry per input point.

Common uses

Privacy

Everything runs locally in your browser via WebAssembly. Your data is never uploaded to a server.

FAQ

Why do the arrays start with null values?

A moving average needs a full window before it can produce a value, so the first period − 1 entries are null for all three averages. The EMA's first real value (at index period − 1) is seeded with the simple mean of that first window, then advanced with the EMA recurrence from there.

SMA, EMA, or WMA — which one should I look at?

SMA weighs every point in the window equally, so it's the smoothest but the slowest to react. EMA (smoothing factor k = 2/(period + 1)) responds faster to recent moves — it's the usual choice in trading. WMA sits in between, weighting the window linearly 1, 2, …, period so the newest value counts most. The tool returns all three so you can compare directly.

What are the size limits?

Up to 100,000 data points and a period of up to 10,000. The period must also be no larger than the number of points you paste — a 20-point average of a 10-value series is rejected with an error rather than padded.

How precise are the results?

Each value is rounded to 6 decimal places before it's returned. That's enough for price and sensor data while keeping the output readable; the underlying computation itself runs in full 64-bit floating point.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool moving-average "10, 12, 13, 12, 15, 16, 14, 18, 20, 19"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/moving-average/?series=10%2C%2012%2C%2013%2C%2012%2C%2015%2C%2016%2C%2014%2C%2018%2C%2020%2C%2019&period=3

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.