Moving Average Calculator

By Harmain Manzoor ¡ Reviewed by Fahad Ullah

MathStatistics & Probability¡Last updated August 17, 2026

Created by

Harmain Manzoor

About Me Hi, I'm Harmain Manzoor, a content writer who specializes in semantic SEO writing. I have two years of hands-on experience writing content that is clear, well-researched, and built around what readers are actually searching for - not just stuffed with keywords. I hold a BS in English Literature and Linguistics, along with a Diploma in Information Technology. I am also a Lecturer of English at Government Degree College, Hangu. This academic background has given me a strong command of the English language and clear writing skills. I also have practical knowledge of HTML and CSS, which helps me understand how content actually works on a website, not just how it reads on paper. I'm comfortable using Microsoft Office and other everyday computer tools as well. What I'm Good At: • Writing SEO content that ranks well and is easy to read. • Understanding what readers are searching for and answering it clearly. • Basic HTML and CSS, so I can work directly with web pages. • Using Microsoft Office and other common software confidently. • Strong, clear English writing and grammar. I bring together good writing skills and technical knowledge, which makes me a solid fit for any team that needs content that works well both for readers and for search engines.

View profile →

Reviewed by

Fahad Ullah

SAAS SEO Expert | Software Engineer

I'm the Founder of 360Calculator.net, a platform dedicated to creating accurate, practical, and easy-to-use online calculators that help people solve everyday problems across a wide range of industries. As a Software Engineer, I personally build many of the calculators published on this website, especially those related to my areas of expertise. I focus on creating calculators that are accurate, reliable, fast, and simple to use, while ensuring the underlying formulas and logic are implemented correctly. Not every calculator on 360Calculator is built by me, but every calculator related to my expertise is carefully reviewed before it's published. I verify the calculation logic, test different scenarios, check the accuracy of formulas, and make sure the tool provides consistent and dependable results. I also review and improve the educational content that accompanies these calculators so users can understand not only the result but also how the calculation works and when it should be used. With more than 7 years of experience in SaaS SEO, I also ensure that our content is well-organized, easy to navigate, and created around real user needs. My primary goal is to make 360Calculator a trusted resource where people can confidently find accurate calculators and clear, helpful information. My mission is simple: build calculator tools that are accurate, transparent, and genuinely useful, while continuously improving their quality through testing, research, and regular updates.

View profile →
Moving Average Calculator banner for calculating moving averages quickly and accurately.
Calculate moving averages quickly and accurately with our free online Moving Average Calculator.

This calculator takes a series of numbers, whether that is daily stock prices, weekly sales figures, or monthly inventory costs, and works out the moving average for whatever period you choose. Type or paste your data, pick a period length, choose a method (simple, exponential, or weighted), and the tool returns the average along with a chart so you can see how the trend line moves against the raw numbers.

What Is a Moving Average and Why Do People Use It?

A moving average is a running total that recalculates every time a new data point comes in. You take the average of the last however many values, then when a new value arrives you drop the oldest one from the calculation and add the newest. That is the moving part, the window of numbers being averaged slides forward one step at a time.

The point of doing this is to cut through the noise. Raw price data, sales numbers, almost any real world series jumps around from one reading to the next, and it is hard to tell a genuine trend from a random blip just by eyeballing it. Smoothing the data with a moving average makes the underlying direction easier to see. Traders lean on this to judge whether a stock is trending up, down, or going nowhere. Businesses use the same logic to smooth demand or cost figures that would otherwise be too jumpy to plan around, which is close to how a moving average cost is used for inventory valuation, covered later in the FAQ section.

What Is the Formula for a Simple Moving Average (SMA)?

The simple moving average adds up the last N values and divides by N.

SMA = (P1 + P2 + ... + Pn) / n

Every number in the window counts equally, whether it came in yesterday or three weeks ago. Here is what that looks like with a small dataset, using a 3 period window.

Period

Value

3-Period Moving Total

3-Period Moving Average

1

5.2

-

-

2

4.9

-

-

3

5.5

5.2 + 4.9 + 5.5 = 15.6

15.6 / 3 = 5.20

4

4.9

4.9 + 5.5 + 4.9 = 15.3

15.3 / 3 = 5.10

5

5.2

5.5 + 4.9 + 5.2 = 15.6

15.6 / 3 = 5.20

6

5.7

4.9 + 5.2 + 5.7 = 15.8

15.8 / 3 = 5.27

 

What Is the Formula for an Exponential Moving Average (EMA)?

EMA works differently. Instead of treating every value the same, it gives more weight to whatever happened most recently, which means it reacts faster when the price starts to shift direction. The formula starts with a multiplier.

Multiplier = 2 / (period + 1)

From there, each new EMA value builds on the one before it.

EMA (today) = (Price today - EMA yesterday) x Multiplier + EMA yesterday

The very first EMA value in a series is usually just the SMA for that period, since there is nothing to build on yet. Two EMA periods come up constantly in technical analysis, the 12 period and the 26 period. Subtract the 26 period EMA from the 12 period EMA and you get the MACD line, which is a separate indicator built entirely out of two moving averages.

What Is a Weighted Moving Average (WMA) and How Is It Different from SMA and EMA?

A weighted moving average lets you assign a specific weight to each value in the window rather than letting the calculation decide the weighting for you. The formula is shown below.

WMA = (P1xW1 + P2xW2 + ... + PnxWn) / (W1 + W2 + ... + Wn)

Say you are averaging three values and want the most recent one to count for more. You might weight them 1, 2, and 3, so the third and most recent value carries three times the influence of the first. The short version of how these three methods differ, SMA treats every value the same, EMA automatically leans on recent values through its multiplier, and WMA hands that weighting decision to you.

How Do You Calculate a 3-Point (or Any N-Point) Moving Average?

This is really just SMA with a small window, but it is worth walking through because the sliding part confuses people the first time they see it. Say you have eight data points, 20, 21, 23, 22, 25, 24, 27, 26. With a 3 point window, you average the first three (20, 21, 23) to get 21.33. Then you drop the 20, add the 22, and average 21, 23, 22 to get 22. You keep doing this, one step at a time, until you run out of data. Each new average only uses the most recent three points, nothing further back.

How Do You Use the Moving Average Calculator Step by Step?

1.   Paste or type your data series into the input box. Commas, spaces, and line breaks all work.

2.   Set the period length, this is how many values go into each average.

3.   Choose your method, simple, exponential, or weighted.

4.   Click calculate to get your result and see it plotted on the chart.

 

What Data Format Does the Calculator Accept, and How Much Data Do You Need?

You can separate your numbers with commas, spaces, or new lines, or paste a column straight out of a spreadsheet. The one hard rule is that you need at least as many data points as your chosen period. If you set the period to 20 but only give the calculator 15 numbers, there is not enough there yet to produce a single average, and you will need to add more values before a result appears.

How Do You Choose the Right Period Length?

Period Length

Typical Use

5 to 10

Day trading, very short term signals

20

Short term swing trading

50

Medium term trend confirmation

100 to 200

Long term investing and major trend direction

 

There is a trade-off either way. Shorter periods react faster to new data but throw off more false signals along the way. Longer periods smooth things out and give a more reliable read on the bigger trend, but they lag further behind what is actually happening right now. The 50 day and 200 day periods get watched more closely than almost any other combination, mostly because that pairing is what defines a golden cross or a death cross, covered below.

How Do You Read and Interpret Your Moving Average Calculator Results?

The number itself only tells you so much. What matters more is the relationship between that number, or the moving average line, and the actual price or data point sitting next to it. Is the current value above or below its own average? Is the average line itself climbing, falling, or flat? Those two questions are really what a moving average is for.

What Does It Mean When Price Crosses Above or Below Its Moving Average?

When price moves above its moving average, that is generally read as a shift toward bullish sentiment. When it drops below, that is read as a shift toward bearish sentiment. It is worth being honest about the limits here though, a single crossover does not guarantee anything. Price can poke above or below the line for a day or two and snap straight back, which is exactly the kind of false signal that makes relying on one crossover alone risky.

What Is a Golden Cross and a Death Cross?

These are named events that happen when two moving averages of different lengths cross each other, most commonly the 50 day and the 200 day. A golden cross is when the shorter average crosses above the longer one, generally read as a bullish signal. A death cross is the reverse, the shorter average dropping below the longer one, generally read as bearish. Analysts who track these usually look at more than just the crossover point itself, they also check how long the prior trend had been running and where both averages sat at the moment they crossed.

SMA vs EMA: Which Moving Average Should You Use?

 

SMA

EMA

Reaction speed

Slower, lags behind recent moves

Faster, reacts quickly to new data

Smoothness

Smoother line, fewer false signals

More sensitive, can whipsaw in choppy markets

Best suited for

Longer term trend confirmation

Short term or active trading

 

Neither one is strictly better than the other, it comes down to what you are using it for. If you are holding a position for months and want a clear read on the bigger trend, the smoother SMA line is usually more useful. If you are trading actively and need to react quickly when momentum shifts, EMA's speed is the bigger advantage, even though that speed means more noise to filter out.

How Does a Moving Average Fit into the Wider Family of Averaging and Statistical Tools?

A moving average is really just one specific way of applying an average, a rolling one that updates as new data comes in rather than sitting fixed once calculated. Once that clicks, it becomes easier to see how it connects to the more general statistical tools people reach for any time they need to summarize a set of numbers rather than track how something changes over time.

How Is a Moving Average Different from a Simple Average?

A simple average takes every value in a dataset once and gives you a single number back. A moving average keeps recalculating that same idea over and over on a sliding window, so instead of one result you get a whole series of them. If all you need is one overall figure for a fixed set of numbers, without the sliding window, the average calculator handles the mean, median, mode, and range in one go.

How Does a Weighted Moving Average Relate to a General Weighted Average?

The weighted moving average covered earlier on this page is a rolling version of a much simpler idea, giving certain values more influence than others when you average them. If you just need to work out a one-time weighted result, say combining grades or scores that carry different weights, the weighted average calculator does that same weighting math without the sliding window.

How Do You Measure How Spread Out Your Data Is Around a Moving Average?

A moving average smooths a trend, but it does not tell you how far individual values typically stray from that trend line. That is a separate question, and it is what standard deviation answers, how much a dataset spreads out around its average. Once you have your moving average sorted here, the standard deviation calculator will show you exactly that spread for the same numbers.

How Is Variance Different from the Spread Measured Around a Moving Average?

Variance and standard deviation measure the same underlying idea, how spread out a dataset is, just on a different scale, variance is the average of the squared differences from the mean, and standard deviation is simply its square root. If you want to see that calculation broken out step by step alongside your moving average data, the variance calculator walks through it in full.


Leave Your Feedback

Help us improve this calculator

Rating

Recent Feedback

No feedback yet.