Skip to content
TraderCalcs.io

RSI Calculator

Calculate the relative strength index from a series of closes using Wilder's smoothing, with the average gain and loss shown.

The relative strength index compares the average size of the rises in a series with the average size of the falls, and places the result on a 0 to 100 scale. This RSI calculator builds that reading from closing prices you enter yourself, one per row, oldest at the top. Highs and lows play no part: a period that swung several percent and finished where it started contributes a change of zero, the same as one that never moved.

Formula: RSI = 100 - 100 / (1 + average gain / average loss)

Your figures

How many changes go into each average. Wilder used 14. n changes need n + 1 closes, so a 14-period reading needs at least 15 rows, and the table below opens with twenty.

Closing prices

One closing price per period, oldest at the top. Only closes are used — the highs and lows of each period play no part in this measure. Blank rows are ignored.

Close 1
Close 2
Close 3
Close 4
Close 5
Close 6
Close 7
Close 8
Close 9
Close 10
Close 11
Close 12
Close 13
Close 14
Close 15
Close 16
Close 17
Close 18
Close 19
Close 20

Results

RSI

60.95

14-period, Wilder's smoothing, from 20 closes

Average gainWilder-smoothed, in the price units of the series.
0.495367
Average lossThe same, expressed as a positive number.
0.317396
Relative strength (RS)The average gain divided by the average loss. The RSI is that ratio rescaled onto 0–100.
1.5607
Seed average gain — first 14 changesA simple mean, and where the smoothing starts.
0.650000
Seed average loss — first 14 changesThe matching figure for the falls in that first window.
0.285714
Changes measured20 closes give 19 changes — one fewer, because the first close has nothing before it to change from.
19
RSI values in the seriesThe first is the seed, a simple mean. Each one after it applies Wilder's recursion once more.
6
Earliest RSI in the seriesThe seed reading, for comparison with the latest one above.
69.47

What this means

Over the 19 changes that 20 closes produce, the Wilder-smoothed average gain is 0.495367 and the average loss 0.317396. Dividing the first by the second gives a relative strength of 1.5607, and 100 − 100 ÷ (1 + RS) places that on a 0–100 scale at 60.95. The reading is a share and nothing more: the average gain as a proportion of the two averages added together, over the changes Wilder's smoothing still gives weight to. A figure near either end says the recent changes have been one-sided; it does not say the next one will be.

  • The RSI is Wilder's smoothing throughout, seeded with the simple mean of the first n gains and the first n losses. Platforms that seed differently produce different numbers on a short series and converge only after twenty or thirty further closes.
  • The two ends are definitions, not divisions that happened to survive. An average loss of zero puts the reading at exactly 100 and an average gain of zero at exactly 0; both being zero leaves nothing to measure, and the midpoint shown there is a convention rather than a reading.
  • Only closing prices are used. A period that ranged widely and closed where it started contributes nothing to either average, which is a limitation of the measure itself rather than of this page.
  • No threshold is reported here — not 70, not 30, not any other. A threshold would be a claim about what happens next, and this figure is a summary of changes that have already happened.
  • The rows are treated as consecutive periods in the order given, whatever they are: minutes, days or weeks. Nothing here knows about sessions, weekends or holidays, so a series with a bar missing from the middle is measured as though the two either side of the hole were adjacent.
  • Every figure on this page is taken from periods that have already traded. It describes what the series has done, and no reading of it — high, low or anywhere between — carries information about what the next period does.

RSI: 60.95

The link reopens this calculator with the same numbers. Nothing you enter is sent to a server.

About the RSI calculation

The scale is bounded because the reading is a share rather than a ratio. Written out, the RSI is the average gain divided by the average gain plus the average loss, multiplied by 100 — the proportion of the recent movement that happened upwards. The published form, 100 − 100 ÷ (1 + RS), is that arithmetic rearranged, and the share form is the one that makes both ends of the scale obviously reachable.

Wilder's RSI calculation runs the smoothing throughout, seeded with the simple mean of the first n gains and the first n losses. That seeding is the main reason a fourteen-period reading taken from twenty rows here will not match a platform showing the same setting on the same recent closes: a relative strength index calculator fed years of history is carrying a recursion started long ago, and two differently seeded recursions need twenty or thirty further closes before they agree closely.

Nothing on this page reports a threshold — not 70, not 30, not any other number. Those are labels from the book that introduced the measure rather than properties of the arithmetic, and a threshold is a claim about what happens next. What the calculation produces is a summary of changes that have already happened, and a reading near either end says only that those changes were one-sided.

RSI formula

change_t = close_t − close_{t−1}
gain_t   = change_t  when positive, otherwise 0
loss_t   = −change_t when negative, otherwise 0

seed   average gain = (gain_1 + … + gain_n) ÷ n
       average loss = (loss_1 + … + loss_n) ÷ n

then   average_t = (average_{t−1} × (n − 1) + current_t) ÷ n

RS  = average gain ÷ average loss
RSI = 100 − 100 ÷ (1 + RS)
    = 100 × average gain ÷ (average gain + average loss)

average loss = 0, average gain > 0  →  RSI = 100 by definition
average gain = 0, average loss > 0  →  RSI = 0   by definition
both averages zero                  →  nothing to measure
change_t
The difference between one close and the one before it. n closes give n − 1 changes, because the first close has nothing preceding it to change from.
gain_t, loss_t
The rise and the fall of a single period, both held as positive numbers. At most one is non-zero on any period, and both are zero on one that finished unchanged.
n
The period: how many changes go into each average. A fourteen-period reading needs fifteen closes at minimum, which is why the table opens with twenty rows.
RS
Relative strength — the average gain divided by the average loss. It is unbounded above, which is precisely why the RSI rescales it instead of quoting it.
average_t
A Wilder-smoothed average: the previous one weighted by n − 1, plus the newest gain or loss, all divided by n. Gains and losses are smoothed separately.

The two published forms of the RSI formula are the same expression. Substituting RS = G ÷ L into 100 − 100 ÷ (1 + RS) gives 100 − 100L ÷ (L + G), which is 100G ÷ (G + L). The second version removes the division that looks dangerous and makes the boundedness obvious: a share of a total cannot exceed the total, however lopsided the series becomes. It also makes the reading legible — an RSI of 75.25 means about three quarters of the movement the smoothing still weights happened upwards.

The two ends are definitions rather than divisions that happened to survive. If no change in the smoothing window was a fall, the average loss is zero, relative strength is unbounded rather than merely large, and the limit of the expression is exactly 100. An average gain of zero gives exactly 0 by the same reasoning. Both averages at zero is a third thing: the series did not move, there is no balance to describe, and 100 and 0 are equally defensible and equally meaningless. The calculator returns the midpoint there and flags that it did.

A period whose close matched the one before it contributes a gain of zero and a loss of zero, which multiplies both averages by (n − 1) ÷ n and leaves their ratio exactly where it was. The RSI is therefore completely unchanged by a flat period — the one input that moves both averages without moving the reading. That is a property of the smoothing rather than a quirk of this implementation, and it is worth knowing before anything is read into a value that has held still for several rows.

Wilder's smoothing is an exponential average with a factor of 1 ÷ n, so like the ATR it is equivalent to a conventional EMA of period 2n − 1 and never fully discards a change. That is what makes the seed persistent and the disagreement between implementations long-lived, and it is why a second published variant exists: Cutler's RSI replaces the smoothing with a plain simple average of the last n gains and losses, which has no seed to argue about. Both are called RSI. This page computes Wilder's throughout and names it in the result.

RSI: a worked example

Eight closes — 44.00, 44.50, 44.20, 45.10, 45.60, 45.30, 46.00 and 45.80 — read as a five-period RSI with Wilder's smoothing.

  1. The seven changes+0.50, −0.30, +0.90, +0.50, −0.30, +0.70, −0.20
  2. Seed over the first five changesgain (0.50 + 0 + 0.90 + 0.50 + 0) ÷ 5 = 0.38; loss (0 + 0.30 + 0 + 0 + 0.30) ÷ 5 = 0.12
  3. Seed readingRS = 0.38 ÷ 0.12 = 3.1667, so 100 − 100 ÷ 4.1667 = 76.00
  4. Change 6 is +0.70gain (0.38 × 4 + 0.70) ÷ 5 = 0.444; loss (0.12 × 4 + 0) ÷ 5 = 0.096; RSI = 82.22
  5. Change 7 is −0.20gain (0.444 × 4 + 0) ÷ 5 = 0.3552; loss (0.096 × 4 + 0.20) ÷ 5 = 0.1168
  6. Relative strength0.3552 ÷ 0.1168 = 3.0411
  7. RSI100 − 100 ÷ 4.0411 = 75.25
  8. The same figure as a share100 × 0.3552 ÷ (0.3552 + 0.1168) = 35.52 ÷ 0.4720 = 75.25

A five-period RSI of 75.25. The reading fell from 82.22 to 75.25 on a single 0.20 decline, which is what a short period does: with n at five each new change carries a fifth of the weight of the whole average, where a fourteen-period setting would have absorbed the same fall almost invisibly. The number says that of the movement the smoothing still gives weight to, roughly three quarters happened upwards — and nothing whatsoever about the close that comes next.

How to use the RSI calculator

  1. Set the period. n changes need n + 1 closes, so a fourteen-period reading needs fifteen rows at the very least, and the table opens with twenty.
  2. Enter the closes oldest at the top, one per row. Only closes are used here, so there are no highs or lows to fill in and none are asked for.
  3. Leave a row blank rather than deleting it if you prefer — wholly empty rows are ignored, so a row added and not yet typed into will not blank the panel.
  4. Read the average gain and average loss alongside the reading. They are what the RSI is made of, and they are in the price units of the series rather than on the 0 to 100 scale.
  5. Check the two seed rows when the figure disagrees with a chart, and compare the earliest RSI in the series with the latest to see how far the recursion has travelled.

Limitations of the RSI calculator

Every calculation makes assumptions. These are the ones that matter here.

  • Only closing prices are used. A period that swung several percent and closed unchanged contributes nothing to either average, which is a property of the measure rather than of this page.
  • The seeding convention makes a short series disagree with a platform carrying a long history. The two converge, but slowly, and over twenty rows they can be several points apart.
  • The reading is bounded, so it compresses at the ends. The same change in the averages moves the RSI far less at 85 than it does at 55.
  • Rows are treated as consecutive periods whatever they actually are. A gap in the record is measured as one change across the hole, and nothing here can detect it happened.
  • No threshold is reported and none is implied. A reading of 78 or of 22 describes the balance of changes already entered and carries no information about the next one.
  • Wilder's smoothing and the simple-average variant are both published under this name and do not agree, so a figure from here is comparable only with another built the same way.

Frequently asked questions about RSI

Why does my platform's RSI differ from this one on the same closes?

Usually the seed. A platform runs the recursion across its whole price history, so it arrives at your last close carrying an average built from thousands of earlier changes, while this page starts from the simple mean of the first n changes entered. Both are correct applications of Wilder's method to the data each has. The gap narrows as rows are added, and it is largest exactly where a short series makes it easiest to notice.

What do the 70 and 30 lines mean?

They are conventional markings rather than anything the arithmetic produces, and this page reports neither. What a reading of 78 actually says is that roughly 78% of the movement the smoothing still weights happened upwards over the closes entered. A series can hold above 70 for weeks while continuing to rise, or sit under 30 through a long grind sideways, and nothing in the calculation distinguishes those cases from any other.

Why does a flat period leave the reading unchanged?

Because a period that closed where the previous one did adds zero to both the gains and the losses, so Wilder's step multiplies each average by (n − 1) ÷ n. Both shrink by the same factor, their ratio is untouched, and the RSI that ratio produces is identical. It is the only input that moves the two averages on screen without moving the reading above them.

Why is the RSI exactly 100 when there have been no falls at all?

Because 100 is the value the measure takes there, not a number a division happened to yield. With an average loss of zero, relative strength is unbounded rather than merely large, and the share form makes it plainer still: the average gain is 100% of the total movement. The panel shows no ratio in that case, since putting an infinity into a formatted figure would be worse than saying there is not one.

Is this a Wilder RSI calculation or Cutler's?

Wilder's, throughout, although both are published under the name. Cutler's version replaces Wilder's smoothing with a plain simple moving average of the gains and losses, which removes the seeding problem and makes the answer depend only on the last n changes. This page computes Wilder's and says so in the result. On identical closes the two differ, sometimes by several points, and the difference does not fade with a longer series.

How many closes does a 14-period RSI calculator need?

Fifteen at the absolute minimum: an RSI 14 period calculator works from fourteen changes, and n changes always need n + 1 prices. At exactly fifteen the only value produced is the seed, a simple mean rather than a smoothed one, which makes it the least representative reading the setting can give. Every close beyond that applies the recursion once more, and it takes twenty or thirty of them before the seed has stopped dominating.

Last reviewed . See our methodology and editorial policy.

More technical calculators