How Is Bollinger Range Calculated? Formula, Inputs, and Limits

Bollinger Range calculation formula inputs limitations verification.

Definition of Bollinger Range

Bollinger Range describes how wide the Bollinger Bands are. It is typically expressed as the distance between the upper and lower band.

Before using the idea, define the parts:

  • Price series: a time-ordered list of prices (for example, closes) sampled at a fixed interval.
  • Lookback window (N): the number of periods used to compute the moving average and standard deviation.
  • Moving average (SMA): the average of the last N observations.
  • Standard deviation (SD): a measure of how spread out those last N observations are.
  • Band multiplier (k): how strongly the standard deviation is used to set the band distance.

With these definitions, the mechanics become a straightforward computation that you can reproduce from the same input data.

Mechanics: the formula and how it is computed

Bollinger Bands are commonly built from a moving average and standard deviation of price over the lookback window.

  1. Compute the moving average over the last N periods:
  • Let (P_t) be the price at time (t).
  • The simple moving average at time (t) is [ \text{SMA}t = \frac{1}{N}\sum{i=0}^{N-1} P_{t-i} ]
  1. Compute the standard deviation over the same N prices:
  • The sample standard deviation can be written as [ \text{SD}t = \sqrt{\frac{1}{N-1}\sum{i=0}^{N-1}(P_{t-i}-\text{SMA}_t)^2} ] (Some implementations use population standard deviation with (N) instead of (N-1); what matters for independent verification is that you use the same definition as the source you are comparing to.)
  1. Create the upper and lower bands using the multiplier (k):
  • [ \text{Upper}_t = \text{SMA}_t + k\cdot \text{SD}_t ]
  • [ \text{Lower}_t = \text{SMA}_t - k\cdot \text{SD}_t ]
  1. Compute the Bollinger Range as the band width:
  • [ \text{Bollinger Range}_t = \text{Upper}_t - \text{Lower}_t ] Substituting the band formulas gives a simplified relationship:
  • [ \text{Bollinger Range}_t = 2k\cdot \text{SD}_t ] So, the range is directly proportional to the standard deviation of price in the lookback window.

Data requirements (what you must have)

To calculate Bollinger Range independently, you need:

  • A consistent price series (P_t) (e.g., close prices), covering at least N periods.
  • A sampling interval (e.g., one-hour bars). Your time step must match across all computations.
  • The chosen lookback window N and multiplier k.
  • A defined standard deviation convention (sample vs population), especially if you are validating against a specific software implementation.

Evidence and worked example (using assumptions you can verify)

Because Bollinger Range depends only on (\text{SD}_t), the simplest way to verify your understanding is to recompute (\text{Upper}), (\text{Lower}), and their difference from the same N prices.

Assume you have the last N=5 prices (using the same interval and price type throughout): (P_1, P_2, P_3, P_4, P_5). Choose multiplier (k=2) for illustration.

  1. Compute (\text{SMA}_5) as the mean of those five prices.
  2. Compute (\text{SD}_5) from the same five prices using the same SD definition.
  3. Compute:
  • (\text{Upper}_5 = \text{SMA}_5 + 2\cdot\text{SD}_5)
  • (\text{Lower}_5 = \text{SMA}_5 - 2\cdot\text{SD}_5)
  1. Then:
  • (\text{Bollinger Range}_5 = \text{Upper}_5 - \text{Lower}_5)
  • By algebra, (\text{Bollinger Range}_5 = 4\cdot\text{SD}_5)

This example shows two verification points:

  • The numerical result should match whether you compute it as a band difference or as (2k\cdot\text{SD}_t) (again, assuming identical SMA/SD conventions).
  • If your computed range differs from a platform’s value, the cause is usually not the concept, but mismatched inputs (different N or k), a different moving average type, or a different standard deviation convention.

If you want a quick consistency check without any charting tools: recompute (\text{SD}_t) from the same N prices and confirm that doubling the SD by (2k) gives your band width.

Limitations and likely failure modes

Bollinger Range is a volatility-related width measure, but several limitations affect interpretation and reproducibility.

1) Parameter sensitivity (N and k)

Changing N alters the smoothing of both the moving average and the standard deviation. Changing k directly scales the band width through (2k\cdot\text{SD}_t). Two calculators using different parameter values will not agree.

2) Standard deviation definition mismatch

Some implementations use sample standard deviation (division by (N-1)); others use population (division by (N)). For small N, this difference can be noticeable, leading to different band width results.

3) Price input definition and sampling

You must confirm whether the source uses close prices, typical prices, or another derived price. Also confirm the sampling interval. Mixing daily and intraday data, or using different time-zone cutoffs, can change the values.

4) Interpretation uncertainty

A wider Bollinger Range indicates larger dispersion over the lookback window, but it does not by itself specify direction (up or down movement) or guarantee that future dispersion will contract or expand. Historical relationships do not establish future results.

5) Edge effects and missing data

At the beginning of the series (before N observations exist), a calculator may output missing values or start later. If the input series has gaps or different missing-data handling, your computed bands may differ from software.

Verification and next question

A reliable way to verify Bollinger Range is to reproduce the computation end-to-end:

  1. Pick the exact N, k, price type, and sampling interval.
  2. Compute (\text{SMA}) and (\text{SD}) on the same N observations.
  3. Build upper and lower bands.
  4. Confirm that (\text{Upper} - \text{Lower} = 2k\cdot\text{SD}).

If you are trying to explain differences between two charts, a common next step is to check how their settings change the range (especially N, k, and the standard deviation convention).

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.