TWAP

Calculate TWAP instantly with the exact formula and a worked example.

TWAP

Intervals N (the first N prices are used)
P₁
P₂
P₃
P₄
P₅
P₆
TWAP
101.6667
Calculate TWAP instantly with the exact formula and a worked example.
Minimum
100
Maximum
103
Last price vs TWAP
0.82%

TWAP, the time-weighted average price, is the average price of an asset over a period in which every equal slice of time counts the same. Enter up to six interval prices to get the TWAP, the range and how far the latest price sits from it.

How the calculation works

The formula is TWAP = (P₁ + P₂ + … + Pₙ) ÷ N, where Pᵢ is the price for interval i and all intervals have the same length — every 5 minutes, every hour and so on. With equal intervals, time weighting reduces to a plain arithmetic mean.

Set the number of intervals N (1–6) and fill in P₁…P₆. Only the first N prices are used; the rest are ignored. For each interval traders usually take the bar’s close or its typical price — just be consistent.

Besides TWAP you get the minimum and maximum of the selected prices and the deviation of the last used price Pₙ from TWAP in percent: positive means the latest price is above the average, negative below.

Worked example

Defaults: N = 6 with prices 100, 101, 102, 101.5, 103 and 102.5. The sum is 610, so TWAP = 610 ÷ 6 ≈ 101.67. Low 100, high 103. The last price, 102.5, is (102.5 ÷ 101.67 − 1) × 100 ≈ 0.82% above TWAP. Set N = 4 and only the first four prices count: TWAP = 101.125, with the fourth price (101.5) 0.37% above it.

Things to keep in mind

  • TWAP ignores volume. When activity varies a lot through the session, VWAP is usually the fairer execution benchmark.
  • Intervals must be equal. With uneven gaps, weight each price by its duration or the result will be skewed.
  • A TWAP execution algorithm splits a large order into equal slices over time; to judge it, compare your average fill price with the market TWAP over the same window.
  • Six points is a quick sanity check. For longer windows, compute TWAP across all bars in a spreadsheet or your platform.

More about: TWAP

What it calculates

The “TWAP” calculator computes TWAP from 7 parameters: intervals n (the first n prices are used), p₁, p₂, p₃, p₄, p₅, p₆.

Used by investors to estimate returns, project savings, and analyze a portfolio.

Example calculation

With parameters Intervals N (the first N prices are used) = 6, P₁ = 100, P₂ = 101, P₃ = 102, P₄ = 101.5, P₅ = 103, P₆ = 102.5 the result is 101.67.

How to use

  1. Enter intervals n (the first n prices are used), p₁, p₂, p₃, p₄, p₅ and p₆ — each field above is adjustable with a slider.
  2. TWAP is calculated automatically as you type.
  3. Check the worked example below to see the formula applied to real numbers.
  4. Copy the result or bookmark this calculator.

Related calculators

FAQ

What is the difference between TWAP and VWAP?
TWAP is a simple average of prices sampled at equal time intervals; VWAP weights each price by traded volume, so it leans toward prices where most trading happened.
Where is TWAP used?
As an execution benchmark for large orders, in order-slicing algorithms, and in decentralized-exchange price oracles, where averaging over time makes manipulation more expensive.
Which price should I use for each bar?
Most often the close; some use the typical price (high + low + close) ÷ 3. Pick one method and apply it to every interval.
What does a negative deviation mean?
The latest price is below the period average. For a buyer that is cheaper than TWAP right now, but it is not a trading signal on its own.

More calculators in this category

Explore related free tools

Keltner ChannelMACDRSIStochastic OscillatorWilliams %RCCIOBVA/D LineMoney Flow IndexChaikin OscillatorIchimoku Kinko HyoCamarilla Pivots