The Relative Strength Index (RSI) is a momentum indicator used in technical analysis to measure the speed and magnitude of recent price changes. It ranges from 0 to 100.
The standard RSI formula is:
RSI = 100 – \frac{100}{1 + RS}
Where:
- (RS) = Average Gain ÷ Average Loss over a chosen period (typically 14 periods)
The intermediate calculation is:
RS = \frac{\text{Average Gain}}{\text{Average Loss}}
Step-by-step RSI Calculation (14-period example)
- Calculate price changes for each period.
- Separate gains and losses.
- Compute:
- Average Gain
- Average Loss
- Calculate RS.
- Plug RS into the RSI formula.
Example
Suppose:
- Average Gain = 1.2
- Average Loss = 0.8
Then:
[
RS = \frac{1.2}{0.8} = 1.5
]
[
RSI = 100 – \frac{100}{1+1.5}
]
[
RSI = 100 – \frac{100}{2.5}
]
[
RSI = 100 – 40 = 60
]
So the RSI is 60.
Interpretation
- RSI > 70 → potentially overbought
- RSI < 30 → potentially oversold
- RSI around 50 → neutral momentum
If you’d like, I can also show:
- RSI in Excel
- RSI in Python/Pine Script
- Wilder’s smoothing method
- A full worked example with stock prices
- RSI trading strategies

