The Bollinger Band indicator was developed by John Bollinger and uses standard deviation of prices and the volatility to create an upper and lower band around the stock price. When volatility increases the bands automatically widen and when volatility decreases, they contract.
These bands act as natural areas of support and resistance. It is calculated 2 standard deviations away from the moving average.
NOTE: It is important to know how moving averages work before learning the Bollinger band concepts.
Look at the chart below, the blue lines encapsulating the price are Bollinger bands. Notice how the bands were narrow in the beginning when the price was not moving as much. Then after March price went up quickly (increase of volatility) and the Bollinger bands expanded.
As avid trend followers who believe that markets trend, you will notice that when prices are going, then price will tend to stick to the upper Bollinger band as we can see in the chart below of AxisBank.
The same is true for downtrends, when markets are going down, then price tends to stick to the lower end of the band as seen in the chart below:
To calculate the upper Bollinger Band you calculate the Moving Average of the Close and add Standard Deviations to it. For example the upper band formula would be MOV20+ (2*20Standard Deviation of Close).
To calculate the lower Bollinger Band you calculate the Moving Average of the Close and subtract Standard Deviations to it. For example the lower band formula would be MOV20- (2*20Standard Deviation of Close).