Sonar
DemoAppsDevelopersPricing
Get started
Sonar
  • Demo
  • Apps
  • Developers
  • Pricing
Sonar

Intelligence on what you own.

  • Privacy
  • Terms
  • Support

© 2026 LunarCrush, Inc. All rights reserved.

Product

  • Pricing
  • Demo
  • Apps
  • Blog
  • Security

Resources

  • Guides
  • Compare trackers
  • Integrations

Developers

  • API
  • MCP
  • CLI

For information only. Nothing here is investment, tax or legal advice, or a recommendation to buy or sell any asset. Data may be delayed or incomplete; we flag it when we know.

Charts by TradingView Lightweight Charts™, © TradingView, Inc.

Language
Theme
DemoAppsDevelopersPricing
  • Demo
  • Apps
  • Developers
  • Pricing
  1. Home
  2. Guides
  3. How to calculate your portfolio return (TWR vs MWR)

How to calculate your portfolio return (TWR vs MWR)

Simple, time-weighted and money-weighted returns explained with worked examples, so deposits and withdrawals stop distorting how your portfolio did.

By Sonar team·Updated October 24, 2026·7 min read

If you never added or withdrew money, your portfolio return is simply (ending value − starting value) ÷ starting value. Once you deposit or withdraw, use a time-weighted return (TWR) to measure how your investments performed, and a money-weighted return (MWR, also called internal rate of return) to measure how your own money did, given when you added it. The two can differ a lot, and both are correct answers to different questions.

This guide explains each method with small worked examples you can check on a calculator.

Why "my balance went up" isn't a return

Suppose your account showed $10,000 in January and $15,000 in December. If you deposited $5,000 along the way, your investments didn't gain anything: the increase is your own money. Any useful return figure has to separate cash flows (deposits, withdrawals, transfers in and out) from market gains.

That's the whole problem these methods solve. They differ in how they treat the timing of cash flows.

Each deposit (+) lifts the balance (dashed line) without being a return. Performance (solid line) leaves deposits out.

Method 1: Simple return (no cash flows)

Return = (ending value − starting value) ÷ starting value

Example (illustrative): you invest $8,000 and a year later it's worth $8,960.

Return = ($8,960 − $8,000) ÷ $8,000 = 12%

This only works when nothing was added or removed. Dividends that stay in the account count as part of the ending value.

Method 2: Time-weighted return (TWR)

Time-weighted return removes the effect of deposits and withdrawals. You split the period at every cash flow, measure the return of each sub-period, and multiply them together. CFA Institute material describes it as the standard way to compare investment managers, because managers don't control when clients add or withdraw money; the GIPS standards published by CFA Institute are built around it.

How to calculate it:

  1. Split the period at each cash flow.
  2. For each sub-period: return = value at the end (just before the next cash flow) ÷ value at the start (just after the previous cash flow) − 1.
  3. Chain them: TWR = (1 + r1) × (1 + r2) × … × (1 + rn) − 1.

Worked example

This is an illustrative example.

  • January 1: you start with $10,000.
  • June 30: the portfolio is worth $11,000. That's +10% for the first half.
  • June 30: you deposit $10,000, so the portfolio is now $21,000.
  • December 31: the portfolio is worth $19,950. That's −5% for the second half ($19,950 ÷ $21,000 − 1).

TWR = (1 + 0.10) × (1 − 0.05) − 1 = 1.10 × 0.95 − 1 = +4.5%

The deposit doesn't count as a gain, and its size doesn't matter. TWR answers: "How did the investments do over the year?"

Time-weighted return splits the year at the deposit (+): the first half’s gain and the second half’s loss are measured on their own, then multiplied (×).

Method 3: Money-weighted return (MWR or IRR)

Money-weighted return is the single annual rate that makes your deposits and withdrawals grow into your ending value. It gives more weight to periods when more of your money was invested, so it reflects your timing.

For the same example, you're solving for r in:

$10,000 × (1 + r) + $10,000 × (1 + r)^0.5 = $19,950

The first $10,000 was invested for a full year, the second for half a year. Solving gives r ≈ −0.3%.

In money terms: you put in $20,000 and ended with $19,950, a market loss of $50. More of your money was invested during the half that fell, so your personal result was slightly negative even though the investments returned +4.5% over the year.

A CFA Institute digest notes exactly this: a time-weighted return can be positive while the money-weighted return for the same investment is negative.

A shortcut: the Modified Dietz method

If you want something close to a money-weighted return without solving an equation, the Modified Dietz method weights each cash flow by the share of the period it was invested:

Return ≈ (ending value − starting value − net cash flows) ÷ (starting value + weighted cash flows)

Each cash flow's weight is the fraction of the period remaining after it happened. In the example, the deposit was invested for half the year, so its weight is 0.5:

($19,950 − $10,000 − $10,000) ÷ ($10,000 + 0.5 × $10,000) = −$50 ÷ $15,000 ≈ −0.33%

That's very close to the exact money-weighted figure, and it's easy to do in a spreadsheet.

You don't need to solve MWR by hand. Spreadsheet functions like XIRR take a list of dates and cash flows (deposits as negatives, the ending value as a positive) and return the rate.

Which one should you use?

Question you're askingUse
How did my investments perform, ignoring my deposits?Time-weighted return
How does my portfolio compare with an index or a fund?Time-weighted return
How did my own money do, given when I added it?Money-weighted return
How much did I gain or lose in money?Market gain (see below)

Index and fund returns are time-weighted, so to compare your portfolio with a benchmark like the S&P 500 or Bitcoin, use TWR.

Market gain: the number in currency

Percentages hide size. A simple money figure helps:

Market gain = ending value − starting value − net deposits

In the example: $19,950 − $10,000 − $10,000 = −$50.

Market gain tells you how much the market added to or took from your wealth over the period, after removing your own contributions.

Annualizing returns

Returns over different lengths of time aren't comparable until you annualize them:

Annualized return = (1 + total return)^(1 ÷ years) − 1

Example: a 21% total return over two years is (1.21)^(0.5) − 1 = 10% a year, not 10.5%.

Be careful annualizing short periods. A 5% gain in one month annualizes to about 80%, which says little about what a year will look like.

How Sonar calculates your return

Sonar shows three numbers for any range you pick:

  • A time-weighted return, chained day by day, with deposits, withdrawals and transfers valued at that day's price so they aren't counted as gains.
  • Market gain in your currency.
  • Net added, the money you put in minus what you took out.
A Bitcoin holding in the sample portfolio over three months: its market gain leaves out buys and sells, which are marked on the line.A Bitcoin holding in the sample portfolio over three months: its market gain leaves out buys and sells, which are marked on the line.
A Bitcoin holding in the sample portfolio over three months: its market gain leaves out buys and sells, which are marked on the line.

You can compare your time-weighted line with the S&P 500 (SPY) and Bitcoin on the same chart. Benchmarks are price only, without dividends. When you import past transactions, Sonar rebuilds your portfolio's daily value from closing prices, so the return covers your real history. See how it looks in the demo, or read more about tracking crypto and stocks together.

Common mistakes

  • Counting deposits as returns. The most common error by far.
  • Comparing your MWR with an index's TWR. They answer different questions. Compare TWR with TWR.
  • Ignoring transfers between accounts. Moving coins from an exchange to your wallet is neither a gain nor a deposit for the portfolio as a whole. Make sure both sides are recorded.
  • Leaving out dividends and fees. Dividends add to return; fees reduce it.
  • Annualizing a few weeks of data. The result is mostly noise.

FAQ

What is a good portfolio return?

There's no single answer. A return only means something next to a benchmark with similar risk and over the same period. Compare your time-weighted return with an index that resembles what you hold.

Why does my broker show a different return than my tracker?

Brokers use different methods: some show TWR, some MWR, some a simple gain on cost. Periods, dividend handling and the treatment of transfers also differ. Check which method each one uses before comparing.

Is unrealized P&L the same as return?

No. Unrealized P&L is current value minus cost basis for positions you still hold. Return measures performance over a period. See what is cost basis.

How do I include crypto transfers between wallets?

A transfer between your own accounts is neutral for the whole portfolio. If only one side is tracked, it looks like a withdrawal or a deposit and distorts the return. Track every wallet and exchange you use, or record the transfer on both sides.

Related pages

  • Investment portfolio tracker for stocks, ETFs and cryptoTrack every investment in one portfolio app. Stocks, ETFs, funds, crypto and cash from wallets, exchanges and brokerages, with returns, allocation and net worth.
  • What is cost basis, and how do you track it across exchanges?Cost basis is what you paid for an investment, fees included. Learn how it is calculated, why transfers break it, and how to keep it right across accounts.
  • Stock portfolio tracker with live prices and P&LA stock portfolio tracker for stocks, ETFs and funds. Connect US brokerages read-only or import a CSV, then see performance, dividends and allocation.
  • How to track asset allocation across crypto and stocksMeasure how your money is split across stocks, ETFs, crypto and cash, spot concentration and drift, and keep an honest view of diversification.

Put it into practice

Track your crypto, stocks and net worth in one place. Free to start, read-only.

Get started

On this page

Why "my balance went up" isn't a returnMethod 1: Simple return (no cash flows)Method 2: Time-weighted return (TWR)Method 3: Money-weighted return (MWR or IRR)Which one should you use?Market gain: the number in currencyAnnualizing returnsHow Sonar calculates your returnCommon mistakesFAQ

Put it into practice

Track your crypto, stocks and net worth in one place. Free to start, read-only.

Get started
Language
Get started
Theme