How Does RSI Work?
RSI compares the average gain to the average loss over a lookback period (standard is 14 days) and converts that ratio into a number between 0 and 100. When recent gains are large relative to recent losses, RSI rises. When recent losses dominate, RSI falls. The formula normalizes the ratio so it always stays within the 0-100 range, making it easy to compare across different stocks.
The math (simplified)
Look at the last 14 days. Add up all the up-days' gains and divide by 14 (that's the average gain). Add up all the down-days' losses and divide by 14 (that's the average loss). Divide average gain by average loss to get the Relative Strength (RS). Then: RSI = 100 - (100 / (1 + RS)). If all 14 days were up, RSI approaches 100. If all 14 days were down, RSI approaches 0. In practice, RSI for most stocks hovers between 30 and 70 most of the time.
Why 14 periods?
Wilder chose 14 because it represents roughly half a month of trading (14 out of ~21 trading days). It's a balance between responsiveness and smoothness. Shorter periods (7, 9) make RSI more reactive but noisier. Longer periods (21, 28) make it smoother but slower to signal. Most charting platforms default to 14, and most research and backtests use 14, so sticking with it makes your analysis comparable to what everyone else is looking at.