Advertisement

Relative strength index calculator (RSI)

Measure recent gains against recent losses to see whether a price is overbought or oversold.

Calculator

Enter at least one more price than the period. Separate prices with commas, spaces or new lines.

Latest RSI
57.92
Average gain
0.1898
Average loss
0.1379
Last price change
-0.5800
Recent RSI values
PriceChangeRSI
46.280.0070.46
46.00-0.2866.25
46.030.0366.48
46.410.3869.35
46.22-0.1966.29
45.64-0.5857.92

Advertisement

How this calculator works

The relative strength index compares the size of recent gains with recent losses on a scale from 0 to 100. A high reading means gains have dominated and the price may be overbought; a low reading means losses have dominated and it may be oversold. The standard calculation is Wilder's, which first averages the gains and losses over the period, then smooths each new value with the previous average. That smoothing makes the indicator slower than a simple moving average but steadier. The most common period is 14, giving a two-week view on a daily chart. A conventional reading treats 70 and above as overbought and 30 and below as oversold, with some traders using 80 and 20 in strong trends. Those thresholds are conventions, not laws: a price can stay above 70 for weeks during a strong rally, and a reading of 30 does not mean the fall is over. The indicator also says nothing about the size of the move, only its direction, and it gives no signal at all when a price is unchanged. Watch for divergence, where price makes a new high but RSI does not, as a warning that momentum is fading, though divergences can persist for a long time before anything happens. This calculator uses Wilder smoothing exactly as defined and reports the latest value plus the recent series so you can see how it has moved.

Formula

Change = price today - price yesterday. First average gain = sum of positive changes over the period / period, and first average loss = sum of absolute negative changes / period. Then average gain = (previous average gain x (period - 1) + gain today) / period, and the same for losses. Relative strength = average gain / average loss. RSI = 100 - 100 / (1 + relative strength), which is 100 when the average loss is zero and 0 when the average gain is zero with a nonzero loss.

Worked example

With the default 14-period series, the prices begin at 44.34 and rise and fall over twenty sessions. The first fourteen changes produce an average gain of about 0.2385 and an average loss of about 0.1000. Relative strength is 2.385, so RSI is 100 - 100 / 3.385 = 70.46, which lands just into the conventional overbought zone. Each later price updates the averages with the Wilder smoothing factor before the next RSI is shown.

Advertisement

Frequently asked questions

Should I use 14 periods?

Fourteen is the conventional default and the one Wilder used. Shorter periods such as 7 react faster and produce more signals, including more false ones. Longer periods such as 21 or 30 are smoother. Choose one and keep it, because the thresholds only mean the same thing at the same period.

Is RSI of 70 a sell signal?

Not by itself. In a strong uptrend RSI can stay above 70 for an extended period, and selling every time it does can miss most of the move. Most traders use RSI with price structure or another indicator rather than in isolation.

What is the difference between Wilder smoothing and a simple average?

The first RSI uses a simple average of the period changes. After that, Wilder smoothing weights the newest change at 1/period and the previous average at (period - 1)/period, which is an exponential average with a slow decay. A simple rolling average of the last 14 changes would give different values.

Why does the calculator ask for one more price than the period?

Because RSI is calculated from changes, and N changes need N + 1 prices. A 14-period RSI therefore needs 15 prices for the first value and one more for each subsequent update.

Can RSI be used on any market?

Yes. It works on any series of prices with a consistent interval, including stocks, currencies and commodities. Mixing intervals, such as daily and weekly prices in one list, produces a meaningless result.

Sources

Advertisement