RSI Calculator

Calculate the Relative Strength Index from closing price data. Instantly identify overbought and oversold conditions to time your entries and exits with precision.

Standard period is 14. Shorter periods are more sensitive.
Enter at least (period + 1) closing prices

RSI Result

RSI Value --
Signal Enter prices to calculate
Average Gain --
Average Loss --
0 - Oversold 30 50 70 100 - Overbought
Advertisement

What is the RSI Indicator?

The Relative Strength Index (RSI) is a momentum oscillator developed by J. Welles Wilder in 1978. It measures the speed and magnitude of recent price changes to evaluate whether an asset is overbought or oversold. The RSI oscillates between 0 and 100 and is typically displayed as a line chart beneath the price chart.

RSI is one of the most widely used technical indicators among traders and analysts. When RSI moves above 70, the asset is generally considered overbought, meaning it may have risen too far too fast and could be due for a pullback. When RSI drops below 30, the asset is considered oversold, suggesting it may have been pushed down excessively and could be primed for a bounce. The 50 level serves as a midpoint, with readings above 50 indicating bullish momentum and readings below 50 indicating bearish momentum.

Unlike trend-following indicators such as moving averages, RSI is a leading indicator that can signal potential reversals before they appear on the price chart. This makes it an invaluable tool for timing entries and exits, confirming trends, and spotting divergences between price action and momentum.

RSI Formula Explained Step by Step

The RSI calculation uses a smoothed moving average approach. Here is how the formula works, step by step:

  1. Calculate price changes: For each period, compute the change in closing price from the previous period. A positive change is a gain; a negative change is a loss (expressed as a positive number).
  2. Calculate Average Gain: For the initial RSI, sum all gains over the lookback period and divide by the period length. For subsequent values, use the smoothed formula: Average Gain = ((Previous Average Gain x (Period - 1)) + Current Gain) / Period.
  3. Calculate Average Loss: Apply the same approach as Average Gain but using the loss values. Average Loss = ((Previous Average Loss x (Period - 1)) + Current Loss) / Period.
  4. Calculate Relative Strength (RS): RS = Average Gain / Average Loss. This ratio compares the magnitude of recent gains to recent losses.
  5. Calculate RSI: RSI = 100 - (100 / (1 + RS)). This normalizes the RS value into a 0-100 range. When Average Loss is zero, RSI equals 100. When Average Gain is zero, RSI equals 0.

The smoothing technique used in the RSI formula means that the indicator considers all prior data, not just the most recent period. This gives RSI a more stable and reliable reading compared to a simple moving average approach.

How to Interpret RSI Values

Understanding what different RSI readings mean is essential for making informed trading decisions:

Learn more in our RSI Strategy Guide →

Advertisement

Frequently Asked Questions

What RSI period should I use?

The standard RSI period is 14, as originally recommended by J. Welles Wilder. This works well for most timeframes and instruments. Shorter periods like 7 or 9 make the RSI more sensitive and produce more signals, but also more false signals. Longer periods like 21 or 25 smooth out the indicator and produce fewer but more reliable signals. Start with 14 and adjust based on your trading style and the asset you are analyzing.

What does RSI above 70 mean?

An RSI above 70 indicates overbought conditions, meaning the asset has experienced strong upward momentum and may be due for a pullback or reversal. However, overbought does not automatically mean sell. In strong uptrends, RSI can remain above 70 for extended periods. Traders often wait for RSI to cross back below 70 as a confirmation signal before taking action. Combining overbought readings with other indicators such as divergence or resistance levels improves reliability.

Can RSI be used for all timeframes?

Yes, RSI works on any timeframe from 1-minute intraday charts to weekly or monthly charts. The calculation is the same regardless of timeframe. However, higher timeframes tend to produce more reliable signals with fewer false readings, while lower timeframes generate more frequent but noisier signals. Many traders use multi-timeframe RSI analysis, checking the RSI on a higher timeframe for the overall trend and a lower timeframe for entry timing.

What is RSI divergence?

RSI divergence occurs when the price makes a new high or low but the RSI does not confirm the move. Bullish divergence happens when price makes a lower low but RSI makes a higher low, suggesting weakening downward momentum and a potential reversal upward. Bearish divergence happens when price makes a higher high but RSI makes a lower high, indicating fading upward momentum and a potential reversal downward. Divergence is one of the most powerful RSI signals but should be confirmed with price action or other indicators.

Advertisement

Backtest RSI Strategy with Historical Data

See how RSI-based trading signals perform on real market data. Run a full backtest with customizable RSI periods, overbought/oversold thresholds, and detailed performance metrics.

Start Backtesting