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.
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.
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Year |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2023 | 3.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% |
| 2024 | 0.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% |
| 2025 | 2.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% |
| 2026 | 1.3% | −0.9% | −2.4% | 3.3% | 1.8% | 0.7% | 2.6% | −1.1% | 1.5% | 0.9% | – | – | 7.84% |
Time-weighted vs money-weighted return
The two measures answer different questions.
| Time-weighted return (TWR) | Money-weighted return (XIRR) | Modified Dietz | |
|---|---|---|---|
| Question | How did the investments do? | How did my money do? | Quick estimate of the money-weighted result |
| Cash-flow timing | Removed | Included | Included, by days invested |
| Needs a value at each flow | Yes | No, only start and end values | No, only start and end values |
| Use it to | Compare a fund, manager or strategy with a benchmark or another fund | See your own result, deposit timing included | Approximate monthly returns when daily values are missing |
| In this file | Whole period, annualised, monthly, yearly, chart | Excel XIRR, annual rate and whole period | Whole 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
| Tab | What it does |
|---|---|
| Start here | Instructions, the key formulas, why TWR and XIRR differ, the GIPS note, limits and sources. Example data is marked fictional. |
| Calculator | 200 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. |
| Results | Start 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 results | The same two tabs filled with a fictional portfolio: 52 rows, 46 month ends and five flows. |
How to use it
- 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.
- 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.
- 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.
- 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).
- Open Results. Read TWR, XIRR and Modified Dietz, the gap line, then the monthly table and the charts.
- 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):
| Row | Date | Value before flow | Deposit / withdrawal | Sub-period return | Growth of $10,000 |
|---|---|---|---|---|---|
| 1 | 2023-01-03 | $0.00 | +$10,000.00 | start | $10,000.00 |
| 2 | 2023-01-31 | $10,310.00 | 3.10% | $10,310.00 | |
| 3 | 2023-02-28 | $10,186.28 | −1.20% | $10,186.28 | |
| … | |||||
| 6 | 2023-05-31 | $10,693.15 | 2.20% | $10,693.15 | |
| 7 | 2023-06-15 | $10,821.47 | +$2,000.00 | 1.20% | $10,821.47 |
| 8 | 2023-06-30 | $13,013.79 | 1.50% | $10,983.79 | |
| … | |||||
| 15 | 2024-01-31 | $13,512.70 | 0.60% | $11,404.88 | |
| 16 | 2024-02-12 | $13,566.75 | +$25,000.00 | 0.40% | $11,450.49 |
| 17 | 2024-02-29 | $37,332.61 | −3.20% | $11,084.08 | |
| … | |||||
| 52 | 2026-10-30 | $44,075.51 | 0.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.
| Step | Result |
|---|---|
| Sub-period 1: $13,566.75 / $13,512.70 − 1 | 0.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 results | Value |
|---|---|
| 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 period | 1,396 |
| Time-weighted return, whole period | 35.17% |
| TWR, annualised | 8.20% |
| Modified Dietz, whole period | 31.10% |
| Modified Dietz, annualised | 7.34% |
| Money-weighted return (XIRR), a year | 7.51% |
| Money-weighted return, whole period | 31.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.
- TWR by default. Provision 1.A.35 of GIPS for Firms 2020: "The firm must present time-weighted returns unless certain criteria are met, in which case the firm may present money-weighted returns." The criteria: the firm controls the external cash flows, and the portfolios are closed-end, fixed life, fixed commitment, or hold illiquid investments as a significant part of the strategy. The CFA Institute overview reading puts it as: "Time-weighted returns are required for all portfolios except portfolios meeting certain criteria."
- Link sub-periods. Provision 2.A.24 asks firms to "Calculate sub-period returns at the time of all large cash flows, if daily returns are not calculated" and to "Geometrically link periodic and sub-period returns."
- Value often. Provision 2.A.23: portfolios in composites must be valued "At least monthly" and "On the date of all large cash flows."
- Do not annualise short periods. Provision 2.A.12: "Returns for periods of less than one year must not be annualized." The spreadsheet shows "Under 1 year: not annualised" in that case.
Common mistakes
- Using the value after the flow as the end of a sub-period. The sub-period ends just before the deposit or withdrawal. Type the value before it.
- Treating dividends as deposits. Income paid into the account is part of the return. Only money moved in or out by you is a flow.
- Averaging monthly returns. An arithmetic average of +10% and −10% is 0%, but linked it is −1%. Multiply the growth factors.
- Using GEOMEAN for the total. GEOMEAN of the factors gives an average per sub-period, not the total return. The total is PRODUCT − 1.
- Annualising a few months. A 3% gain in two months annualises to over 19%, which says little. GIPS says not to annualise periods under a year.
- Comparing your XIRR with a fund's published return. Fund returns are time-weighted. Compare TWR with TWR, and use XIRR to see what your timing did.
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
- XIRR spreadsheetMoney-weighted return from dated cash flows.
- CAGR calculatorAnnual growth rate between two values.
- Investment trackerHoldings, cost basis and gains in one file.
- Max drawdown spreadsheetPeak-to-trough losses from a value series.
- ROI calculatorReturn on an investment, before and after costs.
- All templatesFree spreadsheets for trading and personal finance.
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.