πŸ“Š Moving Average Calculator

Simple and exponential moving averages from any price series.

-

Latest SMA value

Estimates for planning only, not financial advice.

A moving average smooths a bumpy series into a readable trend by averaging the last N values at every point. The 5-period simple moving average of the series 10, 12, 11, 13, 14, 15, 13, 16, 17, 15 ends at 15.20, the mean of the last five values. The exponential version weights recent prices more and ends at 15.05. This calculator computes both from any series you paste, at any period.

Traders live by these lines because price alone is noise. The average answers the only trend question that matters: is the recent past, on balance, pointing up or down? Everything else in technical analysis is commentary on that answer.

How to Use This Calculator

Paste prices oldest first, separated by commas or line breaks, and choose the period. The calculator returns the latest SMA and EMA plus whether the last price sits above or below each.

1

Paste the price series, oldest first. Ten or more points works well.

2

Set the period: 5 to 20 for short trends, 50 or 200 for the classic signals.

3

Read the SMA, EMA, and trend readings. For the momentum behind the trend, our month-over-month calculator measures the pace.

The Formulas

SMA = (sum of last N values) / N EMA: start at first value, then EMA = price x k + prior EMA x (1 - k) k = 2 / (N + 1)

The EMA's recursion is its elegance: each new price blends in at weight k while all history decays geometrically. With k = 1/3 for a 5-period EMA, the latest price always contributes a third, so the line hugs turns faster than the SMA, which gives every period an equal fifth.

SMA Versus EMA

SMAEMA
WeightingEqualRecent-heavy
Reaction speedSlowerFaster
Whipsaw in chopLessMore
Best forTrend definitionEntry and exit timing

Use them as a pair: the SMA defines the trend regime, the EMA times within it. Price above a rising 50-day SMA is an uptrend worth participating in; the 20-day EMA crossing below price is the exit signal inside it. Either alone is half a system. For risk context on the same series, our maximum drawdown calculator measures the pain the trend inflicted.

Worked Example

With the defaults: values 10, 12, 11, 13, 14, 15, 13, 16, 17, 15 and period 5. The latest SMA is (15 + 13 + 16 + 17 + 15) / 5 = 76 / 5 = 15.20. The EMA with k = 2/6 = 0.3333 iterates from 10 through the series to end at 15.05. The last price of 15.00 sits below both, a short-term downtrend reading even though the longer series rose from 10.

Classic Signals and Their Limits

The golden cross, 50-day crossing above 200-day, and its death-cross mirror have called every major trend change late and also cried wolf in every sideways market. Respect what moving averages are: trend followers, not predictors. They keep you on the right side of sustained moves and charge tuition in choppy ones.

My rule: let the long average decide whether to play and the short average decide when. Never let either decide how much; position size comes from risk tolerance and drawdown math, not from lines on a chart.

Building a Simple Moving-Average System

A complete trend system needs three parts: the trend filter, the entry trigger, and the exit rule. A common setup uses the 200-day SMA as the filter, only taking long positions when price is above it, the 50-day SMA cross as the entry trigger, and a close below the 50-day or a trailing stop as the exit. Backtest it on your market before trading real money; the rules are simple enough to test in a spreadsheet.

Expect the weaknesses upfront. Moving-average systems lose money in sideways markets, whipsawing between buy and sell signals, and they give back significant open profits at trend ends because exits lag. Position sizing matters more than the exact periods: risking 1 percent per trade keeps the inevitable whipsaw strings survivable. Many traders add a volatility filter, skipping signals when the average true range spikes, or require the longer average to be rising, not just above price. For the risk side of any system, our maximum drawdown calculator quantifies the pain.

Common Moving-Average Mistakes

The classic error is over-optimizing the period to past data, curve-fitting a 47-day average that worked beautifully in backtest and fails live. Round numbers work as well as anything because many traders watch them, making them self-fulfilling. Another mistake is using moving averages alone for entries without considering trend strength, volume, or support levels.

Do not average down against a falling moving average, adding to losers because the line "should" hold. Moving averages are not support; they are history. Use them to define the regime and size positions, then let price action and risk rules handle the rest.

Estimates for planning only, not financial advice.

Frequently Asked Questions

What is a moving average?

The average of the last N prices, recalculated as each new price arrives. A 5-period simple moving average of 10, 12, 11, 13, 14, 15, 13, 16, 17, 15 uses the last five values, 15, 13, 16, 17, 15, averaging 15.20. It smooths noise so the trend shows through.

How do you calculate a simple moving average?

Add the last N values and divide by N. For the 5-period SMA ending at the last value 15: (14 + 15 + 13 + 16 + 17 + 15) is six values, so take the last five, 15, 13, 16, 17, 15: sum 76, divided by 5 = 15.20. This calculator does it for the full series at your chosen period.

What is the difference between SMA and EMA?

The simple moving average weights all N periods equally; the exponential moving average weights recent prices more, reacting faster to new information. EMA uses a smoothing factor of 2/(N+1). Traders use SMA for stable trend lines and EMA for responsive signals.

How do you calculate an exponential moving average?

Start with the first value, then iterate: EMA = price x k + previous EMA x (1 - k), where k = 2/(N+1). For a 5-period EMA, k = 0.3333, so each new price contributes a third of the weight. The calculator runs the full recursion over your series.

What period should I use?

Match the horizon: 10 to 20 periods for short-term trading, 50 for the intermediate trend, 200 for the long-term trend on daily charts. Longer periods are smoother but slower; shorter periods are faster but noisier. There is no universally best period, only the one matching your holding period.

What is the golden cross?

When the 50-day moving average crosses above the 200-day moving average, a classic long-term bullish signal. The death cross is the reverse. They lag badly by construction, both moving averages trail the price, so they confirm trends rather than predict them.

Why do moving averages lag?

Because they average the past. A 200-day SMA reflects prices six months old on average, so it turns long after the price does. The lag is the price of smoothness: no lag-free smoothing exists. EMA reduces but does not eliminate it.

Should I use moving averages for investing decisions?

As one input among many. They excel at defining the trend and keeping investors from fighting it, and moving-average crossover systems have genuine historical merit. Used alone they whipsaw in sideways markets, generating buy and sell signals that both lose.

What is a weighted moving average?

A middle ground assigning linearly decreasing weights to older values: the most recent gets weight N, the oldest weight 1. It reacts faster than SMA but slower than EMA. Some traders prefer it for its intuitive weighting, though EMA dominates in practice.

Do moving averages work on any data?

Yes, anything with a time order: sales, website traffic, temperatures. The trading interpretation is finance-specific, but the smoothing math is universal. Our month-over-month calculator pairs well: MoM for the pulse, moving average for the trend.