How is RSI calculated, and what does it actually say?
The Relative Strength Index, published by Welles Wilder in 1978, is the most used oscillator in the world and the most misread. Misreadings start where the arithmetic is skipped, so start with the arithmetic.
The recipe
- For each session, take the change in close. A positive change is a gain; a negative one is a loss recorded as a positive number. Unchanged counts as zero for both.
- Average the gains and the losses over 14 sessions. The first values are plain means; afterwards Wilder's smoothing applies: new average = (previous average × 13 + today's value) ÷ 14.
- RS = average gain ÷ average loss
- RSI = 100 − (100 ÷ (1 + RS))
A worked example
Over 14 sessions the up days added up to +14.0 points and the down days to −7.0 points.
- Average gain = 14.0 ÷ 14 = 1.0
- Average loss = 7.0 ÷ 14 = 0.5
- RS = 1.0 ÷ 0.5 = 2.0
- RSI = 100 − (100 ÷ 3) = 66.7
The intuition hiding in the formula
The same result comes out of a simpler-looking expression:
RSI = 100 × average gain ÷ (average gain + average loss) — here, 100 × 1.0 ÷ 1.5 = 66.7.
Read that in words: RSI is the share of recent movement that was upward, scaled to 0–100. Everything follows from it. If all fourteen sessions rose, the average loss is zero, RS is infinite and RSI is 100. If all fell, RSI is 0. Perfectly balanced movement gives 50.
What it does and doesn't know
- It knows the composition and pace of the last fourteen sessions.
- It does not know price level, valuation, liquidity, why anything moved, or anything at all about session fifteen.
- It counts point sizes, not day counts. Thirteen small up days and one large down day can print an RSI below 50 — which trips up people who read it as a vote tally.
Because it is smoothed and bounded, RSI is also comparable across instruments in a way that unbounded indicators are not: 66.7 means the same thing on a $9 stock and a $900 one.
About 70 and 30
Wilder proposed 70 and 30 as levels where a move is worth examining. They are conventions, adjustable like any parameter, and they emphatically do not mean "reverses here". That deserves its own lesson — and it gets one next.
Divergence, both halves of it
One observation traders make with RSI needs two pictures at once, because the claim is about the pair. Here is an authored price path whose second rally peak is higher than its first:
And here is an oscillator over the same twenty-six bars, whose second peak is lower:
Neither figure means anything alone. "Divergence" is the name for holding both facts in one sentence — and it is an observation, not a conclusion.
In the data
Here is Apple's published 14-day RSI for the latest session, a single number on the 0–100 scale:
Two things stand between it and an RSI you compute yourself. Wilder's smoothing carries every earlier bar forward at a decaying weight, so the number depends on where the history began. And the published figure is computed on dividend-adjusted closes, so an RSI worked by hand from traded closes will not match it for any dividend payer, even with the window matched.
Try it now
- Read the two marked peaks off each schematic above and write the divergence out as one sentence containing both numbers. Then write the sentence a chart-seller would use instead, and note exactly which word you had to add to turn an observation into a prediction.
- Now do the arithmetic on real closes — fifteen of them, which is fourteen sessions of change: Apple's last fifteen closes are the table below, and the right-hand end of the month on the chart. Compute the seed RSI by hand from the plain means, then translate the answer into the literal sentence: "about X% of the last fourteen sessions' movement was upward."
- Compare it with the published 14-day RSI in the section above and with the RSI pane under the chart. It will not match, for the two reasons named there; say which one you think accounts for more of the gap. Reproducing the arithmetic is the fastest cure for treating the number as magic.