Technical indicators

Exponential Moving Average (EMA): Formula, EMA vs SMA and Crossovers

An exponential moving average (EMA) is an average of closing prices that gives the most recent close the largest weight. Each new value is the previous EMA plus a smoothing multiplier, 2/(N+1), times the gap between the close and that previous EMA. Like any moving average, it describes past prices and lags them.

By RTX5 Editorial TeamLast updated: Editorial methodology
Illustration of six assumed closes with a 3-period simple moving average and a 3-period exponential moving average (k = 0.5). The two lines meet at bar 5 at 12.00, the EMA sits above the SMA at bar 6 (13.00 against 12.67), and an EMA formula card shows k = 2 / (N + 1).
Illustration only: the closes are assumed, and the EMA and SMA values match the worked example table in the text. Open full-size diagram (opens in a new tab)

In brief

What is an exponential moving average?

An exponential moving average weights recent closes more heavily than older ones. This guide covers the formula, a worked example you can check by hand, the comparison with the SMA, and the limits of reading crossovers.

Key takeaways

  • The EMA is the previous EMA plus k times the gap between the close and that previous EMA, where k = 2/(N+1). For a 10-period EMA, k is 2/11, an 18.18% weighting on the latest price according to StockCharts.
  • StockCharts starts the first EMA with a simple moving average of the first N closes. The TradingView and MetaTrader 5 pages cited in this guide do not describe the start.
  • In the worked example (N = 3, k = 0.5), the EMA and SMA are both 12.00 at bar 5, and the EMA sits above the SMA at bar 6. The closes are assumed for practice.
  • The faster response comes from the weighting. It is not a forecast, because both averages describe closes that have already happened.
  • A crossover describes a change in the gap between two averages. It lags price, can repeat inside a trading range, and changes whenever the period length changes.

Exponential moving average formula: the multiplier and the recursive step

An EMA is calculated one bar at a time. StockCharts ChartSchool writes each step as (close minus previous EMA) times the multiplier, plus the previous EMA, and gives the multiplier as 2 divided by the number of periods plus one. The StockCharts moving averages article states both.

  • Multiplier: k = 2 / (N + 1). For N = 3, k is 0.5. For N = 10, k is 2/11, which StockCharts says gives an 18.18% weighting to the most recent price.
  • Recursion: each value depends on the one before, so the first value needs a starting point (see the next section).
  • Source price: TradingView names close as its default price input. A different price series gives different numbers from the same settings.

MetaTrader 5 writes the recursion as CLOSE(i) times P plus EMA(i-1) times (1 minus P), where P is a percentage and is not tied to N. Check the period setting in your platform before matching a value to a formula.

How the first EMA value is seeded

The recursion needs a first value. StockCharts says to calculate a simple moving average and use it as the initial EMA value. In the worked example, the first EMA is therefore the three-bar SMA at bar 3.

The TradingView and MetaTrader 5 pages do not describe seeding, so the SMA start is one stated convention, not a rule every platform follows. Each later bar shrinks the influence of the start by a factor of one minus k. With k = 0.5, that influence halves on every bar.

Worked example: a 3-period EMA and SMA on assumed closes

Example: the closes in this table are assumed for calculation practice. They are not market data. The SMA is the sum of the last three closes divided by three. The EMA uses k = 2 / (3 + 1) = 0.5 and starts from the SMA at bar 3.

Example: 3-period SMA and EMA on assumed closes, rounded to two decimals
BarClose3-bar SMA3-bar EMA (k = 0.5)EMA against SMA
110.00Not definedNot definedNot defined
211.00Not definedNot definedNot defined
312.0011.0011.00 (seed equals SMA)Equal
411.0011.3311.00Below
513.0012.0012.00Equal (crossover point)
614.0012.6713.00Above

Example figures. The SMA at bar 3 is (10 + 11 + 12) / 3 = 11.00, and that value seeds the EMA.

Check the arithmetic. At bar 4 the SMA is (11 + 12 + 11) / 3, which is 11.33. At bar 5 the EMA is 11.00 + 0.5 x (13.00 - 11.00), which is 12.00. At bar 6 the EMA is 12.00 + 0.5 x (14.00 - 12.00), which is 13.00, and the SMA is (11 + 13 + 14) / 3, which is 12.67.

From bar 5 to bar 6 the close rose by 1.00. The SMA rose by 0.67, because the newest close entered the window and the oldest one left. The EMA rose by 1.00, which is half of the 2.00 gap between the new close and the previous EMA.

EMA vs SMA: the differences that matter on a chart

EMA and SMA average the same closes but weigh the window differently and start at different points. The SMA formula comes from the MetaTrader 5 help page; the EMA multiplier, seed and lag comparison come from StockCharts.

EMA vs SMA: calculation, weighting, starting point and lag
FeatureSimple moving average (SMA)Exponential moving average (EMA)
CalculationSum of the last N closes divided by NPrevious EMA plus k times the gap between the close and the previous EMA, with k = 2/(N+1)
Weight given to each closeEqual weight to each of the N closes in the windowMost weight to the latest close. With N = 3 (k = 0.5), each older close carries half the weight of the next newer one
Change from one bar to the nextThe new close minus the close that leaves the window, divided by Nk times the gap between the new close and the previous EMA
Starting pointNeeds N closes before the first valueSeeded with an SMA of the first N closes, according to StockCharts
LagLags price. StockCharts says the longer the moving average, the more the lagLags price. StockCharts says an EMA with recent data weighted more heavily lags less than an SMA, which suggests less lag at the same length, not none

The lag row reflects the comparison StockCharts makes. This table does not measure lag on any instrument.

The faster response is a property of the weighting, not evidence that the EMA predicts price. A smaller lag does not remove the lag.

Default lengths and conventions differ between sources

The cited references do not agree on one default length or starting method, so the table records each variant.

EMA defaults and conventions in the cited references
ReferenceDefault length statedMultiplier and start
StockCharts ChartSchool, SharpCharts overlaysEMA overlay set to 20 periods; SMA overlay set to 50 periodsMultiplier 2/(N+1); first value from an SMA
StockCharts ChartSchool, StockChartsACPEMA and SMA both default to 20 periodsMultiplier 2/(N+1); first value from an SMA
TradingView support: Exponential Moving AverageThe article says 9 days is the defaultMultiplier in the formula; the article says most users opt for a smoothing value of 2 and does not describe the start
MetaTrader 5 help: Moving AverageNo default period or method is statedP is a percentage of the price; the page does not link P to N and does not describe the start

Each row reports what that reference states on 10 November 2026.

Before comparing two charts, confirm the period, source price and starting method. A line labelled EMA 20 on one platform may not match EMA 20 on another.

Moving average crossovers: the definition and the example

A crossover happens when one moving average moves above or below another. StockCharts describes a bullish crossover as the shorter average crossing above the longer one, and a bearish crossover as the reverse. The two averages can both be EMAs, both be SMAs, or one of each.

The worked example has no shorter and longer pair, because both lines use three bars. It shows the mechanics instead: both averages are 12.00 at bar 5, and the EMA is above the SMA at bar 6. This is a reading of the arithmetic, not a trading rule. For a crossover built from two EMAs, see the MACD guide.

Name the two averages, their periods, the direction and the bar where it happened. Words such as confirmed or reliable overstate what a crossover shows. The cited pages give no tested hit rates for EMA crossovers, so none are given here.

Limits: lag, whipsaw, length choice and the starting value

  • Lag. Both averages use past closes, so a crossover can confirm a move after part of it has already happened.
  • Whipsaw in ranges. In sideways markets the averages can cross back and forth, and acting on each crossing can produce a run of losing trades.
  • Length changes the result. A shorter EMA reacts sooner and also to more noise. A longer one smooths more and reacts later. Changing N moves every crossover on the chart.
  • Starting value. Early values depend on where the calculation started, and that effect fades with each bar.
  • No guarantee. A setting or crossover that fits one past chart may not fit the next.

Other methods, each with its own limits, are covered in the price action trading, SuperTrend indicator and TRIX indicator guides.

Who developed the EMA, and what the references do not say

The references cited in this guide describe the formula but do not name who first devised it. This guide therefore gives no originator or origin date. Check a primary text before you quote one.

Risk disclosure

  • An EMA describes past closes. It does not forecast the next close, the next crossover or the size of any move.
  • Changing the length, source price or starting method changes every value. Position size and stops are separate decisions, covered in the stop-loss orders guide.
  • This page is educational and is not personal financial advice. Trading can lose money, including positions opened after an average crossed.

RTX5 status

This guide explains the exponential moving average in general and does not describe an RTX5 feature. No RTX5 release record confirms which indicators, chart types or alerts the product includes. RTX5 is Orrnn's trading terminal and broker-technology product. Its Windows desktop client is in preview, and the web and mobile clients are planned. A Google Play listing for Android is published, but the mobile client has no approved release record yet; check the product-availability record before relying on any RTX5 feature.

Check RTX5 product availability

Trust and methodology

How this research was prepared

We want you to be able to identify who owns the page, inspect the evidence, understand how tools were used, and challenge anything that looks wrong or out of date.

Accountable publisher

Published under the RTX5 Editorial Team byline. It identifies the responsible publishing organization; it does not imply that a named lawyer, regulator, financial adviser, or licensed expert approved this page.

Evidence you can inspect

4 primary references are listed on this page with context about what each one supports. The source set was checked on .

Assistance is disclosed

Automation and AI may help organize research, outline a page, or edit language. They are not treated as sources, are not presented as human experts, and do not remove the publisher's responsibility for the final page.

Primary references

Sources were checked on 10 November 2026. They explain market rules and concepts; they do not certify RTX5 or provide individual financial advice.

StockCharts ChartSchool: Moving AveragesGives the EMA step as the previous EMA plus the multiplier times the gap between the close and the previous EMA, the multiplier as 2/(Time periods + 1), and the SMA as the initial EMA value. States that a 10-period EMA applies an 18.18% weighting to the most recent price, gives default overlay lengths of 50 for the SMA and 20 for the EMA in SharpCharts and 20 for both in StockChartsACP, says EMAs with more recent data weighted more heavily lag less than an SMA (with no same-length condition attached), says the longer the moving average, the more the lag, and describes bullish and bearish crossovers. Checked 10 November 2026.MetaTrader 5 help: Moving AverageDefines the simple moving average as SUM(CLOSE, N) divided by N, lists simple, exponential, smoothed and linear weighted methods, and gives the EMA as CLOSE(i) times P plus EMA(i-1) times (1 minus P), where P is the percentage of using the price value. Does not state a multiplier in terms of N, a default period, a default method or the starting value. Checked 10 November 2026.TradingView support: Exponential Moving AverageStates the EMA as closing price times the multiplier plus the previous EMA times one minus the multiplier, gives 9 days as the default length and close as the default source, and says most users opt for a smoothing value of 2 without defining the smoothing factor in terms of N. Does not describe how the first value is seeded. Checked 10 November 2026.RTX5 product availabilityRTX5 status record. Use it to check which RTX5 products and clients are live before relying on any feature.

Questions readers ask

What is the formula for an exponential moving average?

The EMA today equals (the closing price minus yesterday's EMA) times the multiplier, plus yesterday's EMA. The multiplier is 2 divided by the number of periods plus one. For a 3-period EMA it is 0.5, and for a 10-period EMA it is 2/11, about 18.18%.

What is the difference between EMA and SMA?

A simple moving average gives every close in its window the same weight and drops the oldest close as each new bar arrives. An EMA reuses the previous EMA, so older closes never drop out completely, but their influence falls with each bar. In the worked example, the 3-period EMA reaches 13.00 at bar 6, while the 3-period SMA reaches 12.67.

Is an EMA crossover a buy or sell signal?

No. This guide gives no trading advice. Educational sources describe a bullish crossover as the shorter average moving above the longer one, and a bearish crossover as the reverse. Those descriptions do not show that price will follow, because a crossover happens after the averages have already moved and can repeat inside a trading range.

Which EMA length should I use?

No length is correct for every market. The references cited in this guide differ: StockCharts sets the EMA overlay to 20 periods in SharpCharts, and the TradingView article describes 9 days as its default. Choosing a length to fit a past chart is curve fitting. Test any choice on the instrument and timeframe you trade.

Does an exponential moving average lag price?

Yes. Every EMA is built from past closes, so it reacts after price moves. StockCharts says an EMA with recent data weighted more heavily lags less than an SMA. For two averages of the same length, that suggests the EMA lags less, but it still lags. A shorter period reacts sooner and to more noise, while a longer period smooths more and reacts later.

Who invented the exponential moving average?

The references cited in this guide describe the formula but do not name the person who first devised it, so this guide does not attribute the EMA to an individual or give an origin date. Check a primary text before you quote an originator or a year.