how the relative strength index rsi works
as a momentum indicator the relative strength index compares a security s strength on days when prices go up to its strength on days when prices go down relating the result of this comparison to price action can give traders an idea of how a security may perform 2 the rsi used in conjunction with other technical indicators can help traders make better informed trading decisions 3the rsi uses a two part calculation that starts with the following formula 2r s i step one 100 100 1 average gain average loss rsi text step one 100 left frac 100 1 frac text average gain text average loss right rsistep one 100 1 average lossaverage gain 100 the average gain or loss used in this calculation is the average percentage gain or loss during a look back period the formula uses a positive value for the average loss take the next step to invest advertiser disclosure the offers that appear in this table are from partnerships from which investopedia receives compensation this compensation may impact how and where listings appear investopedia does not include all offers available in the marketplace periods with price losses are counted as zero in the calculations of average gain periods with price increases are counted as zero in the calculations of average loss the standard number of periods used to calculate the initial rsi value is 14 4 for example imagine the market closed higher seven out of the past 14 days with an initial average gain of 1 the remaining seven days all closed lower with an initial average loss of 0 8 the first calculation for the rsi would look like the following expanded calculation 55 55 100 100 1 1 14 0 8 14 55 55 100 left frac 100 1 frac left frac 1 14 right left frac 0 8 14 right right 55 55 100 1 140 8 141 100 once there are 14 periods of data available the second calculation can be done its purpose is to smooth the results so that the rsi only nears 100 or zero in a strongly trending market r s i step two 100 100 1 previous average gain 13 current gain previous average loss 13 current loss rsi text step two 100 left frac 100 1 frac left text previous average gain times 13 right text current gain left left text previous average loss times 13 right text current loss right right rsistep two 100 1 previous average loss 13 current loss previous average gain 13 current gain 100 after the rsi is calculated the rsi indicator can be plotted beneath an asset s price chart as shown below the rsi will rise as the number and size of up days increase it will fall as the number and size of down days increase image by sabrina jiang investopedia 2021as you can see in the above chart the rsi indicator can stay in the overbought region for extended periods while the stock is in an uptrend the indicator may also remain in oversold territory for a long time when the stock is in a downtrend this can be confusing for new analysts but learning to use the indicator within the context of the prevailing trend will clarify these issues 