portfolios.tools

ATR Calculator

Calculate Wilder Average True Range, normalize volatility against price, and estimate a risk based position size from high, low, and close data.

Market Data and Risk

Enter oldest row first. Use one row per period with high, low, and close in that order.

ATR Analysis

Current ATR

3.4682

ATR percent of close

3.15%

Risk amount

$250.00

Whole shares

72

One ATR position risk

$249.71

ObservationTrue rangeATR
93.2000Not available
103.2000Not available
113.2000Not available
123.2000Not available
133.4300Not available
144.4100Not available
153.64003.5350
163.20003.5111
173.20003.4889
183.20003.4682

How the ATR Calculator Works

Average True Range is a direction neutral volatility measure developed by J. Welles Wilder. Unlike a simple high to low range, true range also considers gaps between the previous close and the current session. For each row after the first, this calculator takes the greatest of the current high minus current low, the absolute difference between current high and previous close, and the absolute difference between current low and previous close. A large overnight move is therefore represented even when the session itself trades inside a narrow range.

The first ATR is the arithmetic mean of the first true ranges in the selected lookback. Every later value uses Wilder smoothing: the previous ATR receives period minus one parts, the newest true range receives one part, and the total is divided by the period. The standard fourteen period setting therefore requires fifteen rows because the first row supplies only the previous close needed for the first true range. The recursive method produces a stable series that adjusts gradually when volatility changes.

ATR is expressed in the same price units as the instrument. Dividing the latest ATR by the latest close and multiplying by one hundred creates ATR percent, which makes volatility easier to compare across prices. A two dollar ATR is substantial for a ten dollar asset but small for a five hundred dollar asset. ATR percent remains historical and can change sharply after news, gaps, illiquid trading, or a regime shift, so it should not be treated as a fixed forecast.

The position sizing section converts the chosen portfolio risk percentage into a currency risk amount, then divides that amount by one ATR and rounds down to whole shares. Stop distance displays ATR multiplied by the resulting share count. This is an educational one ATR risk model, not a complete trading plan. If your actual stop is two ATR units away, divide risk by two ATR instead. Fees, slippage, lot sizes, leverage, currency conversion, and gaps beyond a stop can materially change realized loss.

Step by step

  1. Enter chronological rows containing high, low, and close values, with one market period on each line.
  2. Choose the ATR period, portfolio value, and maximum portfolio percentage to risk in the example position.
  3. Review current ATR, ATR percent, risk amount, whole share estimate, stop distance, and recent true ranges.

Worked ATR Example

Suppose yesterday closed at 100 and today traded as high as 105, as low as 102, and closed at 104. The intraday range is 3, the high to previous close gap is 5, and the low to previous close gap is 2. True range is the greatest value, which is 5. A simple range would miss part of the overnight gap, while true range captures the full movement relevant to volatility.

Assume a fourteen period ATR equals 2.50, the latest close is 50, a portfolio is worth 25,000, and risk is one percent. ATR percent is 5 percent. The currency risk amount is 250. Dividing 250 by 2.50 gives 100 whole shares, and one ATR of stop distance across that position equals 250. If the planned stop is 1.5 ATR from entry, the appropriate quantity under the same simplified model would be smaller.

When ATR Analysis Is Useful

ATR can help compare current movement with an instrument's own history, adapt stop research to changing volatility, or normalize a position sizing process. Trend followers may use a multiple of ATR as a trailing reference. Swing traders may avoid placing stops inside routine price noise. Portfolio managers can use ATR percent to compare the recent movement of instruments with very different nominal prices, while recognizing that price range is not the same as statistical return volatility.

Use a data interval aligned with the intended holding horizon. Daily ATR can inform a multi day trade, while hourly ATR describes a much shorter market rhythm. Keep session boundaries consistent, especially for assets that trade nearly continuously. ATR does not indicate direction or expected return, so pair it with a separate entry rationale. Review liquidity, gap risk, event calendars, concentration, and maximum portfolio loss before relying on a calculated quantity.

Common ATR Mistakes

A frequent error is calculating only high minus low and ignoring the previous close, which understates volatility after gaps. Another is entering rows newest first. True range is chronological, so reversed data pairs each session with the wrong prior close. Check that each high is at least the low, that values use the same currency and adjustment convention, and that split adjusted and raw data are not mixed in one series.

Do not interpret ATR as a price target or a prediction that the next move will equal one ATR. It is a smoothed historical range. Using one ATR as a universal stop also ignores strategy structure and gap risk. The displayed share count assumes the entire chosen risk amount can be lost across exactly one ATR and that shares are whole units. Real orders face fees, spreads, slippage, partial fills, taxes, leverage rules, and losses beyond stop prices.

Average True Range Formula

true range = maximum of (high minus low), absolute (high minus previous close), and absolute (low minus previous close)

first ATR = sum of first true ranges divided by period

next ATR = ((prior ATR times (period minus 1)) plus current true range) divided by period

ATR percent = ATR divided by current close times 100

risk amount = portfolio value times risk percent divided by 100

position size = floor of risk amount divided by ATR

stop distance = ATR times position size

The first input row establishes a previous close and does not have a reported true range. This implementation keeps full precision during smoothing and rounds displayed values. Position size is rounded down to whole units and assumes a one ATR stop. It does not cap the position by available capital, margin, contract multiplier, or lot size. Adapt the risk denominator when the intended stop uses another ATR multiple.

Limitations and Assumptions

ATR looks backward and can lag sudden regime changes. Data must be chronological and internally consistent, with valid highs, lows, and closes. The model assumes a one ATR stop, whole shares, immediate execution, no financing constraint, and no costs or gaps. It does not model correlations or total portfolio exposure. Local persistence is subject to browser behavior. Historical range cannot guarantee future containment, and a stop order may execute far from its trigger. Use this output for education, not personalized advice.

Key ATR Terms

True Range
The greatest of the session range and the two absolute distances from the current high or low to the previous close.
Average True Range
A Wilder smoothed average of true ranges that reports recent direction neutral movement in the instrument's price units.
ATR Percent
Latest ATR divided by latest close and multiplied by one hundred, used to normalize range across different price levels.

Compare ATR with Other Risk Measures

ATR describes absolute price range and gaps. Standard deviation describes dispersion of returns around their mean, while beta estimates sensitivity to market returns. These measures answer different questions. ATR is intuitive for chart based stop distances, but portfolio construction usually also requires correlations, return volatility, liquidity, and scenario analysis.

The RSI Calculator adds directional momentum context but does not measure volatility. A position size calculator can incorporate an explicitly chosen entry and stop price rather than assuming one ATR. A maximum drawdown calculator examines realized peak to trough loss. Combining tools can improve structure, yet no collection of historical metrics removes uncertainty or execution risk.

FAQ

What does ATR measure?

ATR measures the smoothed magnitude of recent price ranges, including gaps. It is direction neutral: a sharp advance and a sharp decline can both increase ATR. The value is quoted in price units, so it describes typical movement rather than a percentage return or expected profit. ATR percent divides by the latest close to improve comparison across instruments with different price levels.

Why does ATR use the previous close?

The previous close captures movement that happens between sessions. If an asset closes at 100 and opens near 110, a high to low range calculated only within the new session could appear small even though holders experienced a large price change. Taking the greatest distance involving the prior close includes that gap. This makes true range more informative than intraday range when sessions do not trade continuously.

Why is fourteen the usual ATR period?

Fourteen was Wilder's original common setting and remains a platform convention, but it is not mandatory. A shorter period responds faster to volatility shocks and also falls faster afterward. A longer period changes more slowly and may suit a longer decision horizon. The appropriate choice depends on data frequency, strategy, liquidity, and testing. Compare ATR values only when their period and interval are consistent.

How is ATR position size calculated?

The calculator multiplies portfolio value by the chosen risk percentage to obtain a currency risk budget. It divides that amount by the latest ATR and rounds down to a whole share. This assumes the entry to stop distance is exactly one ATR. For a stop two ATR away, use two times ATR in the denominator. Also cap quantity for available capital and account for fees, slippage, and gap risk.

Can ATR be compared across different assets?

Raw ATR is not directly comparable when price levels or currencies differ. ATR percent normalizes the latest ATR by the latest close, which provides a more useful relative measure. Comparisons still require matching intervals and periods. Trading hours, liquidity, corporate actions, price limits, and session definitions can cause structural differences. For portfolio risk, return volatility and correlations provide additional information that ATR alone does not capture.

Can I use this calculator on a phone or tablet?

Yes. All calculations run in a modern mobile browser. Entering many high, low, and close rows may be more convenient on a larger screen, but the formulas are identical. The calculator may retain raw rows, period, portfolio value, and risk percentage in browser localStorage on the same device. Computed ATR and position size results are recalculated rather than stored.

Where is my market data stored?

The calculation occurs locally. Input rows and settings may be saved in localStorage so the form can be restored on the current browser. They are not sent to a dedicated calculation server by this tool. Browser privacy settings can disable storage, and clearing site data removes it. Do not paste confidential information into any shared or managed device without understanding its local storage policy.

Is the recommended position size financial advice?

No. It is a simplified educational example based on historical ATR and a one ATR risk distance. It does not consider suitability, income, liabilities, diversification, liquidity, leverage, contract values, tax, currency exposure, news gaps, or whether the trade has positive expected return. Actual losses can exceed a stop. Consult an appropriately qualified professional for advice related to your circumstances and independently validate every order quantity.

Related Tools

Use the RSI Calculator for momentum zones, the Position Size Calculator for custom entry and stop levels, and the Maximum Drawdown Calculator for historical decline analysis.