Skip to content
Omnikalc

Bollinger Bands calculator: bands, bandwidth and %B from a moving average

Enter the moving average, the standard deviation, the number of deviations and the latest price to get the upper and lower bands, the bandwidth and the percent B.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Results

Upper band

108.00

Lower band

92.00

Percent B (position inside the bands)

88%

Inside the bands
Bandwidth
16.0%

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.

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.

Frequently asked questions

What are Bollinger Bands?

They are a volatility channel drawn around a moving average at a set number of standard deviations. John Bollinger introduced them in the 1980s, and the default is a 20-period average with 2 standard deviations.

What does a squeeze mean?

When the bandwidth falls to a low level, volatility has dropped, and many traders watch for a breakout after it. The direction of the breakout is not known in advance.

What is percent B?

It shows where the price sits within the bands: 0 % is the lower band, 100 % the upper band. A value above 100 % or below 0 % means the price has closed outside the bands.

Does touching the upper band mean sell?

Not on its own. In a strong trend the price can walk along the upper band for a long time, so many traders use the bands to judge volatility and combine them with other tools.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.