RSI Calculator (Relative Strength Index)
The RSI calculator converts average gain and average loss into the Relative Strength Index, a 0 to 100 momentum reading used in technical analysis. It is for informational use only and is not trading advice. The result can help you document a chart setup, compare momentum across securities, or check whether a spreadsheet is applying the same formula as this page. It cannot tell you what to buy, sell, short, or hold, and past price patterns do not predict future prices.
This page is intentionally about the calculator’s inputs, not a broker platform or live market feed. You supply the average positive change and the average absolute negative change from your own lookback period. The calculation finds relative strength, transforms it into RSI, labels the zone as oversold, neutral, or overbought, and shows the lookback periods you entered.
What the inputs mean
Average gain is the average size of upward periods in your lookback. If you are using daily data, it is based on daily changes; if you are using hourly data, it is based on hourly changes. Average loss is the average absolute size of downward periods. Enter a loss as a positive number. A day that fell by 0.80 points contributes 0.80 to the loss side, not minus 0.80. Periods records the lookback length, with 14 as the common default. In the current component, the periods value appears in the result and note but does not change the math after you have already entered average gain and average loss.
For sibling tools in this technical-indicator batch, compare RSI with the moving average calculator, the pivot point calculator, and the fibonacci retracement calculator. If you are shifting from chart analysis to position math, the stock average calculator and stock split calculator use different, portfolio-level inputs.
Formula
The calculator first computes relative strength, abbreviated RS:
It then applies the Relative Strength Index formula:
There are two edge cases. If average loss is zero and average gain is positive, RS is infinite and the result is an RSI of 100. If average gain and average loss are both zero, it sets RS to 1 and returns RSI of 50, a neutral reading. Inputs must be valid numbers, average gain and average loss must be zero or positive, and periods must be greater than zero.
Example calculation
Use the default entries: average gain 1.20, average loss 0.80, and 14 periods. Relative strength is 1.20 divided by 0.80, which equals 1.50. The RSI formula then becomes 100 minus 100 divided by 2.50. That is 100 minus 40, so the primary result is 60.00. The details panel shows relative strength 1.5, lookback 14 periods, and signal zone Neutral because 60 is neither at least 70 nor at most 30.
If average gain were 2.80 and average loss were 0.70, RS would be 4.00 and RSI would be 80.00, which the calculator labels Overbought. If average gain were 0.40 and average loss were 1.60, RS would be 0.25 and RSI would be 20.00, which it labels Oversold. These labels are descriptive, not instructions. A high reading can persist in a strong uptrend; a low reading can persist in a downtrend.
How traders use RSI
Traders often use RSI to organize a watchlist. A market with RSI near 70 may be extended relative to its recent losses, while a market near 30 may have fallen hard relative to its recent gains. Some users look for divergence, where price makes a new high but RSI does not, or price makes a new low while RSI improves. Others combine RSI with trend filters, such as a moving average, so they avoid fighting the dominant direction.
Those practices still rely on judgment. RSI is calculated from historical price changes, so it does not know about pending earnings, regulatory news, overnight gaps, option expiration, liquidity changes, or macroeconomic surprises. It also does not include bid-ask spreads, slippage, commissions, taxes, or your personal risk tolerance. A disciplined trader may use RSI to frame a question, but the indicator alone does not answer whether a trade is suitable.
Common mistakes
- Entering average loss as a negative number. The calculator expects the absolute size of losses.
- Assuming the periods field recalculates average gain and average loss from raw prices. It does not; you must provide the averages.
- Treating 70 and 30 as automatic orders instead of momentum reference zones.
- Comparing RSI readings built from different lookbacks without noting that shorter periods react faster.
- Forgetting that RSI can stay overbought or oversold during persistent trends.
Formula sources and scope
- Principles of Finance — OpenStax, Rice University (peer-reviewed open textbook); 2022 first edition, ISBN 978-1-951693-54-1; Jurisdiction-neutral finance definitions. Supports: RS=averageGain/averageLoss; RSI=100-100/(1+RS); averageLoss=0 branch is 100 unless both averages are zero. Accessed 2026-07-09.
These sources support the stated formula or definition. Results remain estimates based on the entered values and do not replace financial, legal, tax, lending, or investment advice. Compare periods, units, accounting definitions, and jurisdiction-specific rules before acting.
Sources
- CFI, Relative Strength Index — formula background for RS and RSI as a momentum oscillator.
- IG, A trader’s guide to the Relative Strength Index — examples of RSI use and cautions about interpreting indicator signals.