Bollinger Bands Calculator
Calculate bollinger bands with our free Bollinger bands Calculator. Compare rates, see projections, and make informed financial decisions.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Bollinger Bands Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: Upper Band = SMA(n) + k x StdDev(n); Lower Band = SMA(n) - k x StdDev(n)
Worked example — Upper: 46.660 | SMA: 45.595 | Lower: 44.530 | %B: 92.49% (near overbought)
Formula
Upper Band = SMA(n) + k x StdDev(n); Lower Band = SMA(n) - k x StdDev(n)
Where SMA(n) is the simple moving average over n periods, StdDev(n) is the standard deviation over n periods, and k is the number of standard deviations (typically 2). Bandwidth = (Upper - Lower) / SMA x 100. %B = (Price - Lower) / (Upper - Lower) x 100.
Worked Examples
Example 1: Standard 20-Period Bollinger Bands Calculation
Problem:Calculate Bollinger Bands for a stock with 20 closing prices ranging from 44.50 to 46.50, using 2 standard deviations.
Solution:SMA(20) = Sum of 20 prices / 20 = 45.595 Standard Deviation = sqrt(sum of squared deviations / 20) = 0.5327 Upper Band = 45.595 + 2 x 0.5327 = 46.660 Lower Band = 45.595 - 2 x 0.5327 = 44.530 Bandwidth = (46.660 - 44.530) / 45.595 x 100 = 4.67% %B = (46.50 - 44.530) / (46.660 - 44.530) x 100 = 92.49%
Result:Upper: 46.660 | SMA: 45.595 | Lower: 44.530 | %B: 92.49% (near overbought)
Example 2: Detecting a Bollinger Band Squeeze
Problem:A stock has Bollinger Bands with bandwidth of 2.1%. Is a squeeze occurring and what should a trader do?
Solution:Bandwidth = (Upper - Lower) / SMA x 100 = 2.1% Typical bandwidth ranges from 4% to 15% A bandwidth below 4% indicates a squeeze 2.1% is well below the 4% threshold Squeeze detected — expect a breakout Monitor volume and direction for the breakout move
Result:Squeeze confirmed at 2.1% bandwidth — prepare for a significant price breakout in either direction
Frequently Asked Questions
What are Bollinger Bands and how are they calculated?
Bollinger Bands are a technical analysis tool created by John Bollinger in the 1980s. They consist of three lines plotted on a price chart: a middle band which is a simple moving average (typically 20 periods), an upper band set at a specified number of standard deviations (typically 2) above the middle band, and a lower band set the same distance below. The standard deviation measures volatility, so the bands automatically widen during volatile markets and contract during calm markets. This adaptive behavior makes Bollinger Bands uniquely useful for gauging whether prices are relatively high or low on a statistical basis.
What does the %B indicator tell traders?
The %B indicator quantifies where the current price sits relative to the Bollinger Bands. It is calculated as (Price minus Lower Band) divided by (Upper Band minus Lower Band), then multiplied by 100 to express as a percentage. A %B value of 100 means price is exactly at the upper band, while 0 means it is at the lower band. Values above 100 indicate price is above the upper band (potential overbought condition), and values below 0 indicate price is below the lower band (potential oversold condition). Traders often use %B in combination with other indicators to identify high-probability trade setups and reversals.
What is a Bollinger Band squeeze and why does it matter?
A Bollinger Band squeeze occurs when the bandwidth (the distance between upper and lower bands relative to the middle band) narrows to unusually low levels. This contraction signals that market volatility has dropped significantly and often precedes a strong breakout move in either direction. Think of it like a coiled spring — the tighter the squeeze, the more explosive the potential breakout. Traders watch for squeezes to prepare for significant price movements, then use the direction of the subsequent breakout to determine their trading position. The squeeze concept is one of the most reliable patterns in technical analysis for anticipating large moves.
How should beginners use Bollinger Bands for trading decisions?
Beginners should start by understanding that Bollinger Bands are not standalone buy or sell signals. When price touches the upper band, it does not automatically mean sell, and touching the lower band does not automatically mean buy. Instead, use bands in context: in a strong uptrend, price riding the upper band is bullish, not overbought. Combine Bollinger Bands with volume analysis and momentum indicators like RSI for confirmation. A common beginner strategy is the double bottom pattern — when price drops below the lower band, rebounds, drops again but stays within the bands, then moves up. This pattern often signals a reliable buying opportunity when confirmed by volume.
What are the best settings for Bollinger Bands across different timeframes?
The default settings of 20-period SMA with 2 standard deviations work well for most applications, but adjustments can improve results for specific timeframes. For short-term day trading on 5 to 15 minute charts, try a 10-period SMA with 1.5 standard deviations for more responsive signals. For swing trading on daily charts, the standard 20-period with 2 standard deviations is ideal. For weekly or monthly charts used in position trading, consider a 50-period SMA with 2.5 standard deviations for smoother signals. Some traders also use 21-period to align with the number of trading days in a month. Always backtest settings on your specific market before risking capital.
References
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer · Editorial policy
Related Calculators
🧮Keltner Channel Calculator
Calculate Keltner Channel bands using EMA and ATR for volatility-based entries and exits.
🧮Donchian Channel Calculator
Calculate Donchian Channel upper and lower bands based on N-period highs and lows.
🧮Pip Calculator
Calculate pip with inputs, formulas, and instant results.
🧮Forex Margin Calculator
Calculate forex margin with inputs, formulas, and instant results.
🧮Forex Profit Calculator
Calculate forex profit with inputs, formulas, and instant results.
🧮Spread Cost Calculator
Calculate spread cost with inputs, formulas, and instant results.
🧮Forex Commission Calculator
Calculate forex commission with inputs, formulas, and instant results.
🧮Currency Pair Correlation Calculator
Calculate currency pair correlation with inputs, formulas, and instant results.