MarketShots
Search0 day streak,0 XPlevel 1

Technical analysisModule 3, lesson 14 of 32

The relative strength index (RSI)

How to calculate RSI from average gains and losses, what overbought and oversold readings mean, and why RSI can stay extreme throughout a strong trend.

Time
6 min read
Level
Intermediate
Updated

In this lesson

  • Calculate RSI from average gains and average losses.
  • Interpret RSI readings and the conventional 70 and 30 levels.
  • Explain why RSI can stay overbought or oversold for long periods in strong trends.
  • Describe divergences and why they are weak signals on their own.

Builds on

  • Moving averagesRSI is built from averages of gains and losses, smoothed as explained there.
On this page
  1. In simple terms
  2. Calculating RSI
  3. Overbought and oversold
  4. Divergences
  5. Why it matters
  6. Limitations
  7. Common mistakes
  8. Try it yourself

In simple terms

The relative strength index (RSI) measures how strong recent gains have been compared with recent losses. It produces a number between 0 and 100:

  • Near 100: almost all recent moves were up.
  • Around 50: gains and losses were balanced.
  • Near 0: almost all recent moves were down.

RSI is a momentum oscillator: it describes the speed and direction of recent price changes, swinging between fixed limits. (It has nothing to do with comparing a share with an index, which is sometimes also called relative strength.)

Calculating RSI

RSI

RS = average gain ÷ average loss (over N periods, usually 14) RSI = 100 − 100 ÷ (1 + RS)

The averages are taken over all N periods: up days contribute their gain and zero loss; down days contribute their loss and zero gain.

Worked example: A 14-day RSI

A made-up share's daily changes over 14 days add up to:

Total of the gains on up days₹8.30
Total of the losses on down days₹3.20
Average gain: 8.30 ÷ 14₹0.593
Average loss: 3.20 ÷ 14₹0.229
RS: 0.593 ÷ 0.2292.59
RSI: 100 − 100 ÷ (1 + 2.59)about 72

The share has gained much more on its up days than it lost on its down days, giving an RSI above 70.

After the first value, most charting tools smooth the averages so that each new day adds a fraction of its gain or loss to the previous average, a method introduced by J. Welles Wilder, who created RSI. This makes RSI change gradually rather than jumping as old days drop out.

Overbought and oversold

Readings above 70 are conventionally called overbought and below 30 oversold. The words suggest the price has gone "too far" and must reverse. That is not what RSI measures.

  • An RSI of 80 means gains have far outweighed losses recently. It describes strength, not an obligation to fall.
  • In a strong uptrend, RSI can stay above 70 for weeks while the price keeps rising. Selling every time RSI passes 70 means repeatedly selling into strength.
  • In a strong downtrend, RSI can stay below 30 for long periods. Buying every oversold reading means repeatedly buying into weakness.

Worked example: A made-up trend

During a three-month rally, Kaveri Software's 14-day RSI rose above 70 on day 12 and stayed between 70 and 85 for 35 trading days, while the price rose a further 22%. A trader selling at the first overbought reading missed the move; a trader who also sold short lost money.

Some traders use RSI differently in trends and ranges: in a range, extremes may mark turning points more often; in a trend, they may confirm strength. Identifying which you are in is the hard part, as the market structure lesson explains.

Divergences

A divergence occurs when the price makes a new high but RSI makes a lower high (or the price makes a new low but RSI a higher low). It shows that momentum is slowing: the latest rise was smaller than the previous one.

Slowing momentum often precedes a turn, but it also often precedes nothing at all: trends can continue for a long time with repeated divergences. On its own, a divergence is a weak signal, and its success rate needs testing like any other, as the false signals lesson explains.

Why it matters

RSI is one of the most popular indicators in trading apps and tip groups, usually with the message "RSI above 70, sell". Understanding the calculation shows that RSI measures recent strength, not what happens next, and explains why mechanical overbought and oversold rules often fail in trending markets.

Limitations

RSI depends on the period chosen; shorter periods swing more and give more extreme readings. It is built only from past closing prices and lags turning points. The 70 and 30 levels are conventions, not discoveries.

Common mistakes

  • Treating overbought as "about to fall".
  • Fighting strong trends with RSI extremes.
  • Trading every divergence.
  • Changing the period until RSI fits past turning points.

Try it yourself

  1. Take 15 consecutive closing prices for any share and calculate the 14 daily changes.
  2. Add up the gains and losses, find the averages over 14 days, and calculate RSI.
  3. Compare your result with the RSI on a charting tool, which may differ slightly because of smoothing.
  4. Find a period when RSI stayed above 70 and note what the price did.

Key takeaways

  • RSI compares the size of recent gains with the size of recent losses on a scale from 0 to 100. The standard period is 14.
  • RSI = 100 − 100 ÷ (1 + RS), where RS is the average gain divided by the average loss over the period.
  • Readings above 70 are conventionally called overbought and below 30 oversold. These describe strong recent moves, not coming reversals.
  • In a strong uptrend RSI can stay above 70 for weeks; in a strong downtrend it can stay below 30. Selling every overbought reading means fighting the trend.
  • Divergences between price and RSI describe slowing momentum. They often fail as signals on their own.

Check your understanding

Over 14 days a share's average gain on up days, spread over all 14 days, is ₹0.60 and its average loss is ₹0.30. What is its RSI?

Finished reading?

Your progress is saved only in this browser.

Terms used in this lesson

Relative strength index
A momentum oscillator from 0 to 100 that compares the size of recent gains with recent losses, usually over 14 periods.
Momentum oscillator
An indicator that describes the speed or strength of recent price changes, usually swinging between fixed limits.
Trend
The direction of prices over a period, defined by the sequence of swing highs and lows on a chosen timeframe.

Spotted a mistake or something unclear? Report it by email. Here is how corrections work.

This lesson is general education, not investment advice. Examples use made-up or clearly dated figures to explain ideas; they are not recommendations. Read the disclaimer.