The central distinction in SMA vs EMA is how they distribute weight across observations. A simple moving average gives each included value an equal share. An exponential moving average combines the newest value with its previous result, carrying older observations forward with declining influence.
That distinction is more useful than saying one line is simply “better” or “faster.” The two calculations can react differently to the same sequence, and their relative position can change even when the latest price stays still. The SMA vs EMA example below builds both lines from a small fictional dataset, then shows what to check before comparing charts.
The examples use price units rather than a named stock. Readers researching Indian, Pakistani or overseas markets can apply the arithmetic while keeping the actual listing, currency and session definition attached to their data.
SMA vs EMA: start with the weights
For a length of n observations, an SMA is their sum divided by n. A three-observation SMA gives one-third weight to each of the latest three values. When a fourth value arrives, the oldest member leaves the window completely.
A conventional EMA uses a multiplier called alpha: 2 divided by (n + 1). Its update is: new EMA = alpha × new price + (1 − alpha) × previous EMA. For n = 3, alpha is 0.5. Half the updated result comes from the latest price and half from the accumulated previous result.
TradingView’s moving-average documentation sets out the equal-weight SMA and the conventional EMA multiplier. These are definitions of a transformation of past observations. The transformation does not reveal why a price changed or establish what the next observation will be.
Keep the units visible. If the inputs are rupees per share, both averages remain rupees per share. They are not percentages. A change from an average of 100 to 102 means two price units; expressing that as a percentage requires a separate denominator.
SMA vs EMA calculation: follow one price step
Consider nine completed observations: 100, 100, 100, 112, 112, 112, 112, 112 and 112. They form a deliberately simple price step. Use length three for both averages and initialise the EMA at observation 3 with the first three-value SMA, which is 100.
At observation 4, the SMA is (100 + 100 + 112) ÷ 3 = 104. The EMA is 0.5 × 112 + 0.5 × 100 = 106. The first response of the EMA is larger because the new price receives 50% of its weight, compared with one-third in the SMA.
At observation 5, the SMA becomes (100 + 112 + 112) ÷ 3 = 108. The EMA becomes 0.5 × 112 + 0.5 × 106 = 109. At observation 6, the SMA reaches 112 because its entire window now contains 112. The EMA is 110.5 because its previous result still carries some influence from the earlier 100s.
- Observation 3: close 100; SMA 100; EMA 100
- Observation 4: close 112; SMA 104; EMA 106
- Observation 5: close 112; SMA 108; EMA 109
- Observation 6: close 112; SMA 112; EMA 110.5
- Observation 7: close 112; SMA 112; EMA 111.25
- Observation 8: close 112; SMA 112; EMA 111.625
- Observation 9: close 112; SMA 112; EMA 111.8125
This example exposes an important limit on loose descriptions: the EMA responds more on the first step, but the SMA reaches the new constant level first. “EMA always stays closer to price” is too strong. The result depends on the sequence and on what “closer” means.

To reproduce the exercise, keep one column for the close, a second for the latest three-value average and a third for the recursive EMA. Leave the first two average cells unavailable under this chosen full-window convention. Do not populate them with zero.
Why the EMA keeps a fading memory
Expand the three-period recurrence once: today’s EMA = 0.5 × today’s price + 0.25 × yesterday’s price + 0.25 × the EMA from two observations ago. Expand it again and the older state receives half as much weight each time.
In the example, the difference between 112 and the EMA halves after every new 112: 6, 3, 1.5, 0.75, 0.375 and 0.1875. This follows directly from the recurrence. There is no new directional information in those observations; the line is still catching up with the earlier change.
TradingView’s EMA formula uses the prior EMA as an input. Fidelity’s EMA explanation also describes the recursive memory and an SMA starting value. An implementation may initialise differently or load history before the first visible bar, so the visible left edge need not be the actual beginning of the calculation.
Suppose two three-period EMA calculations begin with values that differ by 4 units, then receive identical subsequent prices. After one update their difference is 2; after two it is 1; after five it is 0.125. Matching the formula alone therefore does not guarantee an exact early match. The initial state matters too.
Separate length from chart timeframe
A length of 20 means twenty input observations. On a five-minute close series, it refers to twenty five-minute bars. On a daily close series, it refers to twenty daily bars. A daily average is not created merely by changing a chart label while leaving the input series untouched.
Here is a smaller example. Suppose two three-bar groups have closes of 10, 10, 16 and 16, 16, 10. The average of all six short-bar closes is 13. The average of the two group-ending closes, 16 and 10, is also 13, but only by coincidence. Change the first two closes from 10 to 20. The groups become 20, 20, 16 and 16, 16, 10. Their six-bar mean is now 98 ÷ 6, or approximately 16.3333, while the unchanged group-ending closes still average (16 + 10) ÷ 2 = 13. The different samples now give visibly different answers.
The coincidence is a useful warning: agreement on one sample does not prove equivalent construction. If you want a daily average on an intraday chart, inspect the indicator’s calculation timeframe and whether it waits for the daily observation to finish.
For a cross-border research note, record the exchange session and date rather than relying on your local midnight. An India or Pakistan display clock can help you read timestamps, while the price series still follows another venue’s session boundaries.
Inspect source fields, gaps and adjustments
Close is a common input, but an indicator can instead use open, a high-low midpoint or another specified series. Two lines with the same length can differ simply because they average different fields. Read the source setting before changing the mathematics to force a match.
Corporate-action adjustments also matter. A mechanical split step in an unadjusted stock history becomes an input to the average. A split-adjusted series can remove that unit change. Dividend-adjusted data represents another construction again. Label the adjustment choice and apply it consistently across the whole comparison. Our adjusted close versus close guide reconstructs the separate price fields.
Missing observations introduce a separate decision. Does the software skip a missing bar, hold the last value or stop the calculation? Those choices can produce different weights and effective elapsed time. The guide to missing market data versus zero explains why a blank record should not silently become an observed zero.
Also check whether the newest bar is complete. An average that includes a changing live close can move before the interval ends. A saved screenshot and a later historical export may differ for that legitimate reason, even when both came from the same provider.
Check SMA and EMA with a controlled price transformation
To audit an exported calculation, make a copy of the input series and replace every price with twice that price plus 10. Use a complete input sample, keep the periods and ordering unchanged, and transform the entire starting history too. This is a deliberately artificial consistency test; the added 10 is an audit offset.
In the original example, the first three prices of 100 become 210, and the first 112 becomes 234. At observation 4, the three-period SMA is (210 + 210 + 234) ÷ 3 = 218. That equals twice the original SMA of 104 plus 10.
The EMA seed becomes 210. With alpha 0.5, the next EMA is 0.5 × 234 + 0.5 × 210 = 222, which equals twice the original 106 plus 10. More generally, both averages follow the same transformation because their weights sum to one, with the EMA’s initial state transformed consistently.
If the copied EMA instead retains the old seed of 100, its first update becomes 167. That mismatch exposes the inconsistent seed. Compare transformed outputs with expected values before interpreting differences between two implementations. Passing this test verifies one property; it does not establish that the original market data or session boundaries are correct.
Write a conclusion someone else can reproduce
A useful description names the instrument, source, input field, adjustment basis, bar interval, average type, length, initialisation and last completed timestamp. Include any display offset: moving a line left or right changes its apparent alignment without changing which observations produced it.
For the exercise, the conclusion is specific: “With three-period averages and an SMA-seeded EMA, the EMA moves to 106 on the first 112 observation, while the SMA moves to 104. After three consecutive 112s, the SMA equals 112 and the EMA equals 110.5.” Nothing about that arithmetic establishes a profitable decision.
Store the small input sample and the calculation settings in a market research journal. If comparing the average with a social or sentiment measure, align the measurement windows using the principles in reading historical sentiment. Visual proximity alone is weak evidence of a shared cause.
Keep the input series, rolling-window membership and previous EMA state in separate worksheet columns. This makes two different causes visible: an SMA change can come from the value leaving its window, while an EMA change depends on the distance between the new input and its previous state. Once these averages are clear, the MACD worked example shows a distinct next step: subtracting two averages and then smoothing their difference. That derived oscillator should not be confused with either average itself.
SMA vs EMA: frequently asked questions
What do SMA and EMA stand for?
SMA means simple moving average. EMA means exponential moving average. Both transform a series into a smoother summary, but they assign weight differently. Always specify the source field and observation interval alongside the abbreviation.
Is EMA always more accurate than SMA?
Accuracy needs a defined task and benchmark. Both can be calculated exactly under their own formulas. A stronger reaction to a recent price does not automatically produce a better description, a better forecast or a more useful research result.
Does a 20-period EMA use only twenty prices?
Its length determines the conventional multiplier, 2/21. After initialisation, the recurrence carries older inputs forward with shrinking weights. Its history therefore differs from a twenty-observation SMA window that drops each oldest input completely.
Why can an SMA move when the newest price is unchanged?
A different old observation may leave the rolling window. In our price-step example, repeated closes of 112 still make the SMA rise because earlier 100s are being removed. Examine both the entering and departing values.
How much history is needed to calculate a moving average?
Under the full-window convention, an n-period SMA needs n valid inputs. An SMA-seeded EMA also begins with n inputs, but early results depend on that seed. A platform may fetch additional hidden history to reduce starting-point differences.
Can I average five-minute averages to obtain a daily average?
Only under carefully matched definitions and weights. An average of short-bar averages generally differs from an average of daily closes. Establish the underlying observations first; similar names do not make the calculations interchangeable.
Does an upward-sloping average prove that the latest price rose?
No. Its change reflects the whole update rule. An SMA can rise because a low old value leaves, while an EMA can rise if the newest price is above the previous EMA even when that price is below the previous close.
What does the EMA smoothing factor change?
A larger alpha gives the new input more weight and the previous state less weight. Under the common formula, shorter lengths create larger alpha values. Check whether the software uses that convention or a different smoothing definition.
Why do two platforms show different averages?
Compare symbol, venue, source field, completed-bar timestamp, timeframe, session, adjustment settings, missing-data rules and initial history. Work through a small exported sample before concluding that either platform’s calculation is wrong.
Can a crossover be treated as a guaranteed forecast?
No. A crossover describes an ordering change between two constructed series. Evaluating any claim about future outcomes requires a separately specified test. The calculation itself contains no guarantee about direction, timing or returns.
Explore CrowdSent and its current membership options for the wider service. This arithmetic guide is an editorial resource, not a claim that membership includes a particular indicator, worksheet or trading strategy.
Primary documentation checked 24 October 2026.
Educational information only. All numerical examples are hypothetical. This article provides no investment recommendation or forecast.