Relative Strength Index Calculator
Compute the RSI momentum oscillator from a series of closing prices. The calculator uses Wilder's smoothing — the original method — and plots the full RSI line with overbought and oversold bands, divergence detection, and step-by-step working for the most recent value.
SAMPLE PRICE SERIES
PERIOD SETTINGS
(prev × (period − 1) + current) / period. This is what every standard charting platform uses.
The top panel shows the closing prices. The bottom panel is the RSI, with the overbought zone shaded red, the oversold zone shaded green, and the 50 midline. The most recent RSI value is marked with a gold dot. Crossings of the thresholds, and any divergence between price and RSI, are the signals most traders watch.
The Relative Strength Index is a momentum oscillator that measures the speed and magnitude of recent price changes on a scale from 0 to 100. It was introduced by J. Welles Wilder in his 1978 book New Concepts in Technical Trading Systems, alongside the ATR and the ADX, and it remains one of the most widely used indicators in technical analysis. Despite the name, it has nothing to do with relative strength against another asset — it measures the internal strength of a single price series by comparing the size of recent gains to the size of recent losses.
The formula normalises a ratio
Average gain divided by average loss gives the RS ratio. RSI then converts that ratio to a bounded 0–100 scale so it can be read like a percentage. RS = 1 (equal gains and losses) gives RSI = 50. RS = 2 gives RSI = 66.7. RS = 0.5 gives RSI = 33.3. The transformation is non-linear — the RSI compresses very large and very small RS values toward 100 and 0 respectively, which is why extreme readings above 80 or below 20 require an unusually lopsided gain-loss ratio.
Wilder's smoothing is what makes it stable
The original RSI does not use a simple rolling average. It uses Wilder's smoothing, a form of exponential smoothing with α = 1/period — mathematically equivalent to an EMA with a 2×period − 1 window. The first average is a plain arithmetic mean of the first period gains and losses; every subsequent value is (prev × (period − 1) + current) / period. This gives the RSI a long memory while still responding to new prices, and it is what makes the indicator look smooth on a chart rather than jumpy.
Overbought is not a sell signal
An RSI above 70 means recent gains have dominated recent losses — it does not mean the price is about to fall. In a strong uptrend, the RSI can stay above 70 for weeks or months. The most common mistake new traders make is shorting every overbought reading, which produces a long series of small losses punctuated by a devastating one when the trend continues. Overbought and oversold conditions are better read as context — they tell you the market has moved a long way in one direction, which is a warning to size positions carefully, not a signal to fade the move.
Divergence is the more useful signal
The more reliable RSI signal is divergence: price makes a new high but the RSI fails to make a corresponding new high, or price makes a new low while the RSI makes a higher low. This suggests the momentum behind the move is weakening even as the price continues. Divergence alone is not a trade — it often resolves with the price simply continuing — but combined with a rejection candle or a break of structure, it forms the basis of many swing-trading setups. Bearish divergence at a resistance level, and bullish divergence at a support level, are the classic combinations.
RSI value interpretation
| RSI range | Zone | What it usually means | Common interpretation |
|---|---|---|---|
| 0 – 10 | Extreme oversold | A very rare reading — almost every recent price change was a loss | Often marks a capitulation low, but can persist in a crash |
| 10 – 30 | Oversold | Recent losses dominate recent gains | Watch for a reversal signal, but do not buy blindly |
| 30 – 45 | Weak | Losses slightly larger than gains | Mildly bearish momentum — the range is the normal state in a downtrend |
| 45 – 55 | Neutral | Gains and losses are roughly balanced | No clear momentum bias — often a consolidation or indecision |
| 55 – 70 | Strong | Gains slightly larger than losses | Mildly bullish — the natural range in an uptrend |
| 70 – 90 | Overbought | Recent gains dominate recent losses | Momentum is strong — trail stops rather than fading the move |
| 90 – 100 | Extreme overbought | A very rare reading — almost every recent change was a gain | Often marks a blow-off top, but can persist briefly in a parabola |
Common period choices
| Period | Responsiveness | Best for | Notes |
|---|---|---|---|
| 7 | Very fast | Short-term scalping on liquid markets | Noisy — many false signals and frequent whipsaws |
| 9 | Fast | Day trading and short swing trades | Popular alternative to 14 in fast-moving markets |
| 14 | Standard | Most timeframes and markets | Wilder's original — the default on every charting platform |
| 21 | Slower | Swing trading and position entries | Smoother signal with fewer crossovers, fewer false starts |
| 25 | Slowest | Longer-horizon trend confirmation | Very smooth — the RSI rarely reaches the extremes |
Worked example — Wilder's smoothing, period 14
44.34, 44.09, 44.15, 43.61, 44.33, 44.83, 45.10, 45.42, 45.84, 46.08, 45.89, 46.03, 45.61, 46.28, 46.28
Step 1 — compute the 14 price changes
−0.25, +0.06, −0.54, +0.72, +0.50, +0.27, +0.32, +0.42, +0.24, −0.19, +0.14, −0.42, +0.67, 0.00
Step 2 — first average gain and average loss (simple averages of the 14 changes)
Gains: 0.06 + 0.72 + 0.50 + 0.27 + 0.32 + 0.42 + 0.24 + 0.14 + 0.67 = 3.34 → avg gain = 3.34 / 14 = 0.2386
Losses: 0.25 + 0.54 + 0.19 + 0.42 = 1.40 → avg loss = 1.40 / 14 = 0.1000
Step 3 — RS and RSI
RS = 0.2386 / 0.1000 = 2.386
RSI = 100 − 100 / (1 + 2.386) = 100 − 29.53 = 70.46
Frequently asked questions
The RSI is computed from price changes, not prices themselves. With N prices you have N − 1 changes. To compute the first average gain and average loss over a period of P, you need P changes, which means P + 1 prices. So with the standard period of 14 you need at least 15 closing prices to get a single RSI reading. After the first value, every additional price produces one more RSI value — so 100 prices with period 14 gives you 86 RSI readings. The chart on this page plots the RSI from its first valid value onward, and the result card always shows the most recent one.
A simple moving average of the gains and losses uses an equal weight on every observation in the trailing window — a period-14 SMA gives each of the last 14 changes exactly 1/14 of the weight. Wilder's smoothing gives the most recent change a weight of 1/period and exponentially decays the older observations, which is mathematically equivalent to an EMA with a 2×period − 1 window (so an RSI-14 smoothed this way is close to an EMA-27 of the changes). The practical effect is that Wilder's RSI reacts faster than a simple-average RSI, particularly at turning points, and it has a longer "memory" of old data. Wilder's is what the original 1978 text specifies and what every charting platform uses by default, which is why this calculator defaults to it. Use the simple method if you specifically want the smoother variant — but expect readings to differ by a few points.
Because there were no losses (or no gains) in the entire smoothing window. If every change over the last period was positive, the average loss is exactly zero and RS is infinite, so RSI = 100. If every change was negative, average gain is zero and RSI = 0. Both are genuine readings and both can persist for several periods in a very strong trend, but they are rare — 15 consecutive positive closes is unusual in any market. When the RSI does sit at 100 for several bars, it is a sign of extreme momentum and often precedes a sharp reversal, though the timing of that reversal is unpredictable. The calculator handles both cases cleanly and never produces NaN — it returns 100 when average loss is zero and 0 when average gain is zero.
Yes — the formula is universal because it operates only on the price changes of a single series. The interpretation differs because the markets differ. Crypto trades 24/7 with no session close, so there is no natural period boundary; a "daily" RSI on a crypto chart usually uses a fixed UTC cut. Crypto also tends to have larger and longer momentum runs, so overbought readings above 70 can persist far longer than they do on a stock index. Forex has session-based volatility clustering — the RSI on a 1-hour chart behaves differently during the London and New York sessions than during the Asian session. The indicator itself does not care; your interpretation of what "overbought" means should adapt to the market you are trading.
Not necessarily. The period sets how many bars back the RSI looks, and different timeframes have different bars per day. A 14-period RSI on a 1-minute chart looks back 14 minutes; on a daily chart it looks back 14 days. Both are valid, but they answer different questions. Many traders use the standard 14 across all timeframes because it keeps the interpretation familiar — an RSI-14 above 70 means roughly the same thing whether you are looking at minutes or weeks. Others shorten the period on higher timeframes to make the indicator more responsive, or lengthen it on lower timeframes to filter noise. If you use different periods on different timeframes, be explicit about which is which when you compare readings.
Divergence is when price and RSI move in opposite directions. Bearish divergence: price makes a higher high while the RSI makes a lower high — the momentum behind the advance is weakening. Bullish divergence: price makes a lower low while RSI makes a higher low — the selling pressure is easing. It is one of the most useful RSI signals because it warns of a possible reversal before the price itself turns. But it is not reliable on its own. Divergence can appear several times before a reversal actually happens, and in a strong trend the RSI can keep making lower highs for a long time while price keeps climbing. Treat divergence as a warning, not a signal: wait for price action confirmation — a rejection candle, a break of structure, or a moving-average cross — before acting on it. Bearish divergence at a well-established resistance and bullish divergence at a well-established support is far more meaningful than divergence in the middle of a range.
Wilder's original thresholds are 70 and 30, and they remain the default on virtually every platform. They give a reasonable balance between signal frequency and reliability on most markets. Raising the thresholds to 80/20 produces fewer, stronger signals — useful for confirmation, but you will miss many smaller reversals. Lowering them to 60/40 produces more signals but many are noise. A common approach in a strong uptrend is to use 40/80 instead of 30/70: the RSI rarely drops below 40 during a healthy uptrend, so a move to 40 is a meaningful pullback signal, while 80 is where the trend is genuinely stretched. Some traders shift the thresholds dynamically based on the trend, tightening them in ranging markets and loosening them in trending ones. The calculator lets you set any pair of thresholds and updates the zones, signals, and shading accordingly.
Not reliably. Backtests of a pure "buy below 30, sell above 70" strategy on most markets produce returns that are roughly flat before costs and negative after them, because the indicator is mean-reverting by design and most markets trend more than they mean-revert. The RSI is much more effective as one component of a broader setup — for example, using trend direction from a moving average to decide which side to trade, and then using the RSI to time entries on pullbacks within that trend. Buying when the RSI crosses back above 40 during an established uptrend, or selling when it crosses back below 60 during a downtrend, is a common and more effective pattern. The indicator is a tool for reading momentum, not a system on its own.
How to Use This Calculator
Paste a series of closing prices, set the period, and the calculator computes the RSI and plots it with the standard overbought and oversold bands.
1. Load a sample or paste your own prices
The presets cover a rising series, a falling series, a range-bound series, and two examples that show the RSI hitting the overbought and oversold extremes. Click "Custom" to enter your own closing prices.
2. Enter prices in chronological order
Oldest first, newest last. Separate with commas, spaces, or new lines. You need at least period + 1 prices — with the default period of 14 that means 15 prices. More is better; a hundred prices gives a much clearer picture of the RSI line.
3. Choose the period
Fourteen is Wilder's original and the default on every charting platform. Seven or nine for faster signals on short timeframes; twenty-one or twenty-five for smoother signals on longer horizons.
4. Pick the smoothing method
Wilder's smoothing is the standard and produces the readings you will see on a chart. Simple averaging is a smoother alternative that some traders prefer for its slightly slower response.
5. Adjust the thresholds if you want
The default 70/30 comes from Wilder. Higher thresholds like 80/20 give fewer, stronger signals. Some trend traders use 80/40 or 60/40 in strong markets. The chart, gauge, and signal summary all update to match.
6. Read the chart, gauge and signals together
The price panel at the top shows the series you entered. The RSI panel below shows the indicator with the overbought and oversold zones shaded. The gauge summarises the most recent reading, and the signal grid below the chart shows whether the current reading is in a zone and whether any divergence is detectable against the recent swing.
What This Tool Offers
Everything you need to read momentum from a price series, from the raw arithmetic through to the signals traders actually act on.
Wilder-smoothed RSI
The standard calculation used by every charting platform, with an option to switch to simple averaging for comparison. Handles the edge cases — all-gains gives 100, all-losses gives 0 — without producing NaN.
Dual-panel chart
Price on top, RSI below, sharing the same x-axis. The overbought and oversold zones are shaded on the RSI panel so you can see exactly when the indicator entered each zone.
Live gauge and zone state
A horizontal gauge with a marker at the current RSI value, plus the number of consecutive bars the indicator has been in the current zone — useful for gauging how extended a move is.
Signal summary
Three tiles below the chart show the current zone, the last threshold crossing, and the direction of the RSI trend over the last few bars — the three things most traders check first.
Step-by-step working
The complete arithmetic for the most recent RSI value — the price changes, the average gain and average loss, the RS ratio, and the final RSI. Useful for learning or for verifying the output against a chart.
Reference and education
An interpretation table by RSI range, a summary of the common period choices, a fully worked example, and clear explanations of why overbought is not a sell signal and why divergence matters more than the absolute level.
What Does the RSI Measure?
The Relative Strength Index measures momentum — the speed and size of recent price changes — on a bounded 0 to 100 scale. It answers a specific question: over the last N periods, have the upward moves been larger than the downward moves, and by how much? The answer is expressed as a ratio, then rescaled so that 50 is neutral, values above 50 favour the buyers, and values below 50 favour the sellers. Wilder's intent was not to predict direction but to give a single number that summarised recent momentum, which he then used as part of a larger trading system.
The Formula
The RSI is derived from the ratio of average gains to average losses, then transformed onto the 0–100 scale:
RSI = 100 − 100 / ( 1 + RS )
The transformation can be rewritten to show how RS maps to RSI:
Which makes the boundaries obvious. When average loss is zero, RS is infinite and RSI = 100. When average gain is zero, RS = 0 and RSI = 0. When gains and losses are equal, RS = 1 and RSI = 50. And when average gain is twice average loss, RS = 2 and RSI = 100 × 2/3 = 66.7.
The averages are computed with Wilder's smoothing, which works as follows. The first average gain is the simple mean of the first period gains (treating negative changes as zero), and the first average loss is the simple mean of the first period losses (treating positive changes as zero). Every subsequent value is updated with:
AvgLosst = ( AvgLosst−1 × ( period − 1 ) + Losst ) / period
This is equivalent to an exponential moving average with α = 1/period, which is why the RSI retains memory of older data for a long time while still responding to new prices.
Why the RSI Is Bounded — and Why That Matters
The key structural property of the RSI is that it can never go below 0 or above 100, unlike raw momentum measures such as the price change or the rate of change. This is a consequence of the RS-to-RSI transformation, which maps the infinite range of possible RS values onto the finite interval [0, 100]. As gains grow very large relative to losses, RS grows without bound but RSI asymptotically approaches 100; as losses dominate, RS approaches 0 and RSI approaches 0.
This bounding has two practical implications. First, the RSI compresses extreme readings: the difference between RS = 4 (RSI = 80) and RS = 9 (RSI = 90) looks small on the 0–100 scale but represents a very large change in the underlying ratio. Reading RSI 80 as "twice as stretched as RSI 40" is wrong; the relationship is non-linear, and the extremes are much more extreme than they look. Second, the bounded scale makes the RSI comparable across assets and across time — an RSI reading of 75 means the same thing whether you are looking at a $10 stock or a $60,000 Bitcoin, and whether you are looking at daily bars from 1990 or from today. Very few momentum measures have this property.
How Wilder Actually Used It
Wilder did not use the RSI as a standalone signal. In his original formulation, the RSI overbought and oversold readings were a preliminary filter: the primary signals came from failure swings — a specific price pattern where the RSI makes a peak above 70, pulls back, fails to make a new high on the next rally, and then breaks below the previous RSI pullback low. The RSI was a tool for identifying when momentum was diverging from price, which Wilder considered a leading warning of a reversal. That is a much more nuanced reading than the modern "buy below 30, sell above 70" shorthand, and it remains the more useful way to think about the indicator.
The overbought and oversold zones are still useful, but they are descriptive rather than predictive. An RSI above 70 tells you that recent gains have been large relative to recent losses — which is what you would expect in an uptrend. It does not tell you the trend is ending. In fact, in a healthy trend the RSI will often spend extended periods in the overbought zone, and a trend-follower should read those readings as confirmation, not as a warning. The reading becomes genuinely interesting when it diverges from the price — when price makes a new high but the RSI does not — because that suggests the momentum supporting the move is fading even as the price continues.
Reading the RSI in Context
The most important context is the trend. In an uptrend, the RSI tends to oscillate between roughly 40 and 80 — the overbought zone is the normal state, and the oversold zone is rarely reached. In a downtrend, the RSI tends to oscillate between 20 and 60 — the oversold zone is the normal state. In a range, the RSI travels the full 0–100 span, and both overbought and oversold readings are meaningful. This is why the fixed 70/30 thresholds can be misleading: an RSI reading of 35 in a strong uptrend is a much more significant signal than the same reading in a downtrend, where it is just noise.
Some traders shift the thresholds dynamically: 40/80 during an uptrend and 20/60 during a downtrend. Others use a longer-period moving average of the RSI as a trend filter, taking longs only when the RSI is above its own moving average. Both approaches acknowledge the same thing — that the meaning of a given RSI level depends on the context in which it occurs, and that no fixed threshold is universally right.
Common Mistakes
Four mistakes account for most of the frustration traders have with the RSI. The first is treating overbought as a sell signal — in a trending market this is systematically wrong, and the losses compound. The second is ignoring the trend entirely and treating the RSI as a mechanical system, which produces roughly break-even results before costs and negative results after them. The third is applying the same period across every timeframe without thinking about what the period actually represents — a period-14 RSI on a 1-minute chart is a very different tool from a period-14 RSI on a daily chart, and the signals they generate have very different expected holding periods. The fourth is ignoring the shape of the RSI line and looking only at the level — a gradual rise from 30 to 60 in a steady uptrend looks very different on the chart from a sharp spike from 30 to 60 followed by an immediate roll over, and the two have very different implications for what comes next.
Frequently Asked Questions
The FAQ section above covers the most common practical questions — why you need period + 1 prices, Wilder's smoothing versus a simple average, the 0 and 100 edge cases, how the RSI behaves on crypto and forex, whether to use the same period on every timeframe, what divergence really means, how to set the thresholds, and whether the RSI can be used as a standalone system. Scroll back to the analysis card if you skipped it.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| RSI | Relative strength index | |
| RS | Relative strength (avg gain / avg loss) |
What it means
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. RSI values range from 0 to 100. Traditionally, RSI > 70 indicates overbought conditions; RSI < 30 indicates oversold. It is used to identify potential trend reversals and to generate buy/sell signals. Understanding RSI is essential for technical traders to time entries and exits.
Worked example
Relative Strength Index – Two Detailed Examples
Real‑World| Parameter | Value |
|---|---|
| Avg Gain | 1.5 |
| Avg Loss | 0.5 |
| Parameter | Value |
|---|---|
| Avg Gain | 0.8 |
| Avg Loss | 1.2 |
Common mistakes
- RSI: Relative Strength Index – measures momentum.
- Avg Gain / Avg Loss: Average of gains and losses over the lookback period.
- RSI > 70: Overbought; RSI < 30: Oversold.
- Divergence: Price and RSI divergence can signal reversals.
Applications
Relative Strength Index (RSI) measures the speed and change of price movements, oscillating between 0 and 100. It is used to identify overbought (above 70) and oversold (below 30) conditions. Traders use RSI to time entries and exits, to confirm trends, and to detect divergences. This is one of the most popular momentum oscillators. Understanding RSI helps in timing trades and in managing risk.
- Identifying overbought and oversold conditions
- Generating buy/sell signals based on RSI levels
- Divergence analysis (price vs. RSI) for trend reversal
- Confirming trend strength and momentum
- Setting stop‑loss and take‑profit levels
Related calculators · Technical & Market Analysis
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.