VWAP formula: how to calculate VWAP (with Excel)
How the Volume Weighted Average Price is worked out — typical price × volume, added up candle by candle from the start of the day and divided by the volume so far. With a worked example on 5-minute candles, the Excel formulas, a free Excel sheet and a box to calculate VWAP from your own candles.
Last updated:
Needs: intraday high, low, close, volume
The VWAP formula
Typical price (TP) = (High + Low + Close) ÷ 3 VWAP = Σ (TP × Volume) ÷ Σ Volume Both sums run from the first candle of the day (09:15) and start again from zero the next day.
Each candle's typical price counts in proportion to how much traded in it, so a busy candle moves VWAP more than a quiet one.
How to calculate VWAP step by step
- Work out the typical price of each candle. 09:15: (1,013.50 + 1,010.40 + 1,012.80) ÷ 3 = 1,012.23.
- Multiply it by the candle's volume. 1,012.23 × 16,670 = 1,68,73,929.67. On the first candle VWAP is simply its typical price: 1,012.23.
- Keep running totals. 09:20: TP 1,012.37 × 12,000 = 1,21,48,400.00. Running TP × volume = 2,90,22,329.67; running volume = 28,670.
- Divide. VWAP at 09:20 = 2,90,22,329.67 ÷ 28,670 = 1,012.29.
- Repeat until the end of the day, then reset. At 11:20 the example's VWAP is 1,009.75.
Worked example — and calculate VWAP from your own prices
The table works through the first 26 five-minute candles (09:15 to 11:20) of one day for an imaginary stock — the same columns as the Excel sheet. To calculate VWAP for your own stock, clear the box and paste one day's intraday high, low, close and volume, oldest candle first.
Latest values
| Time | High | Low | Close | Volume | Typical price | TP × Volume | Cum. TP × Volume | Cum. volume | VWAP |
|---|---|---|---|---|---|---|---|---|---|
| 09:15 | 1,013.50 | 1,010.40 | 1,012.80 | 16,670 | 1,012.2333 | 1,68,73,929.67 | 1,68,73,929.67 | 16,670 | 1,012.2333 |
| 09:20 | 1,013.65 | 1,011.25 | 1,012.20 | 12,000 | 1,012.3667 | 1,21,48,400.00 | 2,90,22,329.67 | 28,670 | 1,012.2891 |
| 09:25 | 1,012.60 | 1,011.15 | 1,011.95 | 4,760 | 1,011.9000 | 48,16,644.00 | 3,38,38,973.67 | 33,430 | 1,012.2337 |
| 09:30 | 1,012.30 | 1,011.30 | 1,011.30 | 9,500 | 1,011.6333 | 96,10,516.67 | 4,34,49,490.33 | 42,930 | 1,012.1009 |
| 09:35 | 1,011.90 | 1,010.40 | 1,010.90 | 6,990 | 1,011.0667 | 70,67,356.00 | 5,05,16,846.33 | 49,920 | 1,011.9561 |
| 09:40 | 1,011.80 | 1,007.75 | 1,008.50 | 10,430 | 1,009.3500 | 1,05,27,520.50 | 6,10,44,366.83 | 60,350 | 1,011.5057 |
| 09:45 | 1,008.60 | 1,008.40 | 1,008.50 | 4,390 | 1,008.5000 | 44,27,315.00 | 6,54,71,681.83 | 64,740 | 1,011.3019 |
| 09:50 | 1,010.05 | 1,008.25 | 1,008.80 | 4,340 | 1,009.0333 | 43,79,204.67 | 6,98,50,886.50 | 69,080 | 1,011.1593 |
| 09:55 | 1,009.70 | 1,008.70 | 1,008.90 | 7,560 | 1,009.1000 | 76,28,796.00 | 7,74,79,682.50 | 76,640 | 1,010.9562 |
| 10:00 | 1,011.15 | 1,008.25 | 1,010.35 | 7,480 | 1,009.9167 | 75,54,176.67 | 8,50,33,859.17 | 84,120 | 1,010.8638 |
| 10:05 | 1,012.40 | 1,009.90 | 1,011.40 | 10,540 | 1,011.2333 | 1,06,58,399.33 | 9,56,92,258.50 | 94,660 | 1,010.9049 |
| 10:10 | 1,012.25 | 1,009.25 | 1,010.35 | 5,340 | 1,010.6167 | 53,96,693.00 | 10,10,88,951.50 | 1,00,000 | 1,010.8895 |
| 10:15 | 1,012.80 | 1,009.00 | 1,009.75 | 10,420 | 1,010.5167 | 1,05,29,583.67 | 11,16,18,535.17 | 1,10,420 | 1,010.8543 |
| 10:20 | 1,011.65 | 1,009.50 | 1,010.95 | 7,840 | 1,010.7000 | 79,23,888.00 | 11,95,42,423.17 | 1,18,260 | 1,010.8441 |
| 10:25 | 1,012.40 | 1,009.00 | 1,009.80 | 11,800 | 1,010.4000 | 1,19,22,720.00 | 13,14,65,143.17 | 1,30,060 | 1,010.8038 |
| 10:30 | 1,010.40 | 1,009.50 | 1,010.35 | 5,100 | 1,010.0833 | 51,51,425.00 | 13,66,16,568.17 | 1,35,160 | 1,010.7766 |
| 10:35 | 1,010.75 | 1,009.35 | 1,010.05 | 5,360 | 1,010.0500 | 54,13,868.00 | 14,20,30,436.17 | 1,40,520 | 1,010.7489 |
| 10:40 | 1,010.15 | 1,005.30 | 1,007.30 | 6,550 | 1,007.5833 | 65,99,670.83 | 14,86,30,107.00 | 1,47,070 | 1,010.6079 |
| 10:45 | 1,007.75 | 1,005.60 | 1,006.40 | 9,480 | 1,006.5833 | 95,42,410.00 | 15,81,72,517.00 | 1,56,550 | 1,010.3642 |
| 10:50 | 1,010.20 | 1,006.15 | 1,009.70 | 7,560 | 1,008.6833 | 76,25,646.00 | 16,57,98,163.00 | 1,64,110 | 1,010.2868 |
| 10:55 | 1,009.70 | 1,008.55 | 1,008.55 | 11,000 | 1,008.9333 | 1,10,98,266.67 | 17,68,96,429.67 | 1,75,110 | 1,010.2018 |
| 11:00 | 1,009.10 | 1,008.15 | 1,008.40 | 11,190 | 1,008.5500 | 1,12,85,674.50 | 18,81,82,104.17 | 1,86,300 | 1,010.1025 |
| 11:05 | 1,008.60 | 1,006.65 | 1,007.40 | 8,920 | 1,007.5500 | 89,87,346.00 | 19,71,69,450.17 | 1,95,220 | 1,009.9859 |
| 11:10 | 1,007.80 | 1,006.95 | 1,007.35 | 11,630 | 1,007.3667 | 1,17,15,674.33 | 20,88,85,124.50 | 2,06,850 | 1,009.8386 |
| 11:15 | 1,009.65 | 1,005.75 | 1,009.15 | 7,310 | 1,008.1833 | 73,69,820.17 | 21,62,54,944.67 | 2,14,160 | 1,009.7821 |
| 11:20 | 1,010.25 | 1,006.75 | 1,007.95 | 4,860 | 1,008.3167 | 49,00,419.00 | 22,11,55,363.67 | 2,19,020 | 1,009.7496 |
The example prices are made up for this page — they are not real market data. VWAP is a calculation from past prices, not a forecast, a signal or advice to buy or sell. MyAlgoMate provides trading technology, not investment advice.
How to calculate VWAP in Excel
Put the headings in row 1 and the first candle in row 2, oldest at the top. Then type these formulas — each column uses the ones to its left:
- A
Time
A2 downwards: the candle times, oldest at the top.
- B
High
B2 downwards: the high prices, oldest at the top.
- C
Low
C2 downwards: the low prices, oldest at the top.
- D
Close
D2 downwards: the closing prices, oldest at the top.
- E
Volume
E2 downwards: the volumes, oldest at the top.
- F
Typical price
F2
=(B2+C2+D2)/3— then copy it down to the last row. - G
TP x Volume
G2
=F2*E2— then copy it down to the last row. - H
Cum. TP x Volume
H2
=G2— this cell only (the starting value).H3
=H2+G3— then copy it down to the last row. - I
Cum. volume
I2
=E2— this cell only (the starting value).I3
=I2+E3— then copy it down to the last row. - J
VWAP
J2
=H2/I2— then copy it down to the last row.
Row 2 (09:15) starts each running total; for the next day, start the totals again.
Prefer not to type them? The free sheet has every formula filled in for the example prices — replace the prices with yours and extend the rows. It opens in Microsoft Excel (we checked every value against the table above), and you can import it into Google Sheets or LibreOffice.
Download the free VWAP Excel sheet (.xlsx)What VWAP shows
VWAP is the day's average price so far, with each candle counted by its volume. Early in the day it moves with every candle; later, with more volume behind it, each new candle changes it less. Whether price is above or below VWAP is simply a comparison of two numbers — VWAP is a calculation from the day's trades so far, not a forecast or advice.
VWAP calculation — questions, answered.
For every candle of the day, work out the typical price (High + Low + Close) ÷ 3 and multiply it by the candle's volume. VWAP = the running total of those amounts ÷ the running total of volume, both counted from the first candle of the day.
Put high, low, close and volume in columns B to E from row 2. Typical price in F2: =(B2+C2+D2)/3; TP × volume in G2: =F2*E2. Running totals: H2 =G2 and from H3 =H2+G3; I2 =E2 and from I3 =I2+E3. VWAP in J2: =H2/I2. Copy everything down. Start a new block (or reset the totals) for each day.
VWAP answers 'what has the average traded price been today, weighted by volume?', so the totals start at the first candle of the session (09:15 on NSE) and are reset the next morning. A VWAP that starts from a date or candle you pick is called anchored VWAP — same formula, different starting point.
Most charts use the typical price, (High + Low + Close) ÷ 3, as on this page. Some tools let you use the close or (Open + High + Low + Close) ÷ 4 instead; the result is slightly different, so check the setting when you compare.
The average price in a quote is usually worked out from every individual trade (each trade's price × quantity). VWAP from candles uses one typical price per candle, so it is a close approximation, not the exact same number. Different candle sizes (1 minute vs 5 minutes) also give slightly different VWAPs.
Ordinary VWAP is an intraday calculation that resets every session, so on daily candles each day would have just one candle and VWAP would equal that day's typical price. To average across several days, use anchored VWAP from the start date you choose.
More indicator formulas, with Excel sheets
Turn your own rules into automated orders.
Already use VWAP in your own rules? MyAlgoMate's algo trading software places the orders your rules call for at 150+ Indian brokers — and TradeBridge turns your own TradingView or Chartink alerts into live orders. You decide the rules; we provide the technology.