Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Simple Moving Average
14
average of the last n values
Period used (n) 5
Total values entered 5

What Is a Moving Average?

A moving average smooths out short-term fluctuations in a series of numbers to reveal an underlying trend. The most common form is the Simple Moving Average (SMA), which is simply the arithmetic mean of the most recent n data points. It is widely used in finance, sales forecasting, signal processing, and any situation where noisy data needs to be smoothed.

Jagged raw data line with a smoother moving-average line overlaid
A moving average smooths a noisy data series into a clearer trend.

How to Use This Calculator

Enter your data values separated by commas or spaces (for example 10, 12, 14, 16, 18). Optionally enter a period (n) — the number of most recent values to average. If you leave the period blank, the calculator averages every value you entered. The result is the SMA based on the last n values in your list.

The Formula Explained

The SMA over a window of n values is:

$$\text{SMA} = \frac{x_1 + x_2 + \cdots + x_n}{n}$$

You add up the chosen values and divide by how many there are. Each value carries equal weight, which is what distinguishes the simple moving average from weighted or exponential moving averages.

Sliding window over a row of data points selecting the most recent values
The SMA averages the values inside a sliding window of length n.

Worked Example

Suppose your data is 10, 12, 14, 16, 18 and you choose a period of 3. The calculator takes the last three values — 14, 16, and 18 — and computes: $$\frac{14 + 16 + 18}{3} = \frac{48}{3} = 16$$ If you leave the period blank, all five values are averaged: $$\frac{10 + 12 + 14 + 16 + 18}{5} = \frac{70}{5} = 14$$

FAQ

What if my period is larger than the number of values? The calculator caps the period at the total count, so it averages everything you entered.

Can I use decimals or negative numbers? Yes — any real numbers are accepted, separated by commas or spaces.

Is this the same as a weighted moving average? No. This tool computes the simple (equal-weight) moving average. Weighted and exponential averages give more importance to recent values.

Last updated: