Bollinger Bands calculator
Bollinger Bands put a moving average inside a channel that stretches and shrinks with volatility, which helps you judge whether a price is overextended and whether a quiet market is getting ready to move. Paste your closing prices, choose a period and band width, and the calculator produces the upper, middle and lower bands for every bar. It also reports the latest %B and bandwidth and flags a squeeze when the bands are unusually tight.
Price inside the bands
Closing prices with upper, middle and lower bands. Bands pulling closer together mean volatility is falling.
Latest values
The most recent bars with their bands, %B and bandwidth.
| Date | Close | Lower | Middle | Upper | %B | Bandwidth |
|---|
How the bands are calculated
Each value uses only the latest closes inside the window, so the first complete reading appears once you have as many bars as the period.
Middle band
An ordinary average of the most recent N closes.
middle = average of the last N closes
Standard deviation
How far those closes usually sit from their average, using the population formula.
SD = √(average of (close − middle)²)
Upper and lower bands
The middle band plus and minus your chosen number of standard deviations.
upper = middle + k × SD, lower = middle − k × SD
%B
Where the close sits between the two bands.
%B = (close − lower) ÷ (upper − lower)
Bandwidth and squeeze
Band width relative to the middle band; a squeeze is bandwidth within 10% of its 50-reading low, or below 60% of its average.
bandwidth = (upper − lower) ÷ middle
Bollinger Bands FAQ
How are Bollinger Bands worked out?
The middle band is a simple moving average of closes, usually over 20 periods. The outer bands are placed a fixed number of standard deviations, normally 2, on either side of it. Since standard deviation measures how spread out recent prices are, the bands widen in volatile markets and tighten in quiet ones.
What does %B mean?
Where the latest close sits relative to the bands: 0 is the lower band, 0.5 the middle and 1 the upper. Readings above 1 or below 0 mean the price closed outside the bands.
What is bandwidth?
The gap between the upper and lower bands divided by the middle band. It gives a volatility reading you can compare over time, and very low bandwidth relative to recent history is called a squeeze.
What is a Bollinger squeeze?
A stretch of unusually narrow bands, when volatility has fallen to a recent low. Quiet spells tend to be followed by larger moves, so traders watch squeezes for a breakout, although the bands do not tell you which way it will go.
Does a touch of the upper band mean price will drop?
Not by itself. In strong uptrends price can hug the upper band for weeks. Closes outside the bands show strength or weakness, and many traders pair the bands with trend or momentum tools instead of treating a touch as a signal.
Which standard deviation does this use?
The population standard deviation over the period, which is how John Bollinger defined the bands and how most charting platforms calculate them. Your charting platform should show the same values, give or take rounding.