How VWAP Is Calculated, With a Four-Bar Worked Example
VWAP is the average price of the session weighted by how many shares traded at each price. The arithmetic is simple enough to check by hand, and doing it once shows both what the line is good for and where it goes slow.
Definition
VWAP: Volume-weighted average price: the cumulative sum of price times volume divided by cumulative volume, usually calculated from the start of each trading session.
Also called Volume-weighted average price.
Of all the lines a trader can put on an intraday chart, VWAP is one of the few whose value you can check with a calculator. It carries no parameters to tune. It is an average of the prices the session has traded at, weighted by volume, so a price where heavy volume changed hands counts for more than a price that printed on a few hundred shares.
The formula
Two running totals, one division.
- For each bar, take a representative price and multiply it by the bar’s volume.
- Add those products up from the start of the session.
- Add up the volume from the start of the session.
- Divide the first total by the second.
The representative price per bar is often the typical price, (high + low + close) / 3, though some platforms use the close or another variant. Most charts reset the calculation at the start of each trading session, so the first bar’s VWAP is simply its own typical price and every bar after that folds into the running average.
Four bars, worked through
Here is a hypothetical opening to a session in a stock trading near 20.40.
| Bar | High | Low | Close | Typical price | Volume |
|---|---|---|---|---|---|
| 1 | 20.60 | 20.00 | 20.30 | 20.30 | 50,000 |
| 2 | 20.70 | 20.20 | 20.60 | 20.50 | 30,000 |
| 3 | 20.80 | 20.40 | 20.45 | 20.55 | 20,000 |
| 4 | 20.50 | 20.10 | 20.30 | 20.30 | 40,000 |
Look at bar 3. Its typical price was 20.55, the highest of the four, yet VWAP only rose from 20.375 to 20.41, because the bar carried just 20,000 shares against 80,000 already in the total. Bar 4 then printed at 20.30 on heavier volume and pulled VWAP back down to about 20.38.
A plain average of the four typical prices would be (20.30 + 20.50 + 20.55 + 20.30) / 4 = 20.4125. VWAP comes out lower. The heavy bars were the cheaper ones.
What traders use it for
Judging a fill. Say you bought 1,000 shares during these four bars at an average of 20.33. VWAP at the end of bar 4 is about 20.38, so you paid roughly 5 cents a share below it, or about 50.00 on the order. For a buyer that is the favorable side. A seller wants to be above it. This benchmark use is the oldest one, and it is a fair measure of whether your execution was reasonable relative to the session’s trading, though the comparison only means something once you check your fill against the right bars; our page on why a fill can differ from the chart covers the timing issues.
An intraday reference level. Many traders mark whether price is above or below VWAP as a quick read on who has been in control of the session so far. It is a description of the day’s trading. We make no claim here that crossing it predicts anything, and no such claim is needed to use it as a reference.
Where it runs out
VWAP lags. The effect grows through the session: by the afternoon, the cumulative volume is so large that a new bar barely moves the line, so a stock can trend hard for an hour while VWAP creeps.
The same bar makes the point at two times of day. Add a fifth bar of 10,000 shares at a typical price of 21.00 to the example, then add the identical bar to a session that already has 3,000,000 shares in it at a VWAP of 20.38.
Early in the session the bar lifts VWAP by about 4 cents. Late, it moves the line by a fraction of a cent. Nothing about the bar changed.
It is also an intraday measure. Most calculations start over each session, so yesterday’s VWAP says nothing about today’s line. A stock that gaps at the open starts a fresh VWAP at the new price.
Anchored VWAP is the common variant for longer spans. You choose the starting bar, such as an earnings release, a gap, or a swing low, and the same cumulative arithmetic runs forward from there across as many sessions as you like. The choice of anchor is yours, so two traders anchoring at different points will see different lines on the same chart.
Depth of book tells you what is waiting to trade. VWAP tells you what already did. Pair it with Level 2 quotes if you want both halves.
Also asked
- Why does my platform's VWAP differ from another one?
- Platforms can differ in the typical price formula, whether extended-hours trades are included, and the bar data used. Small differences between two charts are normal.