Skip to main content

Bollinger Bands Calculator

Calculate bollinger bands with our free Bollinger bands Calculator. Compare rates, see projections, and make informed financial decisions.

Skip to calculator
Forex & Trading

Bollinger Bands Calculator

Calculate Bollinger Bands with SMA, upper and lower bands, bandwidth, and %B indicator from your closing price data.

Last updated: December 2025

Calculator

Adjust values & calculate
Middle Band (SMA)
45.5500
Current Price: 46.5000
Upper Band
46.6685
Lower Band
44.4315
Std Deviation
0.5592
Bandwidth
4.91%
%B
92.47%
Signal
Near overbought โ€” approaching upper band

Recent Band Values

Point 20
U: 46.6685M: 45.5500L: 44.4315
Your Result
SMA: 45.5500 | Upper: 46.6685 | Lower: 44.4315 | %B: 92.47%
Share Your Result
Understand the Math

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.

Last reviewed: December 2025

Worked Examples

Example 1: Standard 20-Period Bollinger Bands Calculation

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

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
Expert Insights

Background & Theory

The Bollinger Bands Calculator applies the following established principles and formulas. Foreign exchange markets facilitate the conversion of one currency into another and serve as the largest and most liquid financial markets in the world, with daily turnover exceeding seven trillion US dollars. Exchange rates are quoted as currency pairs, expressing the price of one unit of a base currency in terms of a quote currency. For example, a EUR/USD rate of 1.0850 means one euro buys 1.0850 US dollars. The smallest standardized price movement in most pairs is the pip, typically the fourth decimal place, with a value of 0.0001 per unit for USD-denominated pairs. The bid price is the rate at which a dealer will buy the base currency, while the ask price is the rate at which it will sell. The spread between bid and ask represents the dealer's compensation and varies with liquidity and volatility. Leverage amplifies both gains and losses by allowing traders to control positions larger than their deposited margin. A 100:1 leverage ratio means a one-percent adverse move eliminates the entire margin, making position sizing and risk management critical. Two parity conditions from international economics anchor exchange rate theory. Purchasing Power Parity (PPP) holds that exchange rates should adjust over time so that identical goods trade at equivalent prices across countries: S = P_d / P_f, where S is the spot rate and P_d and P_f are domestic and foreign price levels. PPP performs well over long horizons but poorly in the short run due to trade barriers, non-tradable goods, and capital flows. Covered Interest Rate Parity (CIRP) is a near-arbitrage condition stating that forward exchange rate premiums or discounts exactly offset interest rate differentials between two currencies: F/S = (1 + r_d) / (1 + r_f). Deviations from CIRP create riskless arbitrage opportunities that traders rapidly eliminate. Uncovered Interest Rate Parity posits that high-yielding currencies should depreciate to offset their interest advantage, though empirical evidence is mixed and the carry trade โ€” borrowing in low-rate currencies to invest in high-rate ones โ€” has generated persistent returns.

History

The history behind the Bollinger Bands Calculator traces back through the following developments. For much of the nineteenth century and early twentieth century, the international monetary system operated under the classical gold standard, under which each participating currency was fixed to a defined weight of gold, making bilateral exchange rates effectively constant. The system provided price stability and facilitated global trade but constrained governments' ability to respond to economic downturns. World War One shattered the gold standard as nations suspended convertibility to finance wartime expenditures. The interwar period saw attempts to restore gold convertibility, most notably the British return to the gold standard in 1925 at the pre-war parity, a decision criticized by John Maynard Keynes as deflationary. The Great Depression forced widespread currency devaluations and the effective collapse of the international gold standard by the early 1930s. The Bretton Woods Conference of July 1944 established a new order in which member currencies were pegged to the US dollar, while the dollar alone was convertible into gold at 35 dollars per troy ounce. The International Monetary Fund and World Bank were created at the same conference to oversee the system. Bretton Woods delivered exchange rate stability during the postwar growth era but came under strain as US deficits and European dollar accumulation outpaced American gold reserves. On August 15, 1971, President Nixon announced the suspension of dollar-gold convertibility โ€” the so-called Nixon Shock โ€” effectively ending the Bretton Woods system. By 1973, major currencies had transitioned to floating exchange rates determined by market supply and demand, a regime that has persisted. On September 16, 1992, hedge fund manager George Soros shorted the British pound against the European Exchange Rate Mechanism constraints, forcing the UK's withdrawal in what became known as Black Wednesday. Electronic trading platforms emerged in the 1990s and 2000s, replacing voice-brokered interbank markets and dramatically reducing transaction costs for institutional and retail participants alike.

Share this calculator

Explore More

Frequently Asked Questions

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.
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.
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.
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.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

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\nStandard Deviation = sqrt(sum of squared deviations / 20) = 0.5327\nUpper Band = 45.595 + 2 x 0.5327 = 46.660\nLower Band = 45.595 - 2 x 0.5327 = 44.530\nBandwidth = (46.660 - 44.530) / 45.595 x 100 = 4.67%\n%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%\nTypical bandwidth ranges from 4% to 15%\nA bandwidth below 4% indicates a squeeze\n2.1% is well below the 4% threshold\nSqueeze detected โ€” expect a breakout\nMonitor 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 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.

Is my data stored or sent to a server?

No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.

How do I interpret the result?

Results are displayed with a label and unit to help you understand the output. Many calculators include a short explanation or classification below the result (for example, a BMI category or risk level). Refer to the worked examples section on this page for real-world context.

References

Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy