How do you calculate portfolio return when you keep adding money?

Last updated October 2026

Short answer

Take your deposits out before you measure anything: gain equals ending value minus starting value minus the money you added (plus anything you withdrew). Then choose a method. Time-weighted return chains together the returns between each deposit, so it shows how the investments did no matter when you added money. Money-weighted return finds the one rate that grows your actual deposits into your ending balance, so it shows what your dollars earned, timing included. In the example below the same account returns 8.0% time-weighted and minus 1.3% money-weighted, and both are correct.

The mistake almost everyone makes first is dividing the ending balance by the starting one. If you put $10,000 into an account worth $10,000, that math reports a near-100% return on money that mostly just moved from your bank. Everything below is about avoiding that.

Why the simple percentage breaks

A simple return, ending value divided by starting value minus one, assumes nothing went in or out. The moment you contribute from a paycheck, set up a recurring buy, or roll over an old 401(k), that assumption fails and the number counts your own money as profit.

Withdrawals cause the opposite error. Take $5,000 out of a $50,000 account in a flat market and the simple return shows a 10% loss, though the holdings did not lose a cent.

The fix has two parts. First separate dollars added from dollars earned. Then decide whether you want to judge the investments or judge the result you personally got, because those are two different questions with two different formulas.

Step one: the dollar gain

Before any percentage, work out the gain in dollars. It needs no assumptions:

Gain = Ending value minus Starting value minus Deposits plus Withdrawals

An account that started the year at $10,000, received $10,000 of deposits and ended at $19,800 gained minus $200. It lost money, even though the balance nearly doubled. Dividends and interest that stay in the account count as gain, since they came from the investments and not from you. Fees paid out of the account reduce the gain.

This one number answers the question most people are really asking ("did I make money?"), and it is worth checking before any return figure, because a percentage built on a wrong dollar gain is wrong in every method.

What is time-weighted return?

Time-weighted return (TWR) splits the period at every deposit or withdrawal, measures the return of each piece on its own, and multiplies them together. The CFA Institute's Global Investment Performance Standards (GIPS, 2020 edition for firms) define it as a method that "reflects the change in value and negates the effects of external cash flows."

TWR = (1 + r1) x (1 + r2) x ... x (1 + rn) minus 1

Each sub-period return is measured from the value right after one flow to the value right before the next. That is why TWR needs the account's value on every day money moves, and why it is impossible to compute exactly from a year-end statement alone.

Because deposits drop out of the math, TWR is the fair figure for comparing a portfolio against the S&P 500 or a fund. It is the default for professional managers too: provision 1.A.35 of the 2020 GIPS standards says a firm "must present time-weighted returns" unless narrow criteria are met. A manager does not decide when clients add money, so it would be unfair to credit or blame them for it.

What is money-weighted return?

Money-weighted return (MWR) is the single annual rate that, applied to every deposit from the day it arrived, produces your ending balance. It is the same calculation as an internal rate of return. GIPS defines it as a return that "reflects the change in value and the timing and size of external cash flows."

Big deposits made just before a strong stretch lift it. Big deposits made just before a drop sink it. That makes it the honest answer to "what did my money actually earn," and an unfair way to grade the investments themselves.

It is also what many investors see on their statements. Fidelity describes its Personal Rate of Return as a money-weighted calculation that accounts for "the size and timing of your additions and/or withdrawals," and contrasts it with an investment (time-weighted) return that "seeks to eliminate or minimize" that effect. In Canada it is required: section 14.19 of National Instrument 31-103 requires a registered firm's annual investment performance report to show the account's annualized total percentage return "using a money-weighted rate of return calculation method generally accepted in the securities industry," net of charges, over 1, 3, 5 and 10 years and since the account opened (with carve-outs for accounts opened before July 2015).

A shortcut called Modified Dietz approximates it with a calculator. Divide the dollar gain by the starting value plus each deposit weighted by the fraction of the period it was invested:

Modified Dietz = Gain / (Starting value + sum of each flow x fraction of period remaining)

A worked example with real numbers

Two investors each start the year with $10,000 in the same fund and each add $10,000 on July 1. The fund has one good half and one bad half. The only difference is the order.

Investor A: good half first. The fund rises 20% from January to June, so $10,000 becomes $12,000. The $10,000 deposit takes it to $22,000. The fund then falls 10%, ending at $19,800.

  • Naive return: $19,800 / $10,000 minus 1 = 98%. Wrong, because half the money was a deposit.
  • Dollar gain: $19,800 minus $10,000 minus $10,000 = minus $200.
  • Time-weighted: 1.20 x 0.90 minus 1 = 8.0%.
  • Modified Dietz: minus $200 / ($10,000 + $10,000 x 0.5) = minus $200 / $15,000 = minus 1.33%.
  • Money-weighted (exact): solve $10,000 x (1 + r) + $10,000 x (1 + r)^0.5 = $19,800. Setting x = (1 + r)^0.5 gives x squared plus x minus 1.98 = 0, so x = 0.9933 and r = minus 1.33%.

Investor B: bad half first. The fund falls 10% to $9,000, the deposit takes it to $19,000, and a 20% rise ends the year at $22,800.

  • Dollar gain: $22,800 minus $20,000 = $2,800.
  • Time-weighted: 0.90 x 1.20 minus 1 = 8.0%.
  • Modified Dietz: $2,800 / $15,000 = 18.67%.
  • Money-weighted (exact): x squared plus x minus 2.28 = 0, so x = 1.0906 and r = 18.94%.
MeasureInvestor AInvestor BWhat it tells you
Naive (end / start)98.0%128.0%Nothing useful; counts deposits as profit
Dollar gain-$200$2,800Whether you made money
Time-weighted8.0%8.0%How the fund did
Modified Dietz-1.33%18.67%Quick estimate of your own return
Money-weighted (IRR)-1.33%18.94%What your dollars earned

Same fund, same 8.0% time-weighted return, results 20 points apart. Investor A put more money in right before the drop, so most of their dollars only ever saw the loss. Investor B added at the low. Neither number is the "real" one. Time-weighted grades the fund, money-weighted grades the experience, and the gap between them is the effect of deposit timing.

Try it in Walnut

Walnut keeps a daily record of each connected account's value and tells you how much of a change was money you paid in and how much the holdings earned.

How to calculate it yourself

1. List every flow with its date

Pull deposits, withdrawals and transfers in or out from your broker's activity history. Dividends reinvested inside the account are not flows. A transfer of shares from another broker is a flow at its market value on the day it arrived.

2. Get the dollar gain

Ending value minus starting value minus net deposits. If this is negative, no percentage method will make the year a gain.

3. For your own return, use XIRR

In a spreadsheet, enter the starting value as a negative number on the first date, each deposit as a negative number on its date, each withdrawal as positive, and the ending value as a positive number on the last date. XIRR returns the annualized money-weighted rate. For a period shorter than a year it annualizes, which can exaggerate; GIPS, for its part, says returns for periods under a year must not be annualized.

4. To compare with an index, use time-weighted

You need the account value just before each deposit. Divide each value by the value after the previous flow, then multiply the results. Many brokers show this figure directly, labelled investment return or time-weighted return, and it is the one to set beside the S&P 500.

How Walnut measures it

Walnut is an AI investing app that connects to your brokerage accounts, including Public, Robinhood, Fidelity, Schwab, Vanguard and others, and reads what each account holds. The connection supplies each holding's symbol, quantity and market value. For most brokers it does not supply what you paid, so Walnut's returns are price returns rather than profit from your purchase price. It uses two measures instead, and each one avoids the deposit problem in its own way.

Your holdings against the S&P 500. Walnut takes the holdings in your portfolio today, weights them by their current market value, and runs them back over up to a year of daily closing prices, next to SPY over the same days. Your balance is never in that calculation, so a deposit cannot inflate it. It answers "how have the things I own done," close in spirit to a time-weighted return for your current mix. It does not answer what your account earned while its contents changed, and because it uses closing prices, dividends are not added back. The window is labelled by the history it actually covers, which can be shorter than a year when a holding is newly listed.

Money added versus gains, per account. This is the answer to the question on the account analysis page. Walnut keeps one total value per account for each day the account syncs, starting from the first day it sees the account. Over the stretch it has recorded, it works out what those holdings did in the market and compares:

Expected = Opening value x (1 + holdings' price return over the same dates). Money added = Closing value minus Expected.

A withdrawal comes out as a negative number. Anything smaller than 0.5% of the opening balance is reported as zero, because a gap that small is more likely a dividend, a stale price or rounding than a real deposit. The account page then says it in a sentence, for example that an account is up $1,200 but $1,000 of that is money you paid in and the holdings gained $200.

Two limits are stated plainly on the page. It needs at least two days of recorded history, so on the day you connect it shows nothing rather than guessing. And it starts the day Walnut first saw the account; it does not reconstruct deposits from before then. The price return uses the holdings in the account now, so if you replaced most of an account's holdings mid-window the split is a rougher estimate.

Which number to look at, and when

Each figure has a job. The dollar gain says whether the year made you money at all. The time-weighted return says whether your holdings beat or trailed a benchmark, which is the question behind most decisions about what to keep. The money-weighted return says how your own contributions fared once timing is counted, which matters most for someone adding a fixed amount every month.

Someone investing on a schedule will usually see the two returns diverge in volatile years and converge in calm ones. A large gap is not a sign that anything is broken. It is the arithmetic record of when the money arrived relative to the market's moves, and over long periods of steady contributions the two tend to sit closer together than in a single year.

Common mistakes

Comparing a money-weighted return with an index. The S&P 500's published return is effectively time-weighted. Setting your personal, timing-affected return beside it mixes two questions, and the gap you see may be your deposit timing rather than your stock picks.

Mismatched windows. Using a one-year price return against a 30-day balance change invents deposits or withdrawals that never happened. The return and the balance change must cover exactly the same dates.

Treating reinvested dividends as deposits. They are investment return. Counting them as money you added understates performance.

Annualizing a few months. A 6% gain over three months does not mean 26% a year. Short-period returns are best quoted as they are.

Ignoring transfers of shares. Moving $30,000 of stock in from another broker raises the balance with no cash deposit on the ledger. It is still a flow, at its market value on the transfer date. For what long-run market returns have looked like as a reference point, see the average stock market return.

Sources

The time-weighted and money-weighted definitions, provision 1.A.35 and the rule against annualizing periods under a year are from the CFA Institute's Global Investment Performance Standards for Firms, 2020 edition. The Canadian requirement is section 14.19 of National Instrument 31-103 (Alberta Securities Commission consolidation, effective January 2026). Fidelity's description of its personal and investment returns is from its performance reporting glossary. The worked example uses hypothetical numbers. Walnut is not a registered investment adviser, and this guide is educational rather than personalized financial advice.

FAQ

How do you calculate portfolio return when you keep adding money?

+

Take the deposits out first. Gain equals ending value minus starting value minus net deposits. Then pick a method: time-weighted return chains the returns between each deposit, and money-weighted return finds the single rate that turns your deposits into your ending balance.

Which is better, time-weighted or money-weighted return?

+

They answer different questions. Time-weighted return measures how the investments did and ignores when you added money, so it is the fair way to compare against an index or a fund. Money-weighted return measures what your own dollars earned, timing included.

Why is my broker's return different from my own math?

+

Usually because the broker shows a money-weighted personal return and you computed something else, or because a deposit landed near the start or end of the period. Fidelity, for example, labels its Personal Rate of Return as money-weighted and describes it as an internal rate of return.

Can I use the XIRR function in a spreadsheet?

+

Yes. List every deposit as a negative number with its date, withdrawals as positive, and the ending balance as a final positive entry on the last date. XIRR returns the annualized money-weighted return for those flows.

Is the Modified Dietz method accurate enough?

+

For a single year with a few deposits it usually lands within a fraction of a percentage point of the exact money-weighted figure, and it needs only a calculator. It drifts further when a large deposit arrives during a sharp market move.

How does Walnut separate money I added from gains?

+

It keeps one total value per connected account for each day the account syncs, starting from the first day it sees the account, works out what the holdings did in the market over the same dates, and treats the rest of the change as money paid in or taken out. It needs at least two days of history.

Related guides