portfolios.tools

RSI Calculator

Calculate Wilder RSI from a closing price series, identify overbought and oversold zones, and inspect recent momentum readings privately in your browser.

Price Series

Enter oldest price first. Separate values with commas, spaces, semicolons, or new lines.

RSI Analysis

Current RSI

57.92

Neutral
03070100
ObservationCloseRSI
1546.2870.46
1646.0066.25
1746.0366.48
1846.4169.35
1946.2266.29
2045.6457.92

How the RSI Calculator Works

The Relative Strength Index is a bounded momentum oscillator developed by J. Welles Wilder. It compares the magnitude of recent gains with the magnitude of recent losses and converts that relationship into a reading from zero to one hundred. This calculator accepts chronological closing prices and applies Wilder's original smoothing procedure. The result is not a forecast. It is a compact description of how strongly prices have recently moved upward or downward relative to the selected lookback period.

For every pair of consecutive closes, the calculator records a gain when the change is positive and a loss when the change is negative. The first average gain and first average loss are simple means over the selected period. Every later observation uses Wilder smoothing, which retains most of the previous average and adds one part of the newest gain or loss. This method reacts more gradually than a rolling simple average and matches the convention used by many charting platforms.

The ratio of average gain to average loss is called relative strength. RSI equals one hundred minus one hundred divided by one plus relative strength. When no losses occurred, RSI is one hundred. When no gains occurred, it is zero. If every price is unchanged, this implementation returns fifty because upward and downward momentum are balanced. Values at or above seventy are labeled overbought, values at or below thirty are labeled oversold, and readings between those thresholds are neutral.

The gauge places the latest reading within the full oscillator range, while the history table shows recent calculated values. A high reading can persist during a strong uptrend, and a low reading can persist during a strong downtrend. Therefore a zone is context, not an automatic order to trade. Compare RSI with trend structure, volume, support and resistance, and your planned holding period. Changing the lookback changes sensitivity: shorter periods react faster, while longer periods produce smoother readings.

Step by step

  1. Paste closing prices in chronological order, separated by commas, spaces, semicolons, or new lines.
  2. Choose a lookback period. Fourteen is Wilder's common default and requires at least fifteen prices.
  3. Review the current RSI, its zone, the gauge position, and the recent calculation history.

Worked RSI Example

Consider fifteen daily closing prices with mixed advances and declines. The calculator finds each daily change, separates positive changes from absolute negative changes, and averages the first fourteen gains and losses. If the average gain is 0.24 and the average loss is 0.10, relative strength is 2.4. RSI is then one hundred minus one hundred divided by 3.4, which is about 70.59. That reading enters the conventional overbought zone.

Suppose the next close declines by 0.20. With a fourteen period lookback, the prior average gain is multiplied by thirteen and the new gain of zero is added before dividing by fourteen. The prior average loss is treated the same way, but the new loss of 0.20 is included. The updated RSI falls gradually rather than discarding the older observations at once. This persistence explains why Wilder RSI differs slightly from calculators that recompute simple averages on every row.

When RSI Analysis Is Useful

RSI can help compare momentum across points in the same security, examine whether a pullback is losing force, or confirm that a breakout has strong participation. Swing traders often watch threshold crossings, centerline behavior near fifty, and divergences between price and the oscillator. Long term investors may use a weekly or monthly series to place short term volatility within a broader trend rather than reacting to every daily move.

Use the same data frequency and lookback when comparing readings. A fourteen day RSI and a fourteen week RSI describe very different horizons. The indicator is most informative when combined with a clearly stated decision rule and risk limit. It should not replace valuation, diversification, liquidity analysis, or position sizing. Test any proposed signal on data that was not used to design it and include realistic trading costs.

Common RSI Mistakes

The most common mistake is treating seventy as an instruction to sell and thirty as an instruction to buy. Strong trends can remain beyond these levels for many observations. Another mistake is entering prices in reverse order, because smoothing depends on chronology. Missing sessions, mixing intraday and daily closes, or combining prices adjusted differently for splits and dividends can also create readings that do not match a trusted chart.

Do not compare results without checking the smoothing convention. Some tools use a simple moving average or a standard exponential average instead of Wilder smoothing. Small rounding differences are normal, especially when a provider carries additional decimal places. Avoid choosing a period only because it produced attractive historical trades. That practice invites overfitting. Document the data source, frequency, adjustment method, lookback, thresholds, and confirmation rules before evaluating performance.

Wilder RSI Formula

change = current close minus previous close

gain = maximum of change and zero

loss = maximum of negative change and zero

first average gain = sum of gains divided by period

first average loss = sum of losses divided by period

next average = ((prior average times (period minus 1)) plus current value) divided by period

relative strength = average gain divided by average loss

RSI = 100 minus (100 divided by (1 plus relative strength))

The first reading needs one more closing price than the selected period because gains and losses are calculated between prices. This implementation keeps full precision during smoothing and rounds only displayed results. A zero average loss produces one hundred, a zero average gain produces zero, and two zero averages produce fifty. Other platforms can differ because of seed data, hidden history, rounding, adjusted prices, or their treatment of missing sessions.

Limitations and Assumptions

RSI is derived entirely from past closes and cannot know future information. Fixed thresholds behave differently across assets, volatility regimes, and trends. The calculation assumes correctly ordered, comparable observations and does not repair missing data or corporate actions. Persisted inputs remain only as reliable as browser storage. Historical indicator performance can be overstated by selection bias, overfitting, ignored costs, and lookahead errors. This calculator is educational and does not provide personalized financial advice or guaranteed signals.

Key RSI Terms

Relative Strength Index
A bounded momentum oscillator from zero to one hundred based on the relationship between Wilder smoothed gains and losses.
Wilder Smoothing
A recursive average that keeps period minus one parts of the prior value and adds one part of the newest observation.
Momentum Zone
A conventional interpretation band. Readings at least seventy are overbought, at most thirty are oversold, and others are neutral.

Compare RSI with Other Indicators

RSI focuses on the balance of gains and losses. A moving average focuses on trend level, while Average True Range focuses on volatility without direction. Combining different categories can add context, but adding many correlated momentum indicators may only repeat the same information. Choose a small set whose role in the decision process is explicit.

The MACD calculator can help examine trend momentum without a bounded scale. The ATR calculator can translate current volatility into a possible risk based position size. Bollinger Bands compare price with a volatility envelope. None of these tools removes uncertainty, and agreement among indicators does not guarantee a profitable outcome.

FAQ

What does RSI measure?

RSI measures recent directional momentum by comparing smoothed average gains with smoothed average losses. It does not measure whether a company is valuable, whether a trend will continue, or how much money should be invested. Because the scale is bounded, traders can compare momentum at different dates more easily than raw price changes, but the reading must still be interpreted within trend and market context.

Why is fourteen the default period?

Wilder introduced fourteen as a practical default, and it became a widespread charting convention. It is not universally optimal. Shorter periods generate faster and more extreme movements, which may suit short horizons but can increase false signals. Longer periods are smoother and slower. Keep the period consistent when comparing observations, and select it according to the data frequency, holding horizon, and a tested process rather than convention alone.

Are overbought and oversold readings reversal signals?

No. They describe unusually strong recent movement relative to the lookback, not a guaranteed reversal. An overbought reading can accompany a healthy advancing trend, while oversold conditions can persist during sustained declines. Some analysts wait for RSI to leave the extreme zone, cross fifty, form a divergence, or align with price structure. Every confirmation rule has tradeoffs and should be tested with costs and risk controls.

Why does my result differ from a charting platform?

A platform may use more historical prices before the visible chart begins, a different smoothing formula, adjusted rather than unadjusted closes, another session calendar, or greater internal precision. RSI smoothing carries its prior state forward, so different seed history can affect later values for some time. Confirm that both calculations use identical chronological closes, period length, corporate action treatment, and Wilder smoothing before investigating a discrepancy.

Can RSI be calculated for funds, currencies, or crypto assets?

Yes. The formula only requires a chronological numeric price series, so it can be applied to stocks, exchange traded funds, indexes, currencies, commodities, or crypto assets. Data quality and trading hours still matter. Markets that trade continuously have different session boundaries, and thinly traded instruments may contain stale closes. Choose a consistent interval and understand what each close represents.

Can I use this calculator on a phone or tablet?

Yes. The interface works in a modern mobile browser and performs the same Wilder calculations as the desktop view. A long series may be easier to paste and inspect on a larger screen. The calculator stores only the chosen period and entered price series in local browser storage, subject to browser settings, so the values can remain available on the same device.

Where is my price data stored?

Calculations run locally in the browser. The entered closing prices and lookback period may be saved in localStorage on the current device so the form can be restored. Computed RSI values are not persisted, and this calculator does not send the series to a calculation server. Clearing site data or using private browsing can remove or prevent that local persistence.

Should I make an investment decision from RSI alone?

No. RSI summarizes one dimension of historical price behavior and can produce losing signals. It ignores valuation, financial condition, news, liquidity, portfolio concentration, taxes, and personal constraints. Use it as educational analysis within a broader, tested framework. Define position size and exit risk before entering a trade, and consult a qualified professional when a decision depends on your individual financial circumstances.

Related Tools

Explore the ATR Calculator for volatility and position sizing, the MACD Calculator for trend momentum, and Bollinger Bands for a price volatility envelope.