The formula for calculating momentum indicators varies depending on the specific indicator used. For example, the RSI is calculated by dividing the average gain of the stock by the average loss over a specific period and then converting the result into a value between 0 and 100.