How to Calculate the RSI Technical Indicator
- 1). Choose the number of periods to base your calculation upon. Wilder suggests basing it on 14 periods, but you may choose another value if so inclined.
- 2). Add the total losses over the periods.
For example:
Given 14 periods with gains of 1, 2, 0, 3, 4, 5, 0, 6, 7, 8, 9, 0, 0 and 0 and losses of 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 0, 3, 6 and 8, the total for each set is as follows:
Total Gains = 45
Total Losses = 33 - 3). Calculate the average gain and loss from the periods by separately dividing the gains and losses by the number of periods. For example:
Total Gains of 45 / 14 Periods = Average Gain of 3.21
Total Losses of 33 / 14 Periods = Average Loss of 2.36 - 4). Divide the average gain by the average loss, and designate the new value as RS. For example:
3.21 / 2.36 = 1.36
RS = 1.36 - 5). Plug the value of RS as calculated in Step 4 into the following equation: RSI = 100 - 100/(1+RS), as follows:
RSI = 100 - 100/(1 + 1.36)
RSI = 100 - 100/(2.36)
RSI = 100 - 42.37
RSI = 57.63 - 6). Use the formula provided in Step 5 to solve for the RSI again the day after and so on. After deriving the initial values, use the following equation to derive the average gain and average loss:
Average Gain = [(previous Average Gain) x 13 + current Gain] / 14.
Average Loss = [(previous Average Loss) x 13 + current Loss] / 14.
This method of multiplying the previous average gain/loss by 13 ensures that the RSI value becomes more accurate as time passes.