How to calculate real return when you keep adding money

Any formula that divides your gain by 'the amount invested' has to answer a question first: which amount, on which day?

· 9 min read

You paid in €6,000 over a year and finished with €6,400. Is that a 6.7% return, or a 12.5% return? Both come out of the same four numbers, and the difference is not rounding.

Every percentage-gain formula divides a gain by an amount invested. As soon as you contribute monthly, that phrase stops having a single meaning — the amount invested was €500 in January and €6,000 in December. Choosing a denominator is choosing what you are measuring.

The worked case

€500 on the first of every month for twelve months. No withdrawals, no trading. The account ends the year at €6,400.

total deposited 6,000 ending value 6,400 gain 400

The obvious calculation:

400 ÷ 6,000 = 6.67%

The problem is that €6,000 was never invested for a year. Your December €500 was invested for one month. Your January €500 was invested for twelve. Average the twelve contributions by how long each one was actually in the market and you get 6.5 months, not 12.

Solve instead for the annual rate that reconciles all twelve dated deposits with the ending value, and the answer is:

annualised rate = 12.53%

Almost double. Not because anything was calculated incorrectly the first time, but because 6.67% is the growth of a sum that sat there all year, and no such sum existed.

Note the direction. A mid-year deposit before a fall makes the simple number look worse than the holdings did; steady contributions into a rising market make it look better. The simple return is not biased one way — it is answering a different question, and the gap moves with your deposit calendar.

Method one: money-weighted (XIRR)

This is the one you can do yourself, in a spreadsheet, in about two minutes. It gives you the single annual rate your money actually earned, with your contribution timing baked in.

Building it

  1. Column A: the date of every cash flow.
  2. Column B: the amount. Deposits are negative — money leaving you. Withdrawals are positive.
  3. Final row: today’s date, and your current total value as a positive number.
  4. Anywhere: =XIRR(B:B, A:A)

For the example above:

2025-01-01 −500 2025-02-01 −500 … … 2025-12-01 −500 2025-12-31 6,400 =XIRR(B1:B13, A1:A13) → 0.1253

The sign convention is the only place this goes wrong. If every number is positive, there is nothing to solve and the function errors. Deposits leave your pocket, so they are negative.

What it will and will not tell you

  • It is annualised, so a six-month period returns a yearly rate, not the growth over those six months.
  • It needs one sign change to converge. A portfolio that has only ever received deposits works because the closing value is the positive.
  • It includes your timing. Two people holding identical portfolios who contributed on different days get different XIRRs, and both are correct.

Method two: time-weighted

Time-weighted return removes your contribution timing entirely, which is what makes it the only figure you can hold up against an index.

The method is to break the period at every cash flow, measure the growth within each segment, and multiply:

segment return = (value before the cash flow) ÷ (value at segment start) TWR = (1 + r₁) × (1 + r₂) × … × (1 + rₙ) − 1

Because each segment ends immediately before money moves, the deposit itself never sits inside a measured period. It ends one and starts the next.

The mathematics is easy. The data is not. For twelve monthly contributions you need twelve portfolio valuations — the total value on the day before each deposit — and that means repricing every holding you had at the price it traded at on each of those dates. Almost nobody has that recorded, which is why time-weighted return is normally computed by software and why your broker does not show it.

Choosing between them

The questionUse
How much have I actually made?Money-weighted (XIRR)
Did my picks keep up with the S&P 500?Time-weighted
Was last year good compared with the year before?Time-weighted
What is my portfolio worth versus what I paid in?Money-weighted
Should I compare myself with a fund's published return?Time-weighted — that is what funds publish

The rule underneath the table: if the comparison is with something that has no deposits — an index, a fund, your own prior year — use time-weighted. If the question is about your money, use money-weighted.

Three things that quietly break the number

  • Dividends. If they are reinvested inside the account they are not cash flows and must not appear in the XIRR list — they are already in the ending value. If they were withdrawn, they are positive cash flows on the date received. Counting them twice is the most common error here.
  • Foreign currency. Run the calculation in one currency throughout, converting each flow at its own date’s rate. Mixing a euro deposit with a dollar valuation produces a number that is part return and part exchange rate, with no way to separate them afterwards.
  • Transfers between accounts. Moving €5,000 from one broker to another is not a deposit and not a withdrawal. If you track the two accounts separately it looks like both, and both figures end up wrong.

The short version

The number your broker shows divides your gain by everything you have ever paid in, as though it all arrived on day one. For a single lump sum that is exact. For monthly contributions it is a rough figure whose error is the size of your deposit schedule — and in the example above, that error was larger than the return itself.

HaboFi reconstructs both from a Trading 212 CSV export — it has the dated transactions, so it can reprice your holdings on every day you moved money and plot the time-weighted line against the S&P 500.

Try HaboFi free

Common questions

Why does my return look wrong when I invest monthly?

Because a simple gain-over-deposits calculation treats a contribution made last month as though it had been invested for the whole period. Each new deposit enlarges the denominator immediately while having had almost no time to produce a gain, so the percentage falls even when nothing about your holdings has changed.

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

Money-weighted return, also called IRR, finds the single annual rate that makes all your cash flows balance against your ending value, so the timing and size of deposits affect the result. Time-weighted return breaks the period at every cash flow and links the segments, so deposit timing cancels out. Money-weighted describes your experience; time-weighted describes the holdings.

How do I compare my portfolio with the S&P 500?

Use time-weighted return, because an index has no deposits. Comparing a money-weighted return with an index return compares two different measurements, and the gap between them will mostly reflect when you happened to add money rather than any difference in performance.

Do I need a spreadsheet to calculate this?

For money-weighted return a spreadsheet helps, because XIRR solves it in one function from a list of dated cash flows. Time-weighted return needs a portfolio valuation on every day you moved money, which is the part most people do not have recorded and the reason it is normally left to software.

This article is general information about how these calculations work. It is not financial, investment or tax advice, and nothing in it is a recommendation to buy or sell any security. See our terms.

Read next

How to export your portfolio from Trading 212Trading 212 exports your whole history as a CSV. Two settings on that screen decide whether the file is usable, and both default to leaving things out.How to export your portfolio from DEGIRO, XTB, IBKR and RevolutEvery broker exports a transaction history and none agree on the column names. What to download, and the five details that decide whether the numbers come out right.