Skip to content
TraderCalcs.io

ATR Calculator

Calculate average true range from the highs, lows and closes you enter, by simple mean or Wilder's smoothing.

Average true range measures how far an instrument has been moving from one period to the next, in the units it is quoted in. This ATR calculator builds the figure entirely from bars you type in — a high, a low and a close for each period, oldest at the top — and what comes back is a distance with no direction attached. A series that rose 8% and one that fell 8% can produce the same ATR.

Formula: true range = max(high - low, |high - previous close|, |low - previous close|)

Your figures

Wilder's is what most charting packages mean by ATR. A simple rolling mean is what most spreadsheets do. The two disagree permanently and neither is wrong.

How many true ranges go into the average. Wilder used 14, and the table below opens with twenty rows so that setting works straight away. n bars give n true ranges, so the period can go as high as the number of rows you have.

Price bars

One row per period, oldest at the top. The first row's true range is simply its high less its low, because there is no earlier close for it to gap from. Blank rows are ignored.

Bar 1
Bar 2
Bar 3
Bar 4
Bar 5
Bar 6
Bar 7
Bar 8
Bar 9
Bar 10
Bar 11
Bar 12
Bar 13
Bar 14
Bar 15
Bar 16
Bar 17
Bar 18
Bar 19
Bar 20
ATR multiples

Distances are reported at each of these multiples of the current ATR. Change them, add your own, or clear every row to leave the table out entirely.

Multiple 1
Multiple 2
Multiple 3
Multiple 4

Results

Average true range

1.6855

14-period, Wilder's smoothing, from 20 bars

ATR as a share of the latest closeThe same figure measured against the price it came from, which is what makes two instruments comparable at all.
1.6160%
True range of the latest barThe most recent period on its own, before any averaging.
1.7000
Latest closeThe last row of the table, and the price the percentages here are taken against.
104.3000
Smoothing usedEach value is the previous one weighted by n − 1, plus the newest true range, all divided by n.
Wilder's smoothing
Seed — mean of the first 14 true rangesWhere Wilder's recursion starts. Packages that seed differently produce a different number here and converge only slowly afterwards.
1.7286
Bars usedRows left wholly blank are dropped rather than counted.
20
ATR values in the seriesThe first sits at bar 14, since there is nothing to average before the 14th true range exists.
7
Earliest ATR in the seriesWhere the average started, for comparison with the latest value above.
1.7286
1 × ATR distance1.6160% of the latest close.
1.6855
1.5 × ATR distance2.4240% of the latest close.
2.5282
2 × ATR distance3.2320% of the latest close.
3.3710
3 × ATR distance4.8480% of the latest close.
5.0565

What this means

Across the 20 bars entered, the 14-period average true range under Wilder's smoothing is 1.6855, which is 1.6160% of the 104.3000 close. The latest bar's own true range was 1.7000. Each row contributes the largest of its own height and its two distances from the previous close, so a period that opened away from the last close is measured including the jump into it rather than only the part of the move that happened inside the bar. What comes out is a measure of how far this series has been moving over the periods entered, in the units it is quoted in — a distance, carrying no direction of its own.

  • An ATR is not a price and not a direction. It is an average distance travelled per period, so it is the same number whether the series that produced it rose, fell or went nowhere.
  • The first row's true range is its high less its low, because no earlier close exists to measure a gap against. That single row is why implementations disagree about the first value, and why the disagreement matters less the further down a long series you read.
  • Wilder's smoothing and a simple rolling mean answer the same question differently and both are correct. Comparing this figure with a platform's own means checking which the platform used before deciding one of them is wrong.
  • The rows are treated as consecutive periods in the order given, whatever they are: minutes, days or weeks. Nothing here knows about sessions, weekends or holidays, so a series with a bar missing from the middle is measured as though the two either side of the hole were adjacent.
  • Every figure on this page is taken from periods that have already traded. It describes what the series has done, and no reading of it — high, low or anywhere between — carries information about what the next period does.
  • The multiples table reports distances only — how far a given multiple of the current ATR reaches from any price you choose. It contains no prices and no side, because where a stop belongs, or whether one belongs there at all, depends on the trade rather than on this number.
  • This series holds only 7 ATR values, the first of which is the seed, so the reading is still largely the simple mean it started from. Two implementations that seeded differently need twenty or thirty further bars before they agree closely.

Average true range: 1.6855

The link reopens this calculator with the same numbers. Nothing you enter is sent to a server.

About the ATR calculation

The true range a bar contributes is not simply its height. It is the largest of three distances: the bar's own high less its low, and the gaps from the previous close up to this high and down to this low. Where a period opened at the last close, the first term always wins and the other two change nothing. Where it opened away from that close, they are what stop the measure ignoring the jump into it.

The averaging is where two packages most often disagree about identical bars, and neither is broken. Wilder's original is a recursion seeded with a simple mean, and it never entirely forgets a bar; a plain rolling mean discards each bar once it leaves the window. After one unusually wide period the two can sit a third apart. Every average true range calculator has to settle on one of them, so both are offered as a choice here and the result names the one it used.

One asymmetry is worth knowing before this figure is compared with anything else. The first bar of a series has no previous close to gap from, so its true range is simply its own height — which is why implementations differ on the earliest values, and why that difference fades the further down a long series you read.

ATR formula

TR_1 = high_1 − low_1                       (no previous close exists)
TR_t = max( high_t − low_t,
            |high_t − close_{t−1}|,
            |low_t  − close_{t−1}| )

Wilder's   ATR_n = (TR_1 + … + TR_n) ÷ n          ← the seed
           ATR_t = (ATR_{t−1} × (n − 1) + TR_t) ÷ n

Simple     ATR_t = (TR_{t−n+1} + … + TR_t) ÷ n

share of price = ATR ÷ latest close × 100
distance at m  = ATR × m
TR_t
The true range of period t — the largest of the bar's own height and its two distances from the previous close. Never smaller than the bar's height, and never negative.
n
The period: how many true ranges go into the average. Wilder worked with 14, which is what the field opens on rather than a constant fixed in the arithmetic.
ATR_{t−1}
The previous smoothed value. Its appearance on the right-hand side is what makes Wilder's form recursive, and what gives it a memory that never quite empties.
the seed
The simple mean of the first n true ranges, where Wilder's recursion starts. Two packages that seed differently disagree for a long time rather than briefly.
| |
Absolute value — the size of a gap, ignoring whether the period opened above or below the previous close. Both directions widen the true range equally.
m
An ATR multiple. What it produces is a length, not a price and not a side: it has to be measured from somewhere before it means anything.

The true range formula takes three terms because a bar's height describes only the part of a move that happened while it was trading. A period opening four points above the previous close and then trading in a one-point range moved five points as far as anyone holding through it was concerned, and the terms measured against that close are what record it. On quiet data the first term dominates and the definition collapses to the bar's height, which is why the two ways of measuring a range agree on ordinary days and separate on exactly the days worth measuring.

Wilder's recursion is an exponential average with a smoothing factor of 1 ÷ n, and writing it that way explains what people find surprising about it. The weight given a bar k periods back is (1 − 1/n)^k ÷ n, which shrinks but never reaches zero. And because a conventional EMA uses 2 ÷ (n + 1) instead, a Wilder average of period n is identical to an EMA of period 2n − 1: Wilder's 14 is an EMA of 27, which is how a platform offering only EMAs can reproduce it.

The seed matters more than it looks, because every later value is built on it. Two implementations that started from different seeds disagree indefinitely rather than for a few bars, the gap closing by a factor of (n − 1) ÷ n each period — seeds 20% apart have narrowed to a few percent after twenty smoothed values at n = 14. With exactly n bars entered the question disappears: the seed is then the mean of the only true ranges there are, no recursive step runs, and both choices return the same number.

Dividing by the latest close turns a distance into something two instruments can be compared on. An ATR of 1.868 means nothing alone; against a close of 102.80 it is 1.8171% of price, which sits beside an ATR of 340 on an index at 18,000 without conversion. The multiples line does the reverse, returning a length in price units. Where that length is measured from, in which direction, and whether it belongs on a chart at all are not questions the arithmetic has any view on.

ATR: a worked example

Seven bars near 100 read as a five-period ATR under Wilder's smoothing, where bar six opens 2.60 above bar five's close and then trades in a range of only 0.80.

  1. The seven true ranges1.80, 1.80, 1.60, 1.80, 1.00, 3.40, 1.50
  2. Bar 6, the one that gappedhigh − low = 103.40 − 102.60 = 0.80, but |103.40 − 100.00| = 3.40, so TR = 3.40
  3. Seed — mean of the first five(1.80 + 1.80 + 1.60 + 1.80 + 1.00) ÷ 5 = 1.60
  4. Wilder step at bar 6(1.60 × 4 + 3.40) ÷ 5 = 1.96
  5. Wilder step at bar 7(1.96 × 4 + 1.50) ÷ 5 = 1.868
  6. As a share of the 102.80 close1.868 ÷ 102.80 × 100 = 1.8171%
  7. Distance at 2 × ATR1.868 × 2 = 3.736, which is 3.6342% of the close
  8. Same rows, simple rolling mean(1.60 + 1.80 + 1.00 + 3.40 + 1.50) ÷ 5 = 1.86

A five-period ATR of 1.868, or 1.8171% of the 102.80 close. Bar six is why the two smoothing choices will part company: its own height was 0.80, its true range 3.40 because it opened 2.60 above the previous close, and Wilder's average still carries a fraction of it twenty bars later while a rolling mean drops it once five further bars have printed. Over these seven rows the two sit close together, at 1.868 and 1.86, and they separate as that wide bar ages out of the window.

How to use the ATR calculator

  1. Choose the smoothing first: Wilder's ATR smoothing or a plain rolling mean. It changes every value in the series, not just the last one, so it is the setting to match before anything here is compared with a chart.
  2. Set the period. n bars produce n true ranges, so it can go as high as the rows filled in, and 14 is what the field opens on because that is what Wilder published.
  3. Fill the table one row per period, oldest at the top. Rows left wholly blank are ignored, so adding a row does not blank the panel while it is being typed into.
  4. Adjust the ATR multiples, add your own, or clear every row if no distance table is wanted. It is the table people are reading when they come here for an ATR stop loss calculator, and what it produces are lengths rather than levels: the panel reports no price to measure them from.
  5. Read the ATR beside the share of the close underneath it, and check the seed row when the figure disagrees with a platform — on a short series most of the discrepancy lives there.

Limitations of the ATR calculator

Every calculation makes assumptions. These are the ones that matter here.

  • An ATR is a distance and carries no direction. The identical figure comes out of a series that rose, one that fell and one that finished where it started.
  • Rows are treated as consecutive periods in the order given, so a series with a bar missing from the middle is measured as though the two either side of the hole were adjacent.
  • The first row's true range is its own height, because no earlier close exists to gap from. On a short series that single row can move the average noticeably.
  • Wilder's smoothing and a rolling mean disagree permanently. A figure from here is comparable with a platform's only once both are known to use the same one.
  • The timeframe is whatever the rows are. An ATR from hourly bars and one from daily bars do not convert into each other by any fixed factor.
  • The multiples table reports distances only, with no entry price and no side, because where a stop belongs depends on the trade rather than on a volatility measure.

Frequently asked questions about ATR

Why does my charting platform show a different ATR from the same bars?

Almost always the smoothing. Wilder's recursion and a plain rolling mean of the last n true ranges are both called ATR, and after one unusually wide period they can sit a third apart. The next most common reason is the seed: a platform smoothing years of history reaches today's bar carrying a different starting value from a fresh twenty-row series. Neither of those is an error in either calculation.

Is a 14-period Wilder ATR the same as a 14-period EMA of the true range?

No, but it is the same as a 27-period one. Wilder's smoothing factor is 1 ÷ n while a conventional exponential average uses 2 ÷ (n + 1), and setting those equal gives an equivalent period of 2n − 1. A platform offering only EMAs can reproduce a Wilder 14 by running a 27-period EMA over the true range series, once the different starting value is allowed for.

What period should the average be taken over?

Wilder published 14 and most platforms open on it, which is why the field starts there — but it is a field rather than a constant. A shorter period reacts to a change in ranges sooner and moves about more; a longer one is steadier and lags further behind. Neither is more correct, and the honest way to settle it is to look at what each produces on the series in front of you.

Why is the first bar's true range just its high less its low?

Because a true range is measured partly against the previous close, and the first bar of a series does not have one. Every implementation meets the same problem and they do not all solve it identically: some do what this one does, others drop the first bar and begin counting at the second. Over twenty rows at a fourteen-period setting the choice is visible in the answer; over two hundred it is not.

Does a rising ATR mean a large move is coming?

No. A rising ATR says the ranges of the periods already entered have been getting wider. It describes bars that have finished trading and contains no statement about the next one. Ranges do cluster in practice, but this calculation neither measures that clustering nor projects it forward, and the figure carries no direction in either case.

How many rows does the ATR calculator need?

At least as many as the period, since n bars give n true ranges. At exactly that many the series holds a single value and it is the seed — a simple mean rather than a smoothed one — so both smoothing choices return the same answer. Rows beyond that are what let the recursion run, and the table opens with twenty so the default fourteen-period setting works straight away.

Last reviewed . See our methodology and editorial policy.

More technical calculators