What do Bollinger Bands measure, and does touching a band mean anything?
Short answerBollinger Bands measure where price sits relative to its recent average, in units of its recent variability. The middle band is a 20-bar simple moving average of the close, and the upper and lower bands sit 2 standard deviations of the same 20 closes above and below it. Wide bands mean spread-out closes; narrow bands, bunched ones. Touching a band is not a signal by itself: John Bollinger, who created the bands, calls such touches "tags", not signals. In a strong trend, price can "walk" along the upper band for weeks, so a rule that sells every upper-band touch can exit far too early. The bands also hold fewer closes than the 95% a bell curve suggests, about 88% in this lesson's designed data.
The bands are on almost every charting screen, and their two most common readings, "upper band means sell" and "2 standard deviations means rare", both fail without context. Before you sell an upper-band touch, check whether the market is trending: in this lesson's synthetic trend, price closed above the upper band 12 times in 40 days and kept rising.
Valmy noteValmy's v1 strategy language includes the simple moving average and no other indicator, so Bollinger Bands are taught here for reading charts (as of 26 November 2026). The middle band is a simple moving average, but the outer bands need a standard deviation, which v1 does not offer.
Bollinger Bands: an average with a volatility envelope#
Bollinger Bands are three lines drawn around price. The middle band is a simple moving average (SMA) of the close, by default over 20 bars. The upper band and lower band sit a multiple of the standard deviation of the same 20 closes above and below it, by default 2. The standard deviation measures how far the closes in the window typically sit from their average, so the bands widen when prices are spread out and narrow when they bunch together. The only input is the closing price, and the bands are in price units. Two derived readings are common: %b, the position of the close between the bands (0 at the lower band, 1 at the upper band), and BandWidth, the distance between the bands as a share of the middle band. John Bollinger developed the bands in the early 1980s and described them in Bollinger on Bollinger Bands (2001).
Calculating Bollinger Bands step by step#
The recipe: take the average of the last n closes (the middle band), measure each close's distance from that average, square the distances, average the squares, take the square root (the standard deviation), and add or subtract k standard deviations. This example uses n = 5 and k = 2 on six invented closes (synthetic data) so the arithmetic fits on one screen. The default n = 20 works the same way.
| Day | Close | 5-day average | Upper band | Lower band | %b | BandWidth |
|---|---|---|---|---|---|---|
| 1 | 50.00 | |||||
| 2 | 51.00 | |||||
| 3 | 49.00 | |||||
| 4 | 52.00 | |||||
| 5 | 53.00 | 51.00 | 53.83 | 48.17 | 0.85 | 11.09% |
| 6 | 56.00 | 52.20 | 56.83 | 47.57 | 0.91 | 17.74% |
Day 5, window of days 1 to 5:
- Middle band: (50 + 51 + 49 + 52 + 53) ÷ 5 = 51.00.
- Distances from the average: −1, 0, −2, +1, +2. Squared: 1, 0, 4, 1, 4, which sum to 10.
- Variance: 10 ÷ 5 = 2. Standard deviation: √2 = 1.4142.
- Bands: 51.00 + 2 × 1.4142 = 53.83 and 51.00 − 2 × 1.4142 = 48.17.
Day 6, window of days 2 to 6 (day 1 drops out and the jump to 56 comes in):
- Middle band: (51 + 49 + 52 + 53 + 56) ÷ 5 = 52.20.
- Distances: −1.2, −3.2, −0.2, +0.8, +3.8. Squared: 1.44, 10.24, 0.04, 0.64, 14.44, which sum to 26.8.
- Variance: 26.8 ÷ 5 = 5.36. Standard deviation: 2.3152.
- Bands: 52.20 ± 4.63, so 56.83 and 47.57.
The jump from 53 to 56 did not break the upper band, because the jump itself widened the bands on the same day. The close of 56 sits (56 − 52.20) ÷ 2.3152 = 1.64 standard deviations above the middle. This is a built-in limit: with n closes in the window, the newest close can be at most √(n − 1) standard deviations from their average. With 5 bars that limit is √4 = 2, so a close could only touch 2-standard-deviation bands, never land outside them. With the default 20 bars the limit is √19 = 4.36.
Calculating %b and BandWidth#
%b = (close − lower band) ÷ (upper band − lower band). It is 0 at the lower band, 0.5 at the middle, 1 at the upper band, above 1 for a close above the upper band and below 0 for a close below the lower band. On day 5: (53.00 − 48.17) ÷ (53.83 − 48.17) = 4.83 ÷ 5.66 = 0.85. On day 6: (56.00 − 47.57) ÷ 9.26 = 0.91.
BandWidth = (upper band − lower band) ÷ middle band. On day 5: 5.66 ÷ 51.00 = 11.09%. On day 6: 9.26 ÷ 52.20 = 17.74%. Because the bands are 2 standard deviations on each side, BandWidth with the default settings equals 4 × standard deviation ÷ average, four times what statisticians call the coefficient of variation, as Bollinger's own rules point out. Dividing by the middle band makes BandWidth comparable across price levels and markets, the same way ATR% does for the average true range.
Population or sample standard deviation: the variant used here#
Bollinger specifies the population standard deviation, which divides the sum of squares by n (as in step 3 above). The open-source TA-Lib library does the same: its BBANDS function defaults to 20 bars and 2 deviations, and its variance divides by the period. The sample formula divides by n − 1 instead. On day 5 that gives √(10 ÷ 4) = 1.5811 and an upper band of 54.16, wider by a factor of √(5 ÷ 4) = 1.118. With 20 bars the factor shrinks to √(20 ÷ 19) = 1.026, so bands from a tool that uses the sample formula are about 2.6% wider. This lesson's figures use the population formula.
Bollinger also gives two adjustments. When the average is lengthened, the multiplier should rise, from 2 at 20 bars to 2.1 at 50 bars, and when it is shortened it should fall, to 1.9 at 10 bars. His rules also describe an exponential version, which uses exponential averages for both the middle band and the deviation. TradingView's built-in Bollinger Bands default to a length of 20, a multiplier of 2 and the close as the source.
Reading Bollinger Bands on a chart#
On a chart, the bands answer two questions at once: is the close high or low relative to the last 20 bars (%b), and is the market quiet or volatile relative to its own past (BandWidth). The synthetic daily chart of a crypto pair below shows a choppy range, a quiet stretch, a trend and another range.
- A, day 69: the squeeze. BandWidth fell to 1.8%, its lowest on the chart, after the 30-day quiet stretch. Earlier, in the choppy range, it had been as high as 14.8%. Bollinger's best-known use of BandWidth is to spot such a squeeze. A common screening rule, described by StockCharts, looks for BandWidth near the low of its six-month range. The squeeze only says that volatility is unusually low. It does not say which way the next move will go.
- B, day 73: the first close above the upper band. Price closed at 102.45, above the upper band at 101.74. Because the bands had been so narrow, a modest move was enough to close outside them.
- C, day 85: BandWidth 21.7%. As the trend ran, the 20-bar window filled with rising closes and the bands opened wide. Wide bands after a move describe the move that already happened.
When Bollinger Bands mislead: walking the band#
A close at or above the upper band shows that price is high relative to the last 20 bars. It does not show that price is too high. Bollinger's own rules say that tags of the bands are not signals by themselves, that in trending markets price can walk up the upper band or down the lower band, and that closes outside the bands are at first continuation signals, not reversal signals.
In Figure 2, between day 71 and day 110:
- Price closed above the upper band on 12 days, and %b was at or above 0.8 on 30 of the 40 days.
- Only one close was below the middle band, and it came before the first upper-band close.
- A trader who treated the first upper-band close (day 73) as a sell signal, and sold at the next available price, the open of day 74 at 102.45, would have watched price reach 115.94 twenty days later (+13.2%) and 136.63 on day 110 (+33.4%).
- After day 73, price did not close back at or below the middle band until day 132, 59 days later.
The competing reading is not always wrong. In the choppy range on the same chart (days 20 to 69), only two closes fell outside the bands, both below the lower band, on days 29 and 30. Ten days after day 30, price closed back at the middle band. In a range, a band tag often marks a relative extreme that fades. In a trend, the same tag marks strength. The bands cannot tell which kind of market you are in, which is why Is this market trending or stuck in a range? is a useful first question, and why Bollinger recommends pairing the bands with an independent indicator, such as one based on volume, rather than reading them alone.
Other ways the bands mislead:
- The squeeze has no direction. Narrow bands can be followed by a move either way, and a first break of one band can reverse, a pattern Bollinger calls a "head fake" (as described by StockCharts). See When does a breakout fail?.
- Old closes drop out all at once. A large close stays in the 20-bar window for exactly 20 bars. When it leaves, the bands can narrow suddenly even though nothing happened that day. Bollinger's exponential variant exists to avoid this.
- Settings change the picture. A 10-bar, 1.9-deviation chart and a 50-bar, 2.1-deviation chart give different tags on the same data.
Why ±2 standard deviations do not hold 95% of closes#
Default Bollinger Bands hold roughly 88% to 90% of closes, not the 95% that a bell curve suggests. The 95.4% figure applies to independent draws from a normal distribution around a fixed average, and closes are neither. In this lesson's designed data, even a random walk with perfectly normal steps kept only 88.3% of closes inside the bands, so most of the shortfall comes from price being a wandering path. Fat tails mainly add large breaks: about three times as many closes more than 3 standard deviations from the middle. Bollinger himself says to make no statistical assumptions from the use of standard deviation in the bands, because prices are not normally distributed and 20 bars is too small a sample, and he reports about 90% of data inside the default bands in practice. The test used three series of 10,000 synthetic bars each, designed to separate the two causes.
- Independent noise (each close a fresh normal draw around 100, no memory): 95.9% of closes were inside the bands, close to the textbook figure.
- A random walk with normal steps (each close is the previous close times a normal 1% move, like a simple model of prices): 88.3% inside. The steps were perfectly bell-shaped, yet about 12% of closes fell outside. The reason is that a price path is not a set of independent draws around a fixed center. The newest close is the end of a path that wanders, and it is more likely than an average close in the window to be at the edge of the window's range.
- A random walk with fat-tailed, clustered steps (steps from a fat-tailed distribution whose size comes in quiet and wild spells, a model designed to mimic the patterns documented by Mandelbrot in 1963 and Cont in 2001): 87.8% inside. The share inside barely changed. What changed was the extremes: 80 closes landed more than 3 standard deviations from the middle band, against 26 in the normal walk, and 57 single-bar moves exceeded 4 standard deviations of all moves, against 1 in the normal walk (a normal distribution predicts about 0.6 in 10,000).
Two lessons follow. First, "outside the bands" is not a 1-in-20 event: in these designed series it happened on about 1 close in 8, even without fat tails. Second, fat tails show up as more frequent large breaks, and the √19 limit above means even a huge jump cannot read more than 4.36 standard deviations on 20-bar bands, because the jump widens the bands as it happens. These are results for designed data, chosen to isolate causes. Real markets differ from market to market and period to period.
Stocks and crypto: the same settings on different clocks#
Twenty daily bars cover four trading weeks of a US stock, which trades on weekdays, but only 20 calendar days of a crypto pair that trades every day. On intraday stock charts, the first bar after an overnight gap often jumps away from the middle band and can close outside the bands simply because the market was closed, a mechanical effect that a continuously traded crypto pair largely avoids. Bollinger's rules apply the bands to any bar length, provided the bars contain enough trading to reflect real price formation, which thinly traded markets and very short bars may not.
Check your understanding: reading %b and BandWidth#
Question. A crypto pair's daily Bollinger Bands (20, 2) read: middle band 200.00, upper band 212.00, lower band 188.00. Today's close is 209.00.
- What are the standard deviation, %b and BandWidth?
- How many standard deviations above the middle is the close?
- Two weeks later, the bands are 196.00 and 204.00 around the same middle. What has changed, and what does that tell you about the next move?
- A charting tool that uses the sample standard deviation shows a slightly different upper band. About where?
Show the answers
Answer.
- The upper band is 2 standard deviations above the middle, so one standard deviation is (212.00 − 200.00) ÷ 2 = 6.00. %b = (209.00 − 188.00) ÷ (212.00 − 188.00) = 21 ÷ 24 = 0.875. BandWidth = 24 ÷ 200 = 12.0%.
- (209.00 − 200.00) ÷ 6.00 = 1.5 standard deviations. High relative to the last 20 closes, but inside the bands. On its own that is neither a sell nor a buy signal.
- BandWidth has fallen to 8 ÷ 200 = 4.0%: the last 20 closes are bunched together, a possible squeeze. It says volatility is low compared with two weeks earlier. It does not say whether the next move will be up or down, and the first break out of the bands can reverse.
- The sample formula multiplies the standard deviation by √(20 ÷ 19) ≈ 1.026, so the upper band would be about 200 + 2 × 6.00 × 1.026 = 212.31.
Related lessons#
- Before this lesson: What does a moving average actually measure? and How much does this market usually move? ATR and historical volatility
- Next: How do Keltner and Donchian channels differ from Bollinger Bands?
- See also: Is this market trending or stuck in a range?, When does a breakout fail? and How strong is this trend?