Bollinger Bands Calculator

Paste closing prices to calculate rolling SMA and population-standard-deviation bands. This tool does not fetch ticker data or predict trades.

Use commas, spaces, or newlines. Up to 5,000 positive prices in the same currency and interval; no thousands separators, headers, or dates. The list is not sorted or adjusted for splits. Calculations use only the values you supply.

Calculated in this page. This tool has no price-fetch request or persistent input save. Changing any input clears previous results.

Visualization

Ready to calculate

How to Use the Bollinger Bands Calculator

  1. Supply closing prices: Paste values in oldest-to-newest order at a consistent interval and currency. Check missing bars, splits, and adjustments in your source. The example button loads a fixed hypothetical sequence, not prices for an asset.
  2. Configure Settings:
    • Period: The number of candles used for the Moving Average (standard is 20).
    • Std Dev: The standard deviation multiplier for the bands (standard is 2).
  3. Calculate: Click the button to generate the chart and values.
  4. Analyze: Observe where the price is relative to the bands. A band touch alone is not a buy or sell signal, and a narrow band does not establish a later breakout direction.

What are Bollinger Bands?

Bollinger Bands are a technical analysis tool defined by a set of trendlines plotted two standard deviations (positively and negatively) away from a simple moving average (SMA) of a security's price.

They were developed by financial analyst and trader John Bollinger in the 1980s. The purpose of Bollinger Bands is to provide a relative definition of high and low prices of a market. By definition, prices are high at the upper band and low at the lower band.

The Calculation Formula

  • Middle Band = Simple Moving Average (SMA) of n periods
  • Upper Band = Middle Band + (k × Standard Deviation)
  • Lower Band = Middle Band - (k × Standard Deviation)

Where n is the number of observations and k is the multiplier. This tool divides squared deviations by n (population convention), retains full precision, and leaves the first n−1 band values blank. Display is rounded to eight significant digits. Zero or negative lower bands are retained as mathematical values, not executable price forecasts.

Why Traders Use Bollinger Bands

  • Volatility Measurement: The bands widen when the market is volatile and contract (the "squeeze") when the market is stable. This describes rolling price dispersion, not a prediction of the next move or annualized return volatility.
  • Trend Identification: Price walking up the upper band can indicate a strong uptrend, while walking down the lower band indicates a strong downtrend.
  • Reversals: "M-Tops" and "W-Bottoms" are common reversal patterns identified using the bands.

Frequently Asked Questions

What settings does this calculator use?

The starting example is a 20-observation SMA with a multiplier of 2. These are defaults, not settings proven best for your market. Period accepts 2–1,000 and multiplier accepts values above 0 through 10.

Does this calculator fetch ticker prices?

No. Paste one price per observation in oldest-to-newest order. The example is a fixed hypothetical sequence, not market data. There is no ticker lookup, date validation, or missing-bar detection.

Which standard deviation is used?

Each window uses population standard deviation: the square root of the mean squared distance from its SMA, dividing by N rather than N−1. Band values remain unrounded during calculation. The first N−1 observations have no bands.

Does a squeeze predict a breakout or its direction?

A narrower band means lower dispersion of prices within that rolling window for fixed settings. It does not establish the timing or direction of a later move. This is not annualized return volatility or a backtest.

Is a band touch a buy or sell signal?

A touch describes price relative to the bands. Price can continue along an upper or lower band; a touch alone does not prove reversal. Two standard deviations do not guarantee that 95% of future prices will stay within the bands.

Sources: John Bollinger’s rules and TradingView’s Bollinger Bands reference. Formulas and output are educational, not a performance test or investment advice.

Define a Testable Bollinger Bands Strategy

Specify entry, exit, position sizing, and cost assumptions before drafting a strategy. Pineify can help generate Pine Script source, which still needs compilation and behavior checks. App coding features have separate plan requirements; this calculator is free to use.

Explore Pine Script AI