Skip to content
TraderCalcs.io

VWAP Calculator

Calculate volume-weighted average price from your own price and volume rows, with the deviation from it.

VWAP, the volume-weighted average price, divides the total value traded by the total volume traded. Each bar contributes its price multiplied by the volume that changed hands in it, so a bar that traded a million units moves the figure a thousand times as far as one that traded a thousand, whatever the two prices were. This VWAP calculator builds the figure from bars you type in yourself, one row at a time, and as a volume-weighted average price calculator it accumulates exactly the rows you give it and nothing else.

Formula: VWAP = sum(typical price x volume) / sum(volume)

Your figures

Which price each bar contributes. Choose the close if you only have closes and volumes; the high and low columns can then be left blank.

Optional — measures a price of your choosing against the VWAP once it is computed.

Bars

Oldest first. The first row is the anchor: VWAP is cumulative from it, not a rolling window. Leave the high and low blank if you are weighting by the close.

Bar 1
Bar 2
Bar 3
Bar 4
Bar 5
Bar 6
Bar 7
Bar 8

Results

Volume-weighted average price

101.4381

across 8 bars, anchored to the first row entered

Unweighted average of the same pricesEvery bar counted once. The distance between this and the VWAP is entirely the work of the volumes.
101.4042
Total volumeThe denominator. Scaling every volume by the same factor leaves the VWAP unchanged, so the unit only has to be consistent.
172,400
Total traded valueThe numerator: each bar's weighting price multiplied by its volume, added up.
17,487,926.67
Price weightingEach bar contributes (high + low + close) ÷ 3.
Typical price
Bars usedEvery row entered held everything this weighting needs.
8
Current priceThe price you entered to compare, not part of the average itself.
102.5000
Current price less the VWAP+1.047% of the VWAP.
+1.0619
Bar 1Price 100.4667 · volume 18,500 · cumulative volume 18,500
100.4667
Bar 2Price 101.0000 · volume 22,400 · cumulative volume 40,900
100.7588
Bar 3Price 101.5333 · volume 15,900 · cumulative volume 56,800
100.9756
Bar 4Price 100.9000 · volume 31,200 · cumulative volume 88,000
100.9488
Bar 5Price 100.7333 · volume 12,700 · cumulative volume 100,700
100.9216
Bar 6Price 101.6333 · volume 27,600 · cumulative volume 128,300
101.0747
Bar 7Price 102.3667 · volume 19,800 · cumulative volume 148,100
101.2474
Bar 8Price 102.6000 · volume 24,300 · cumulative volume 172,400
101.4381

What this means

The 8 bars traded 172,400 units in total, and the traded value those volumes represent is 17,487,926.67. Dividing the second by the first gives a volume-weighted average price of 101.4381. The unweighted mean of the same prices is 101.4042; the difference between the two is the weighting doing its work, since a bar that traded ten times as much pulls the figure ten times as far whatever its price was. The price of 102.5000 you entered to compare sits +1.0619 from the VWAP, which is +1.047% of it. Because the calculation is cumulative from the first row rather than a rolling window, adding a bar at the start changes the answer just as much as adding one at the end.

  • VWAP is anchored, not rolling. Every bar entered stays in both sums for good, so the answer depends entirely on where you began counting — a session VWAP restarted at the open and one anchored to an earlier bar are different measures, not the same measure over different windows.
  • A bar that did not trade is allowed and contributes nothing to either sum. A zero total is refused instead, because with no volume to weight by there is no weighted average to report.
  • The typical price is not the only weighting in use. Some platforms weight by the close alone, and the two agree only when a bar closes at the midpoint of its range, so a figure that disagrees with a chart is often this rather than an error.
  • Every price here is one you entered. Nothing is fetched and no market, bar size or session is assumed, so the same calculation serves a five-minute chart, a daily chart and a column of weekly closes without knowing which it has been given.
  • These are descriptions of arithmetic performed on prices that have already printed. Where the latest price sits relative to a line says nothing about where the next one will be.

Volume-weighted average price: 101.4381

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

About the VWAP calculation

VWAP is not a moving average, and treating it as one is the most common way of misreading it. There is no window sliding forwards and discarding old bars. It is cumulative from an anchor: every row entered stays in both sums permanently, so the running figure swings on the first few bars and then settles, and the twentieth bar can barely shift a number the first bar set outright.

That makes the answer a function of where you started counting. A VWAP anchored to the opening bar of a session and a VWAP anchored to a bar three weeks earlier are not the same measure quoted over different windows — they are different measures, and neither is more correct. Nothing here knows what a session is, so the anchor is simply whichever row you enter first, which is what turns the page into an anchored VWAP calculator for any bar of your choosing.

Both figures the page reports describe trading that has already happened. The distance between a price and the VWAP is a subtraction between a number you entered and a number computed from rows you entered, and it carries no information about what the next print will be.

VWAP formula

for each bar, one weighting price:
  typical  P = (high + low + close) ÷ 3
  close    P = close

accumulated from the anchor bar onwards:
  traded value  = Σ (P × volume)
  total volume  = Σ volume

VWAP = traded value ÷ total volume

unweighted mean = Σ P ÷ number of bars
deviation       = current price − VWAP
deviation %     = deviation ÷ VWAP × 100
P
The single price each bar contributes: either the typical price, (high + low + close) ÷ 3, or the close on its own. The two agree only when a bar happens to close at the midpoint of its range.
volume
The quantity traded during that bar, in whatever unit you keep it in — shares, contracts, lots or coins. Zero is allowed for a bar that did not trade.
Σ
A sum running from the anchor bar to the latest one. Nothing is ever removed from it, which is what makes VWAP cumulative rather than rolling.
anchor
The first bar entered, and the point the whole calculation is measured from. It is your choice, not a session convention the calculator supplies.
unweighted mean
The same weighting prices averaged with every bar counted once. The distance between it and the VWAP is entirely the work of the volumes.

The weighting is the whole point of the VWAP formula, and the unweighted mean is reported beside it so the effect is visible rather than asserted. Two bars at 100 and 104 average to 102 if both are counted once. If the bar at 104 traded four times as much as the one at 100, the volume-weighted figure is 103.2, because the calculation asks a different question: not where the prices were, but where the trading was.

Because the sums only ever grow, the running figure settles as it goes. The first bar sets it outright, the second can move it a long way, and by the twentieth a single ordinary bar shifts it by a fraction of a tick. That settling is arithmetic rather than stability in the market, and it means adding a bar at the beginning of the series changes the answer as much as adding one at the end — the practical difference between an anchored measure and a rolling one.

Which price each bar contributes is a real convention and a real source of disagreement. The typical price, (high + low + close) ÷ 3, is what VWAP is normally quoted under and is the default here. Weighting by the close alone is what some platforms do, and it is what a reader working from a table of closes and volumes can actually supply. In the worked example below the same four bars give 102.20 under the typical price and 101.90 under the close — a gap of 0.30 that is nothing but the choice of weighting.

A bar that did not trade is accepted and contributes nothing to either sum, which is the correct treatment: a zero-volume bar is a real thing to record and it has no claim on a weighted average. While the cumulative volume is still zero the running column is left blank rather than filled with the anchor price, and a total volume of zero is refused outright, because with nothing to weight the prices by there is no weighted average to report and the division would return a non-number rather than an answer.

VWAP: a worked example

Four bars anchored to the first, with highs of 101, 103, 105 and 106, lows of 99, 100, 101 and 102, closes of 100, 100, 103 and 104, on volumes of 10,000, 30,000, 50,000 and 10,000.

  1. Typical price of each bar(101 + 99 + 100) ÷ 3 = 100.00, (103 + 100 + 100) ÷ 3 = 101.00, (105 + 101 + 103) ÷ 3 = 103.00, (106 + 102 + 104) ÷ 3 = 104.00
  2. Price × volume, bar by bar1,000,000 + 3,030,000 + 5,150,000 + 1,040,000 = 10,220,000
  3. Total volume10,000 + 30,000 + 50,000 + 10,000 = 100,000
  4. VWAP10,220,000 ÷ 100,000 = 102.20
  5. Unweighted mean of the same four prices(100 + 101 + 103 + 104) ÷ 4 = 408 ÷ 4 = 102.00
  6. Running figure, bar by bar100.00, then 100.75, then 102.00, then 102.20
  7. A price of 103 measured against it103 − 102.20 = +0.80, which is +0.783% of the VWAP

102.20, against an unweighted mean of 102.00 on the same four prices. The 0.20 between them is the third bar doing the work: it traded half the total volume at 103, so it pulls the figure towards itself and the light 10,000-unit bars at either end barely resist. Switch the weighting to the close alone and the identical rows return 101.90 instead, because the closes of 100, 100, 103 and 104 are a different set of numbers from the typical prices.

How to use the VWAP calculator

  1. Decide where the anchor goes before you enter anything, because it determines the answer. The first row you type is the bar the whole calculation accumulates from, whether that is a session open, an earnings gap or an arbitrary bar you have chosen.
  2. Enter the bars oldest first, one row each, with the volume traded in that bar. The result panel reports how many rows it actually used alongside how many were entered, so a half-filled row never silently shortens the series.
  3. Pick the weighting before filling in the grid if you are working from a limited data source. Choosing the close lets you leave the high and low columns blank, which is what a table of closes and volumes allows; the typical price needs all three.
  4. Keep the volume in one consistent unit down the whole column. Scaling everything by the same factor changes nothing, because it cancels between numerator and denominator, but mixing shares on some rows and lots on others reweights the bars against each other without warning.
  5. Enter a current price in the optional field to measure something against the result, and read the running column underneath to watch the figure settle. The current price is not part of the average — it is compared to it afterwards, in price units and as a percentage.

Limitations of the VWAP calculator

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

  • The answer depends entirely on the anchor, and the anchor is your choice. Two people with identical bars who start counting at different rows will get different VWAPs, and both will be right. There is no session logic anywhere here, so a VWAP that resets at an opening bell has to be started as a new series by you.
  • Bars are treated as equal units of the series regardless of how long each one lasted. Nothing knows whether a row is a minute or a day, so a mixed series produces a weighted average of incomparable periods.
  • Where inside a bar the volume actually traded is unknowable from a high, a low and a close. The typical price is an approximation of the bar's average traded price rather than a measurement of it, and on a bar with a long range that approximation is loose.
  • Reported volume is not consistent across venues. A figure taken from one exchange, from a consolidated tape or from a broker's own feed can differ substantially, and the VWAP moves with it even when the prices do not.
  • The distance between a price and the VWAP is descriptive. It says where a price sits relative to the average of trading that has already occurred, and nothing about whether that relationship will persist.

Frequently asked questions about VWAP

Why is VWAP described as anchored rather than as a moving average?

Because nothing ever leaves the calculation. A 20-period moving average discards the twenty-first bar back; a VWAP keeps every bar since the anchor for good. That is why the running figure settles as the series grows, and why adding a row at the start of your series changes the result exactly as much as adding one at the end.

Where should the anchor go on an anchored VWAP?

That is the question the calculator deliberately leaves to you, because there is no answer it could supply without inventing a market it knows nothing about. An intraday VWAP is conventionally anchored to the session open; an anchored VWAP is often started from a specific bar of interest such as a gap or a high. Whichever you choose, the first row you enter is that bar, and the result describes trading from it onwards.

Why does my platform's VWAP differ from this figure?

Three usual causes, in order of likelihood. The anchor is different, so a different set of bars is in the sum. The weighting is different, with the close used instead of the typical price or the reverse. Or the volume series is different, because venues and data feeds report volume inconsistently. Reconciling the anchor first resolves most disagreements before the other two need considering.

Can I calculate a VWAP from closes and volumes alone?

Yes — set the weighting to the closing price and leave the high and low columns blank. The result panel states which weighting was used, so the figure is never ambiguous. It will not match a typical-price VWAP on the same bars unless every bar happened to close at the midpoint of its range, which in practice they do not.

What does it mean when a price is above the VWAP?

Arithmetically it means the price you entered is higher than the volume-weighted average of the bars you entered — that the average unit traded since your anchor changed hands lower than that price. That is a description of completed trading. It carries no implication about whether the price will return to the average, stay above it or move further away, and this calculator makes no such claim.

Last reviewed . See our methodology and editorial policy.

More technical calculators