This calculator gives estimates for education and planning. It is not investment, tax or legal advice; for decisions about your own situation, talk to a qualified financial professional.
Bollinger Bands put a channel around the price that widens when the market is volatile and narrows when it is calm. This Bollinger Bands calculator takes the moving average, the standard deviation, the number of deviations and the latest price to give the upper and lower bands, the bandwidth and the percent B.
How the calculation works
- Middle band = the simple moving average of the closing price, usually over 20 periods.
- Upper band = middle band + k × standard deviation of the same closes, with k = 2 in the standard setting.
- Lower band = middle band − k × standard deviation.
- Bandwidth = (upper band − lower band) ÷ middle band × 100. Low bandwidth is called a squeeze.
- Percent B = (price − lower band) ÷ (upper band − lower band) × 100: 0 % at the lower band, 50 % at the middle, 100 % at the upper band.
Example
A stock has a 20-day average of 100 and a standard deviation of 4. With two standard deviations the bands are 92 and 108, a bandwidth of 16.0 %. The latest price of 106 gives a percent B of (106 − 92) ÷ (108 − 92) = 87.5 %, in the upper part of the channel but still inside it.
Why it matters
The bands adapt to volatility, so the same price move can be ordinary in a wide channel and extreme in a narrow one. Percent B and bandwidth turn that picture into two numbers you can compare across stocks and time frames, filter in a screener or put into a spreadsheet without redrawing the chart.
Good to know
With a 20-period average and 2 standard deviations, about 95 % of closes would fall inside the bands if prices followed a normal distribution, but real prices have fat tails and trend, so touches and breakouts are common. The standard deviation here is the population or sample figure your platform uses, so check which, and use the same closes as for the average. The bands do not predict direction, and a squeeze says only that volatility is low.
Related tools
The exponential moving average calculator builds a trend line, the standard deviation calculator computes the spread used for the bands and the value at risk calculator turns volatility into a loss estimate.