Skip to content
Calculator Collection

RSI Calculator

Calculate the Relative Strength Index (RSI) from average gains and losses to identify overbought (>70) or oversold (<30) conditions. Essential for momentum traders and technical analysts evaluating short-term price extremes.

Last updated: May 2026

Fill in the required fields to see your result.

Compare with similar

About this calculator

The formula is the canonical Wilder (1978) RSI: RSI = 100 − (100 / (1 + RS)), where RS = averageGain / averageLoss over a lookback period (Wilder's original used 14 periods). Average gain is the mean of price increases over the lookback; average loss is the mean of absolute values of price decreases. Both are expressed in dollar (or absolute price) terms. The output is bounded 0–100 by construction. Edge cases: zero averageLoss produces division by zero (formula needs guard or returns 100); zero averageGain produces RSI = 0; equal gains and losses produce RSI = 50. The Wilder-original calculation uses a smoothed moving average (similar to exponential weighting) where each new period's value is computed from the prior smoothed value: smoothedGain[t] = (smoothedGain[t-1] × 13 + currentGain) / 14. Many platforms and this simplified formula use a simple arithmetic mean instead; results differ slightly. Standard thresholds: RSI > 70 = overbought (suggesting potential reversal lower); RSI < 30 = oversold (suggesting potential reversal higher); RSI 50 = balanced momentum. Adjustments: in strong trends, 20/80 thresholds work better (RSI rarely touches 30 in a strong uptrend; consider 40/80 instead). Sector-specific tuning: trending instruments (large-cap growth, crypto) benefit from wider thresholds; mean-reverting instruments (sector ETFs, large-cap value) work with standard 30/70. RSI is a momentum oscillator; it measures velocity of price change, not direction. The same RSI value can occur on the way up or on the way down — context matters. Combine with price-trend tools (200-day MA), volume analysis, and support/resistance for higher-conviction signals.

How to use

Example 1 — Stock approaching overbought. AAPL 14-day average gain $1.40, average loss $0.60. Enter average_gain 1.40, average_loss 0.60. Result: RS = 1.40/0.60 = 2.33. RSI = 100 − (100/(1+2.33)) = 100 − 30.03 = 69.97. ✓ Just below the 70 overbought threshold. Not yet a sell signal but bears watching. If AAPL continues to rally and RSI breaks 70, momentum traders may take partial profits expecting a pullback; mean-reversion traders may add to short positions; trend-followers may ignore RSI in favor of staying long until the trend breaks. Example 2 — Oversold reversal candidate. SPY 14-day average gain $0.80, average loss $2.40. Enter 0.80, 2.40. Result: RS = 0.80/2.40 = 0.333. RSI = 100 − (100/1.333) = 100 − 75.0 = 25.0. ✓ Solidly oversold (RSI < 30). Suggests potential mean reversion higher in the short term. Confirm with: 1) price near support level (200-day MA, prior consolidation, round-number psychological level); 2) volume profile (capitulation volume often marks oversold extremes); 3) divergence with longer-term indicators. Oversold during a strong downtrend can stay oversold for weeks; oversold during sideways range usually mean-reverts within days.

Frequently asked questions

What does an RSI value actually tell me?

RSI is a momentum oscillator measuring the velocity of price change over a lookback period (typically 14 periods). Mechanically, it tells you how much of recent price action has been gains versus losses, expressed on a 0–100 scale. RSI > 70 means gains have dominated recent action significantly (overbought condition); RSI < 30 means losses have dominated (oversold). The classical interpretation: overbought conditions tend to mean-revert lower; oversold tends to mean-revert higher. However, RSI alone is not a complete trading signal. In strong trends, RSI can stay overbought (>70) for weeks during an uptrend or oversold (<30) for weeks during a downtrend — exiting on the first 70 reading in a trend often costs significant upside; entering long on the first 30 reading in a downtrend often catches a falling knife. RSI is most useful in sideways/ranging markets where mean-reversion is the dominant pattern. In trending markets, use RSI divergences (price makes new high but RSI does not) as the primary signal instead of absolute level. Combine RSI with trend filters (200-day MA), support/resistance, and volume for higher-quality signals.

What period length should I use for RSI?

Wilder's original 14 periods is the standard and most widely used. Shorter periods (5–9) produce more sensitive RSI that gives more signals but more false positives; useful for very short-term trading (day trading, scalping). Longer periods (20–25) produce smoother RSI with fewer but higher-conviction signals; useful for swing trading and position trading. Specific recommendations: 14-period RSI on daily charts for swing trading (the default for stocks, indices, forex, crypto); 9-period on 1-hour charts for intraday swings; 5-period for scalping. Some traders use multiple RSIs simultaneously — 5/14/25 — for short, medium, and long-term momentum context. For different asset classes: stocks/indices work well with 14; forex pairs often use 9 or 14; crypto's higher volatility sometimes works better with shorter periods (9 or 7) to capture the faster momentum. Backtest your specific strategy with different periods to find what works for your asset and time frame; do not assume 14 is optimal universally.

What is RSI divergence and how do I use it?

Divergence occurs when price and RSI move in opposite directions, suggesting the current trend is weakening. Two types: 1) Bearish divergence — price makes higher highs but RSI makes lower highs; suggests momentum is slowing despite continued price gains; often precedes pullbacks or reversals. 2) Bullish divergence — price makes lower lows but RSI makes higher lows; suggests selling pressure is fading despite new lows; often precedes bounces or reversals. Hidden divergences (counterintuitive) signal trend continuation: hidden bullish (price higher low + RSI lower low) suggests uptrend resumption; hidden bearish (price lower high + RSI higher high) suggests downtrend resumption. Divergences are most reliable on higher time frames (daily, weekly) and at major support/resistance levels. They are noisier on intraday charts and during sideways consolidations. Practical use: combine divergence with a trigger (break of trend line, candlestick pattern, MACD signal cross) rather than entering purely on divergence; many divergences resolve as continuation rather than reversal. Divergence works on any oscillator (MACD, stochastic, CCI) and is one of the most studied technical analysis concepts since the 1990s.

What are the most common RSI mistakes?

The biggest is treating RSI > 70 as an automatic short signal and RSI < 30 as an automatic long signal without context; in trending markets RSI can stay at extreme readings for weeks while the trend continues, producing repeated losses for mean-reversion traders. The second is using RSI alone without trend filters; combine with the 200-day MA or longer trend indicators to determine whether to fade extremes or trade with the trend. The third is using inappropriate period length for your time frame — 14-period on a 5-minute chart produces extremely noisy signals; 14-period on a weekly chart produces only a few signals per year. The fourth is treating divergence signals immediately as reversals without waiting for confirmation; divergences can persist for weeks before resolving. The fifth is over-relying on RSI in very low-volatility regimes; flat-line price action produces meaningless oscillator readings. The sixth is failing to adjust thresholds for asset class; crypto and tech-growth stocks often run hot RSI (70-90 in uptrends), traditional value stocks rarely reach 70. The seventh is using simple average instead of Wilder's smoothed average; results differ enough to materially affect signals near thresholds. The eighth is ignoring the underlying fundamentals and trading purely on technicals; an oversold reading on a company about to miss earnings is not a buy signal.

When should I not use RSI?

Skip it during low-volume periods (holidays, pre-open, after-hours) when RSI readings are noisy and not meaningful. It is the wrong tool for ultra-short-term (sub-minute) tick data where momentum is dominated by random microstructure rather than fundamental price discovery. Do not use it as the sole signal for trading; always combine with trend, volume, and price-structure context. For fundamentally driven moves (earnings announcements, FDA decisions, M&A news), RSI is irrelevant because the price discounts new information instantly regardless of recent momentum. For very illiquid stocks where average daily volume is low, RSI signals are dominated by individual order book events rather than crowd behavior. For pairs trading and statistical arbitrage strategies, custom relative-strength measures designed for paired instruments work better than standard RSI. For trend-following strategies designed to ride momentum, RSI overbought signals are exactly the wrong indicator — they tell you to exit positions the strategy wants to hold. And for long-term value investors holding 5+ year positions, RSI is largely irrelevant; quarterly fundamentals matter more than daily momentum.

Sources & references