RSI Calculator (Relative Strength Index)

Calculate Relative Strength Index from average gains and losses.
Includes overbought (70+) and oversold (30-) zones for momentum trading signals.

RSI value

Welles Wilder published RSI in 1978. It is still the most-used oscillator on retail charts almost 50 years later. The formula:

RSI = 100 - (100 / (1 + RS))

where RS (Relative Strength) is the average gain divided by the average loss over the lookback period. Default lookback is 14 bars. Some swing traders use 9, intraday scalpers go down to 5, and longer-term traders push to 21 or 25.

The two-step calculation. The first period uses simple averages of gains and losses. Every period after that uses Wilder’s smoothing: the running average is updated as ((prev_avg × (N-1)) + current) / N. Wilder’s smoothing weights recent data less aggressively than an EMA, which is why RSI reads more smoothly than a stochastic on the same data.

That second step is the one people skip, and it is the reason a hand-calculated RSI drifts away from the chart after a few bars. Enter this bar’s gain or loss in the optional field and the calculator runs the smoothing step for you, giving both the new averages and the RSI they produce.

Reading the value.

  • Above 70: overbought, pullback risk rising
  • Below 30: oversold, bounce odds increasing
  • Crossing 50: trend bias flipping
  • Above 80 or below 20: extreme zones, common during strong trends

The classic mistake. Treating RSI > 70 as an automatic short signal. In a strong uptrend, RSI lives between 60 and 90 for weeks. Selling every 70 print burns capital. Better: use RSI for divergences (price making higher highs while RSI makes lower highs) or for confirmation alongside structure.

Worked example. Over 14 bars: total gains 12.6, total losses 4.2.

  • Avg gain = 0.9, avg loss = 0.3
  • RS = 0.9 / 0.3 = 3.0
  • RSI = 100 - (100 / 4) = 75

That is solidly overbought. In a ranging market, expect a pullback. In a strong trend, expect another leg up.

Now advance it one bar. Say the next close is 0.50 higher. The gain average becomes ((0.9 × 13) + 0.50) / 14 = 0.8714, the loss average becomes ((0.3 × 13) + 0) / 14 = 0.2786, and RSI reads 75.78. A rising bar barely moved it, because at 75 the indicator is already compressed near its ceiling.

Now suppose that bar had closed 0.80 lower instead. Gain average 0.8357, loss average 0.3357, RSI 71.34. A bar four fifths as large in the other direction moved it three times as far. That asymmetry is what makes RSI look sticky at extremes: getting from 75 to 80 takes several strong bars, and one hard down bar undoes them.

Reference points worth memorising. RSI 70 is exactly RS = 2.333, meaning the average gain is 2.33 times the average loss. RSI 30 is RS = 0.4286. RSI 50 is RS = 1.0, gains and losses averaging the same size, which is why the 50 line is the real trend divider rather than an arbitrary midpoint.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.