MyAlgoMate
// INDICATOR FORMULA

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:

Download the free VWAP Excel sheet (.xlsx)

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

  1. Work out the typical price of each candle. 09:15: (1,013.50 + 1,010.40 + 1,012.80) ÷ 3 = 1,012.23.
  2. 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.
  3. 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.
  4. Divide. VWAP at 09:20 = 2,90,22,329.67 ÷ 28,670 = 1,012.29.
  5. 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.

One row per candle, oldest first. Paste straight from Excel or your broker's download; a date or time column becomes the row label. Filled with our example prices.

Latest values

VWAP: 1,009.7496
VWAP calculated from the example prices
TimeHighLowCloseVolumeTypical priceTP × VolumeCum. TP × VolumeCum. volumeVWAP
09:151,013.501,010.401,012.8016,6701,012.23331,68,73,929.671,68,73,929.6716,6701,012.2333
09:201,013.651,011.251,012.2012,0001,012.36671,21,48,400.002,90,22,329.6728,6701,012.2891
09:251,012.601,011.151,011.954,7601,011.900048,16,644.003,38,38,973.6733,4301,012.2337
09:301,012.301,011.301,011.309,5001,011.633396,10,516.674,34,49,490.3342,9301,012.1009
09:351,011.901,010.401,010.906,9901,011.066770,67,356.005,05,16,846.3349,9201,011.9561
09:401,011.801,007.751,008.5010,4301,009.35001,05,27,520.506,10,44,366.8360,3501,011.5057
09:451,008.601,008.401,008.504,3901,008.500044,27,315.006,54,71,681.8364,7401,011.3019
09:501,010.051,008.251,008.804,3401,009.033343,79,204.676,98,50,886.5069,0801,011.1593
09:551,009.701,008.701,008.907,5601,009.100076,28,796.007,74,79,682.5076,6401,010.9562
10:001,011.151,008.251,010.357,4801,009.916775,54,176.678,50,33,859.1784,1201,010.8638
10:051,012.401,009.901,011.4010,5401,011.23331,06,58,399.339,56,92,258.5094,6601,010.9049
10:101,012.251,009.251,010.355,3401,010.616753,96,693.0010,10,88,951.501,00,0001,010.8895
10:151,012.801,009.001,009.7510,4201,010.51671,05,29,583.6711,16,18,535.171,10,4201,010.8543
10:201,011.651,009.501,010.957,8401,010.700079,23,888.0011,95,42,423.171,18,2601,010.8441
10:251,012.401,009.001,009.8011,8001,010.40001,19,22,720.0013,14,65,143.171,30,0601,010.8038
10:301,010.401,009.501,010.355,1001,010.083351,51,425.0013,66,16,568.171,35,1601,010.7766
10:351,010.751,009.351,010.055,3601,010.050054,13,868.0014,20,30,436.171,40,5201,010.7489
10:401,010.151,005.301,007.306,5501,007.583365,99,670.8314,86,30,107.001,47,0701,010.6079
10:451,007.751,005.601,006.409,4801,006.583395,42,410.0015,81,72,517.001,56,5501,010.3642
10:501,010.201,006.151,009.707,5601,008.683376,25,646.0016,57,98,163.001,64,1101,010.2868
10:551,009.701,008.551,008.5511,0001,008.93331,10,98,266.6717,68,96,429.671,75,1101,010.2018
11:001,009.101,008.151,008.4011,1901,008.55001,12,85,674.5018,81,82,104.171,86,3001,010.1025
11:051,008.601,006.651,007.408,9201,007.550089,87,346.0019,71,69,450.171,95,2201,009.9859
11:101,007.801,006.951,007.3511,6301,007.36671,17,15,674.3320,88,85,124.502,06,8501,009.8386
11:151,009.651,005.751,009.157,3101,008.183373,69,820.1721,62,54,944.672,14,1601,009.7821
11:201,010.251,006.751,007.954,8601,008.316749,00,419.0022,11,55,363.672,19,0201,009.7496
Everything is worked out in your browser. Nothing you paste is stored or sent.

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:

  1. A

    Time

    A2 downwards: the candle times, oldest at the top.

  2. B

    High

    B2 downwards: the high prices, oldest at the top.

  3. C

    Low

    C2 downwards: the low prices, oldest at the top.

  4. D

    Close

    D2 downwards: the closing prices, oldest at the top.

  5. E

    Volume

    E2 downwards: the volumes, oldest at the top.

  6. F

    Typical price

    F2 =(B2+C2+D2)/3 — then copy it down to the last row.

  7. G

    TP x Volume

    G2 =F2*E2 — then copy it down to the last row.

  8. H

    Cum. TP x Volume

    H2 =G2 — this cell only (the starting value).

    H3 =H2+G3 — then copy it down to the last row.

  9. I

    Cum. volume

    I2 =E2 — this cell only (the starting value).

    I3 =I2+E3 — then copy it down to the last row.

  10. 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.

// FAQ

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.

Share this page