Home / Glossary / What is RSI?

What is RSI?

In 30 tests of the textbook RSI rule (signal matrix v1, buy after RSI 14 closes below 30, sell after it closes above 70) on AUDUSD, EURUSD, GBPUSD, XAUUSD and BTCUSD hourly bars between October 2016 and October 2026, at six holding periods and with between 291 and 1,983 non overlapping cases each, 17 averaged above zero after costs and only 2 were beyond what chance alone produces, and both of those were losses. The rule showed no reliable edge on these five markets. Past results, not a forecast.

A horizontal scale from 0 to 100 with the zone under 30 marked low, the zone over 70 marked high, and the two worked example readings 70.7 and 62.6 marked on it.

RSI, the relative strength index, is a number from 0 to 100 that compares the size of recent price gains with the size of recent losses. A high reading means gains have been larger than losses over the window, and a low reading means the reverse. The usual window is 14 periods, and the usual marks are 70 and 30.

Last updated 26 Nov 2026. Reviewed by the Custom Trading Platform education desk. Every figure on this page is sample arithmetic, shown in full.

The short answer in four lines

  • RSI is a momentum measure. It describes how strong recent moves have been, not where price goes next.
  • Above 70 is often called high or overbought, below 30 low or oversold. Those are labels, not signals.
  • In a strong trend RSI can stay above 70 or below 30 for a long time.
  • It works on shares, forex, indices and crypto, because it only uses closing prices.

The formula

  • Take the change in the close from one period to the next. A rise is a gain and a fall is a loss, written as a positive number.
  • Average gain is the average of the gains over the window, counting zero for periods with no gain. Average loss works the same way for losses.
  • RS, the relative strength, is average gain divided by average loss.
  • RSI equals 100 minus (100 divided by (1 plus RS)).
  • After the first window, Wilder smoothing is used. New average gain equals (previous average gain times 13 plus the new gain) divided by 14, and the same for loss.
  • When average loss is zero, RSI is 100. When average gain is zero, RSI is 0.

Worked example 1: the first 14 period reading (sample numbers)

Sixteen closes are used: 44, 44.5, 43.8, 44.6, 45.2, 45, 45.8, 46.3, 45.9, 46.5, 47, 46.4, 46.9, 47.4, 47.1 and 46.2. The first 14 changes are plus 0.5, minus 0.7, plus 0.8, plus 0.6, minus 0.2, plus 0.8, plus 0.5, minus 0.4, plus 0.6, plus 0.5, minus 0.6, plus 0.5, plus 0.5 and minus 0.3. The gains add to 5.3 and the losses add to 2.2. Average gain is 5.3 divided by 14, which is 0.3786. Average loss is 2.2 divided by 14, which is 0.1571. RS is 2.409. RSI is 100 minus 100 divided by 3.409, which is 70.7.

StepWorkingResult
Sum of gains, first 14 changes0.5 + 0.8 + 0.6 + 0.8 + 0.5 + 0.6 + 0.5 + 0.5 + 0.55.3
Sum of losses, first 14 changes0.7 + 0.2 + 0.4 + 0.6 + 0.32.2
Average gain and average loss5.3 / 14 and 2.2 / 140.3786 and 0.1571
RS0.3786 / 0.15712.409
RSI100 - 100 / (1 + 2.409)70.7

Worked example 2: the next period, with smoothing (sample numbers)

The 15th change is minus 0.9, the close falling from 47.1 to 46.2. The gain for the period is 0 and the loss is 0.9. New average gain is (0.3786 times 13 plus 0) divided by 14, which is 0.3515. New average loss is (0.1571 times 13 plus 0.9) divided by 14, which is 0.2102. RS is 0.3515 divided by 0.2102, which is 1.672. RSI is 100 minus 100 divided by 2.672, which is 62.6. One falling day took the reading from 70.7 to 62.6.

How RS turns into RSI

RS (average gain over average loss)RSI
0.2520.0
0.428630.0
150.0
2.33370.0
480.0

RSI is 50 when average gains equal average losses. It reaches 70 when average gain is 2.333 times average loss, and 30 when average gain is 0.4286 of average loss.

How people read it

  • Levels: above 70 is called overbought and below 30 oversold. In a steady trend the reading can sit past those marks, so a level alone is a weak reason to act. See the RSI indicator test.
  • Divergence: price makes a new high while RSI makes a lower high, or the reverse. See the RSI divergence test.
  • The 50 line: some traders read above 50 as gains leading and below 50 as losses leading.
  • Window length: a shorter window, such as 7, swings more and crosses the marks more often. A longer one, such as 21, is smoother. State the window every time.
  • With other tools: pair it with a trend measure such as the MACD indicator test or the range around an average in the Bollinger Bands test.

RSI in stocks, forex and crypto

The formula does not change. It only needs closing prices, so it applies to a share, a currency pair, an index or a coin. What changes is how volatile the market is, and a more volatile market reaches the marks more often. Check the size of moves with the volatility calculator.

Related measures

  • Stochastic RSI applies the stochastic formula to RSI values, so it moves faster and between 0 and 1. It is a measure of the measure, not a different market input.
  • Stochastic oscillator compares the close with the high to low range, not with gains and losses.
  • Moving averages follow the level of price. RSI follows the balance of gains and losses.

What happened after RSI crossed 30 or 70 in our own tests

The test rule uses closed hourly bars: when 14 period RSI falls below 30, buy at the next open, and when it rises above 70, sell at the next open, then measure the move 4, 12, 24, 50, 72 and 168 bars later. Events are counted only when they do not overlap, so one move is not counted many times. These are results from past data on the markets and dates shown. They describe what happened. They do not predict what will happen and are not advice or a signal.

Engine and question: signal matrix v1 asks what happened after the textbook rule, over all history, with a flat cost per market. The earlier years and last 730 days columns are the check on later data, and the beyond chance column is the luck check. The result in one sentence: across five markets and six horizons, which is 30 cases of the textbook rule, 17 averaged above zero after costs, 2 were beyond what chance alone produces, and both of those were losses (BTCUSD at 12 and 24 bars). The rule showed no reliable edge on these five markets. Past results, not a forecast.

The sentence to quote (the same form for every row): After RSI(14) closed below 30 or above 70 on BTCUSD hourly bars between 27 Aug 2017 and 12 Oct 2026, taking the textbook trade at the next open (buy below 30, sell above 70) and holding 24 bars made an average of minus 4.9 pips before costs and minus 5.9 after the 1.0 pip cost, in 1,120 non overlapping cases, and 46.4 of every 100 ended ahead. A pip on BTCUSD here is 0.1 of one percent of the price. Past results, not a forecast.

MarketHorizon (bars)Cases (n)Average move before costsCostAverage move after costsShare ending ahead after costsEarlier years, after costsLast 730 days, after costsBeyond chance?
AUDUSD hourly41,7021.061.17minus 0.1150.4minus 0.41.11no (t 2.26)
AUDUSD hourly121,2811.771.170.650.70.122.53no (t 2.07)
AUDUSD hourly241,0221.741.170.5749.4minus 0.193.63no (t 1.32)
AUDUSD hourly507232.471.171.350.90.594.18no (t 1.08)
AUDUSD hourly725872.451.171.2850.10.554.26no (t 0.84)
AUDUSD hourly1683055.631.174.4650.56.6minus 7.36no (t 0.9)
EURUSD hourly41,7000.371.119minus 0.7548.4minus 0.76minus 0.71no (t 0.62)
EURUSD hourly121,3202.261.1191.1450.50.752.87no (t 2.19)
EURUSD hourly241,0490.741.119minus 0.3848minus 0.38minus 0.37no (t 0.47)
EURUSD hourly507301.571.1190.45511.71minus 4.69no (t 0.59)
EURUSD hourly725902.511.1191.3950.72.72minus 5.56no (t 0.71)
EURUSD hourly1683085.741.1194.6253.95.331.88no (t 0.79)
GBPUSD hourly41,7611.531.2410.2950.50.53minus 0.75no (t 1.95)
GBPUSD hourly121,3652.931.2411.6952.72.040.17no (t 2.05)
GBPUSD hourly241,0741.921.2410.6848.51.4minus 2.4no (t 0.88)
GBPUSD hourly507393.511.2412.2751.63.71minus 3.92no (t 0.99)
GBPUSD hourly725783.821.2412.58513.170.13no (t 0.77)
GBPUSD hourly16830820.821.24119.5852.316.9230.23no (t 2.05)
XAUUSD hourly41,748minus 2.331.773minus 4.148.3minus 1.02minus 16.24no (t minus 0.73)
XAUUSD hourly121,330minus 14.211.773minus 15.9849.7minus 6.99minus 51.61no (t minus 2.17)
XAUUSD hourly241,033minus 13.71.773minus 15.4748.8minus 7.1minus 49.69no (t minus 1.27)
XAUUSD hourly507182.361.7730.5950minus 0.977.18no (t 0.15)
XAUUSD hourly72563minus 20.31.773minus 22.0749.9minus 2.65minus 101.18no (t minus 0.8)
XAUUSD hourly1682918.581.7736.8152.6minus 21.32119.72no (t 0.17)
BTCUSD hourly41,983minus 0.321minus 1.3248.5minus 1.42minus 1.01no (t minus 0.82)
BTCUSD hourly121,477minus 3.21minus 4.247.5minus 5.08minus 1.41yes, in the losing direction (t minus 4.12)
BTCUSD hourly241,120minus 4.91minus 5.946.4minus 7.24minus 1.69yes, in the losing direction (t minus 4.09)
BTCUSD hourly50811minus 4.841minus 5.8449.1minus 6.13minus 4.93no (t minus 2.43)
BTCUSD hourly72659minus 4.941minus 5.9451.9minus 8.120.82no (t minus 1.93)
BTCUSD hourly168343minus 9.471minus 10.4747.5minus 12.84minus 3.63no (t minus 1.73)

How to read the table. A pip is 0.0001 for AUDUSD, EURUSD and GBPUSD, 0.1 dollar for XAUUSD and 0.1 of one percent of the price for BTCUSD, so move sizes are not comparable across markets, only the sign and the share ending ahead are. Cost is per round trip in the same pips: the measured average spread, 0.4 for slippage and 0.7 for commission on the three currency pairs (AUDUSD 1.17, EURUSD 1.119, GBPUSD 1.241). The XAUUSD cost (1.773) and BTCUSD cost (1.0) are assumptions, and a tick level spread read would refine them. Swap is not included. Data runs from October 2016 for the currency pairs and gold, and from August 2017 for BTCUSD, to October 2026. "Last 730 days" is the most recent two years held apart from the earlier years. A row is marked beyond chance when its t statistic is larger than the 95th percentile of the best result found by shuffling event dates (AUDUSD 3.74, EURUSD 3.98, GBPUSD 3.75, XAUUSD 4.09, BTCUSD 3.85), because each market tested 528 signal and horizon cells and some look good by chance.

The chart for this table has one line per horizon, the average move after costs on the vertical axis, the all bars baseline as a grey line and the interval as a band. Hollow dots mark horizons with a small number of cases. Template: img/rsi-matrix-template.svg.

The full method, the cost assumption and the chance check are on the signal tests method page. The test was run on the signal matrix with a flat cost per market, not on a tick level tester. The costs and the newer events (divergence especially) have not been checked independently by a second person. Other levels, periods and markets are on the guides linked under Related once they exist. Every row shows n, because a small number of cases can mislead.

Two engines, two questions

Signal matrix v1Signal matrix v2
QuestionWhat happened after the textbook rule (buy below 30, sell above 70)?Which rules, of any shape, held on data they had not seen?
MarksFixed: 30 and 70Taken from the market's own history, such as the highest 5 of every 100 readings
RuleOne chosen rule at a timeSingle readings, two readings together, or one reading then another within a few bars
MeasureAverage move and share ending ahead, over all historyShare of cases with a clear move (at least half the usual move), on the last part of history kept hidden
Luck checkDates of events shuffled, 95th percentile of the best resultRule events slid by a random jump and run through the same test
CostFlat per market (spread, slippage, commission)Measured spread at the hour the trade opens, plus commission both ways
Markets hereAUDUSD, EURUSD, GBPUSD, XAUUSD, BTCUSD hourlyAUDUSD hourly so far

The two figures are never added or averaged. The table above answers the v1 question. The table below answers the v2 question.

Which RSI rules held on data they had not seen (signal matrix v2, AUDUSD hourly)

The v2 test used AUDUSD hourly bars from October 2017 to September 2026. Each rule was chosen on the first 70 of every 100 bars and then counted on the rest, from 2 January 2024, which it had not seen, with a gap of 50 bars between the two. A clear move is one of at least half the usual move over that many bars, and a smaller drift counts as flat. Costs are included: the spread measured from real ticks at the hour the trade opens, plus commission both ways. Real fills can be worse. These are results from past data and they do not predict what will happen.

The result in one sentence: in v2, no single RSI reading on its own is among the strongest rules that held on the unseen data after costs. The rules that held paired an RSI extreme with a second condition within a few bars, the gains were small (0.0033 to 0.3511 of one percent per trade after costs, on 34 to 176 unseen cases), and the luck check found about as many rules passing by chance in this RSI set as passed in the real test, so each rule is a hypothesis and not a finding. Past results, not a forecast.

Rule (plain words)WayHorizon (bars)Clear move the rule's way, of every 100 unseen casesFlatClear move againstUnseen cases (n)Usual move over that many barsNet per trade after costs
RSI RSI is below 33.53 (its lowest 10 percent) ; then, within 20 bars: MACD MACD is below -0.001768 (its lowest 5 percent)up2058.820.620.634 (small sample)0.3364 of one percent0.3511 of one percent
RSI RSI is above 70.11 (its highest 5 percent) ; then, within 10 bars: MACD Histogram is above 0.0004894 (its highest 5 percent)down551.123.425.547 (small sample)0.1488 of one percent0.0829 of one percent
Stochastic K is below 8.48 (its lowest 5 percent) ; then, within 20 bars: RSI RSI is below 29.29 (its lowest 5 percent)up147.722.829.51760.062 of one percent0.0033 of one percent
price crosses below Bollinger Bands Mid ; then, within 20 bars: RSI RSI is above 70.11 (its highest 5 percent)down1044.434.421.299 (small sample)0.2284 of one percent0.0473 of one percent
RSI RSI is above 70.11 (its highest 5 percent) AND MACD Histogram is above 0.0003643 (its highest 10 percent)down1044.43223.672 (small sample)0.2284 of one percent0.0628 of one percent

These five rows are examples, not the whole result, and rows with fewer than 100 unseen cases are small samples. The textbook marks in v2 (AUDUSD hourly, unseen part). RSI 14 below 30 did not hold: on 190 unseen cases a clear move the textbook way (up) came 30 times in 100 and a clear move against it 42.1 times in 100. RSI 14 above 70 held before costs only (192 cases, 38 for and 30.2 against). Bullish divergence (131 cases) and bearish divergence (100 cases) did not hold, and neither did stochastic RSI or Connors RSI at their usual marks. Costs for other markets use the spread recorded on each bar of the price file where no tick sample exists, and swap is excluded. They answer a different question from the v1 table, and the v1 conclusion (no reliable edge for the textbook rule) is not changed by them.

What it cannot tell you

RSI does not say what happens next. A reading of 75 does not mean price will fall, and a reading of 25 does not mean it will rise. It uses only closes, so it ignores gaps inside a period, volume and news. Different tools use slightly different smoothing, so two charts can show a different value for the same prices.

Turning a reading into a plan

RSI says nothing about how much to risk. Whatever you act on, size the position from the loss you accept at your stop, using the position size calculator and the stop loss calculator.

Sources and method

Every figure on this page is sample arithmetic, shown in full, as of 26 Nov 2026. The formula is the standard 14 period relative strength index with Wilder smoothing. Each worked example is recomputed by a second method before it is kept, and the table rows are checked against the formula. No market data, index level or stock is stated. How we check numbers is on the methodology page, the people behind the site are on the about page, and corrections go through contact.

How we will test it

We will run both examples and every row of the table through a second spreadsheet calculation, compare with the working above, and repeat at a second set of sample closes and at windows of 7 and 21. Last tested: not yet, results pending.

Questions people type

What is RSI in trading? A 0 to 100 reading that compares the size of recent gains with recent losses, usually over 14 periods.

How is RSI calculated? Divide average gain by average loss to get RS, then compute 100 minus 100 divided by (1 plus RS).

What is a good RSI number? There is no good number. A reading describes recent momentum, and the useful question is what it shows in the market you trade.

What does an RSI of 70 mean? Average gains over the window are about 2.3 times average losses. It is often called overbought, but a strong trend can hold there.

What does an RSI of 30 mean? Average gains are about 0.43 of average losses. It is often called oversold, and a weak trend can hold there.

What is RSI in stocks? The same formula applied to the closing prices of a share.

What RSI setting is best? The standard is 14. Shorter windows react faster and give more crossings, longer windows are smoother. Test the window on your own market.

What is RSI divergence? Price and RSI making different highs or lows, which some traders read as momentum fading.

What is stochastic RSI? The stochastic formula applied to RSI values, so it ranges faster between its limits.

Related

Glossary, RSI indicator test, RSI divergence test, MACD indicator test, Bollinger Bands test, volatility, volatility calculator, stop loss calculator, position size calculator, disclaimer.

Start free: create a free account to get the weekly note on tools and tests.

Education only. Nothing here is financial advice or a signal.

The exact rule and how we test it: RSI indicator test page.

More: all indicator guides, glossary.