Home › Templates › Time-weighted return spreadsheet

Time-Weighted Return Spreadsheet: TWR vs XIRR in Excel

A free time-weighted return spreadsheet for Excel and Google Sheets. Type the date, the portfolio value before each deposit or withdrawal, and the flow. It links the sub-period returns into a time-weighted return (TWR), annualises it, builds a monthly and calendar-year table and a growth-of-$10,000 chart, and puts the money-weighted return (XIRR) and Modified Dietz next to it, with one line that explains the gap.

Download Excel template (.xlsx) 104 KB · up to 200 dated rows · 20-year monthly table · no macros · Excel 2016+ and Google Sheets · v1.0, 13 Nov 2026

Use it in Google Sheets: choose File → Import → Upload in Sheets and pick the .xlsx, or upload it to Google Drive and open it with Google Sheets. No sign-up, no email gate, no add-in.

Preview: the Example results tab. A fictional portfolio from 3 Jan 2023 to 30 Oct 2026 with five deposits and withdrawals. All values are made up.
8.20%time-weighted return a year
7.51%money-weighted return (XIRR) a year
7.34%Modified Dietz, annualised
35.17%TWR for the whole period
−0.69 ptsgap: timing of flows cost a year
YearJanFebMarAprMayJunJulAugSepOctNovDecYear
20233.1%−1.2%1.8%0.9%2.2%2.7%1.5%−1.9%−3.4%−2.1%5.8%3.6%13.37%
20240.6%−2.8%−4.1%−5.2%1.2%2.4%1.1%1.9%1.7%−0.8%4.1%−1.6%−1.93%
20252.5%−1.3%−4.7%−2.8%5.2%3.8%2.1%1.4%2.9%1.7%0.6%1.1%12.74%
20261.3%−0.9%−2.4%3.3%1.8%0.7%2.6%−1.1%1.5%0.9%––7.84%
Fictional example: growth of $10,000 at the time-weighted return, with deposits (+) and withdrawals (−)$9,000$10,000$11,000$12,000$13,000$14,0002023202420252026+$2,000+$25,000−$3,000+$5,000−$4,000$13,516.94The line ignores how much money was in the account: it moves only with returns,so deposits and withdrawals do not make it jump.

Time-weighted vs money-weighted return

The two measures answer different questions.

Time-weighted return (TWR)Money-weighted return (XIRR)Modified Dietz
QuestionHow did the investments do?How did my money do?Quick estimate of the money-weighted result
Cash-flow timingRemovedIncludedIncluded, by days invested
Needs a value at each flowYesNo, only start and end valuesNo, only start and end values
Use it toCompare a fund, manager or strategy with a benchmark or another fundSee your own result, deposit timing includedApproximate monthly returns when daily values are missing
In this fileWhole period, annualised, monthly, yearly, chartExcel XIRR, annual rate and whole periodWhole period and annualised

The GIPS standards, published by CFA Institute, define time-weighted return as "a method of calculating period-by-period returns that reflects the change in value and negates the effects of external cash flows" and money-weighted return as "the return for a period that reflects the change in value and the timing and size of external cash flows" (GIPS for Firms 2020, glossary).

Why the time-weighted return is not your return

TWR gives every sub-period the same weight, whether $1,000 or $100,000 was in the account. Your own result depends on how much money was invested in each period. So two people in the same fund get the same TWR but a different XIRR if they added money at different times.

In the example, the account held between $10,000 and $13,500 in 2023, a strong year (TWR 13.37%). Then a $25,000 deposit on 12 Feb 2024 nearly tripled it just before three weak months. The investments earned 8.20% a year (TWR), but the money earned 7.51% a year (XIRR): the timing of the flows cost 0.69 percentage points a year. The Results tab prints that reading in words:

Money-weighted is LOWER than time-weighted: more of your money was invested in the weaker periods, so the timing of your deposits and withdrawals cost 0.69 percentage points a year.Example results, row 24 (a formula, not typed text)

Neither number is wrong. Use TWR to judge the investments or compare with a benchmark. Use XIRR to judge your own outcome, timing included. If they differ a lot, look at when you added or took out money.

What's inside the spreadsheet

TabWhat it does
Start hereInstructions, the key formulas, why TWR and XIRR differ, the GIPS note, limits and sources. Example data is marked fictional.
Calculator200 input rows: date, portfolio value before the flow, deposit (+) or withdrawal (−), note. Formula columns: value after the flow, sub-period return, growth factor, growth of $10,000, the XIRR cash flow, Modified Dietz weight, and a row check that names the first problem row.
ResultsStart and end values, deposits, withdrawals, gain in dollars, TWR (whole period and annualised), Modified Dietz, XIRR, the gap and the "why" line, best and worst month, a monthly and calendar-year TWR table for up to 20 years, a growth-of-$10,000 chart and a yearly TWR bar chart.
Example, Example resultsThe same two tabs filled with a fictional portfolio: 52 rows, 46 month ends and five flows.

How to use it

  1. On the Calculator tab, row 6: type the start date, the value before any flow (0 for a new account) and the opening deposit. For an existing account, type its value on the start date and leave the flow blank.
  2. Add one row for every deposit or withdrawal, in date order. Column C is the value just before the flow (the previous close is fine); column D is the flow, deposit positive and withdrawal negative.
  3. Add a row with no flow at each month end, with the value on that date. Monthly returns are exact only when every month end has a value.
  4. Make the last row the final valuation. Cell E3 must say OK; if not, it names the first row to fix (missing value, dates out of order, a withdrawal larger than the account).
  5. Open Results. Read TWR, XIRR and Modified Dietz, the gap line, then the monthly table and the charts.
  6. Dividends and interest paid into the account are not flows: leave them in the value. Only money you add or take out goes in column D.

Here is how the Example tab looks (selected rows; the flow rows are highlighted):

RowDateValue before flowDeposit / withdrawalSub-period returnGrowth of $10,000
12023-01-03$0.00+$10,000.00start$10,000.00
22023-01-31$10,310.003.10%$10,310.00
32023-02-28$10,186.28−1.20%$10,186.28
…
62023-05-31$10,693.152.20%$10,693.15
72023-06-15$10,821.47+$2,000.001.20%$10,821.47
82023-06-30$13,013.791.50%$10,983.79
…
152024-01-31$13,512.700.60%$11,404.88
162024-02-12$13,566.75+$25,000.000.40%$11,450.49
172024-02-29$37,332.61−3.20%$11,084.08
…
522026-10-30$44,075.510.90%$13,516.94

The formulas

Sub-period return (Calculator row 7; F6 is the previous row's value after its flow, C7 this row's value before its flow). A previous value of 0, after a full withdrawal, gives no return for that gap:

=IF(OR(B7="",NOT(ISNUMBER(F6))),"",IF(F6<=0,"",N(C7)/F6-1))

Growth factor and the running growth of $10,000. Multiplying the factors is the geometric linking:

=IF(B7="","",IF(ISNUMBER(H7),1+H7,1))

=IF(B7="","",N(J6)*I7)

Time-weighted return for the whole period (Results B17; C3 on the data tab counts the rows used) and annualised (B18):

=IF($B$5="OK",INDEX('Calculator'!$J$6:$J$205,'Calculator'!$C$3)/10000-1,"")

=IF($B$5="OK",IF($B$8>=365,(1+$B$17)^(365/$B$8)-1,"Under 1 year: not annualised"),"")

In maths form: TWR = (1 + R1) × (1 + R2) × … × (1 + Rn) − 1, which is the "link" formula in the GIPS glossary: "Period return = [(1 + R1) × (1 + R2) … (1 + Rn)] – 1".

Modified Dietz. Each flow in between is weighted by the share of the period left after it (L = (total days − days from start) / total days), then:

=IF(OR(B7="",A7=1,A7>=$C$3,$H$3<=0),"",($H$3-G7)/$H$3)

=IF($B$5="OK",IF($B$10+SUM('Calculator'!$M$6:$M$205)<=0,"No result",$B$15/($B$10+SUM('Calculator'!$M$6:$M$205))),"")

That is (end value − start value − net flows) / (start value + Σ flow × weight). The flow on the last row gets no weight; it is treated as after the end valuation.

Money-weighted return with XIRR. The cash-flow column takes your side: the starting value and deposits are negative, withdrawals positive, and the last row holds the ending value. INDEX trims the ranges to the rows used, because XIRR needs equal-length ranges without blanks:

=IF(B7="","",IF(A7=$C$3,N(C7),-N(D7)))

=IF($B$5="OK",IFERROR(XIRR('Calculator'!$K$6:INDEX('Calculator'!$K$6:$K$205,'Calculator'!$C$3),'Calculator'!$B$6:INDEX('Calculator'!$B$6:$B$205,'Calculator'!$C$3)),"No result"),"")

Microsoft's XIRR documentation says it "returns the internal rate of return for a schedule of cash flows that is not necessarily periodic", that "all succeeding payments are discounted based on a 365-day year", and that it needs "at least one positive cash flow and one negative cash flow". The IFERROR shows "No result" instead of an error.

Monthly table cell (January of the first year shown): the growth index at the month end divided by the index at the previous month end, both found with INDEX and an approximate MATCH on the sorted dates. No XLOOKUP, LET or dynamic arrays:

=IF($A37="","",IF(OR((DATE($A37,1,1)-1)>=$B$7,EOMONTH(DATE($A37,1,1),0)<=$B$6),"",INDEX('Calculator'!$J$6:$J$205,MATCH(MIN(EOMONTH(DATE($A37,1,1),0),$B$7),'Calculator'!$B$6:INDEX('Calculator'!$B$6:$B$205,'Calculator'!$C$3),1))/INDEX('Calculator'!$J$6:$J$205,MATCH(MAX((DATE($A37,1,1)-1),$B$6),'Calculator'!$B$6:INDEX('Calculator'!$B$6:$B$205,'Calculator'!$C$3),1))-1))

Worked example: one month with a deposit

February 2024 in the fictional example. On 31 Jan the account is worth $13,512.70. On 12 Feb it is worth $13,566.75 just before a $25,000 deposit, so $38,566.75 after it. On 29 Feb it is worth $37,332.61.

StepResult
Sub-period 1: $13,566.75 / $13,512.70 − 10.400%
Sub-period 2: $37,332.61 / ($13,566.75 + $25,000) − 1−3.200%
February TWR: (1 + 0.00400) × (1 − 0.03200) − 1−2.813%
Wrong shortcut: ($37,332.61 − $13,512.70 − $25,000) / $13,512.70−8.733%

The shortcut divides a loss earned on about $38,600 by the $13,500 that was there at the start of the month, so it overstates the fall more than threefold. Splitting the month at the deposit fixes that. The monthly table shows −2.81% for Feb 2024.

The whole example: deposits and withdrawals of +$2,000 on 15 Jun 2023, +$25,000 on 12 Feb 2024, −$3,000 on 20 Aug 2024, +$5,000 on 8 Apr 2025, −$4,000 on 16 Mar 2026.

Line on Example resultsValue
Starting value (3 Jan 2023, after the opening deposit)$10,000
Deposits in between$32,000
Withdrawals in between$7,000
Ending value (30 Oct 2026)$44,075.51
Investment gain$9,075.51
Days in the period1,396
Time-weighted return, whole period35.17%
TWR, annualised8.20%
Modified Dietz, whole period31.10%
Modified Dietz, annualised7.34%
Money-weighted return (XIRR), a year7.51%
Money-weighted return, whole period31.92%
Gap: XIRR minus annualised TWR−0.69 percentage points

The calendar-year TWRs are 13.37% (2023, from 3 Jan), −1.93% (2024), 12.74% (2025) and 7.84% (2026 to 30 Oct). Linked, they give the whole-period TWR of 35.17%.

What the GIPS standards say

The Global Investment Performance Standards (GIPS) are published by CFA Institute. CFA Institute describes them as "voluntary, ethical standards for calculating and presenting investment performance based on the principles of fair representation and full disclosure." They apply to investment firms that claim compliance, not to private investors, but they set out the method this spreadsheet follows.

Common mistakes

Limits

The TWR is only as exact as your valuations. A flow without a value on its date blends two sub-periods, and a month without a month-end value is merged into the next one. The file has no fees, taxes, currencies or benchmark; returns are as reported by your values. It holds up to 200 rows and 20 calendar years in the table. Modified Dietz is computed for the whole period only, and on long periods with large flows it can drift from XIRR, as in the example.

For a money-weighted view only, with many dated cash flows and no valuations in between, the XIRR spreadsheet is simpler.

FAQ

What is time-weighted return?

Time-weighted return (TWR) measures how a portfolio's investments performed while removing the effect of deposits and withdrawals. The period is split at each cash flow, a return is calculated for each sub-period, and the sub-period returns are linked: (1 + R1) × (1 + R2) × … × (1 + Rn) − 1. The GIPS standards define it as a method that "reflects the change in value and negates the effects of external cash flows."

How do you calculate time-weighted return in Excel?

List each date with a cash flow, the portfolio value just before the flow and the flow. Sub-period return = value before this flow / (previous value + previous flow) − 1. Put 1 + return in a helper column and multiply the factors with PRODUCT, or keep a running product; TWR = product − 1. Annualise with (1 + TWR)^(365/days) − 1 when the period is at least a year. The template does all of this for up to 200 rows.

What is the difference between time-weighted and money-weighted return?

Time-weighted return gives each sub-period equal weight, so it reflects the investments, not the timing of your deposits. Money-weighted return (XIRR or IRR) weights each period by the money invested, so it reflects your own result, timing included. The GIPS standards describe money-weighted return as a return that "reflects the change in value and the timing and size of external cash flows."

Why is my time-weighted return different from my XIRR?

Because your deposits and withdrawals did not arrive evenly. If more money was in the account during strong periods, XIRR is higher than TWR; if more was in during weak periods, it is lower. In the fictional example a $25,000 deposit just before a weak spring 2024 pulls XIRR to 7.51% a year against a TWR of 8.20% a year.

Is Modified Dietz a time-weighted return?

Not on its own. Modified Dietz estimates the return for one period by weighting each flow by the share of the period it was invested, so for a single period it is closer to a money-weighted return. Calculated for short periods (such as months) and then linked, it approximates a time-weighted return. GIPS allows that kind of daily-weighted adjustment for flows that are not large (provision 2.A.24).

Do the GIPS standards require time-weighted returns?

For firms that claim compliance, yes, with exceptions. GIPS for Firms 2020 provision 1.A.35: "The firm must present time-weighted returns unless certain criteria are met, in which case the firm may present money-weighted returns." The criteria are control over external cash flows plus a closed-end, fixed-life or fixed-commitment structure, or illiquid investments as a significant part of the strategy. CFA Institute calls the GIPS standards "voluntary, ethical standards."

Related tools and templates

Educational template only, not investment or tax advice. GIPS quotations are from CFA Institute (GIPS for Firms 2020, the CFA Institute GIPS overview reading and the GIPS standards page) and XIRR details from Microsoft's documentation, all retrieved 13 Nov 2026. The example portfolio and its returns are fictional.