XIRR: money-weighted portfolio return

XIRR (Extended Internal Rate of Return) is your portfolio's annualized return that accounts for both the amounts and the dates of all deposits and withdrawals. It answers the question: "What effective rate did my money actually earn?"

Section: Returns · Updated 18 July 2026

What XIRR is

A simple profit percentage is misleading when you top up your account at different times. Money invested six months ago and money invested yesterday cannot "earn" at the same rate. XIRR solves this: it is the internal rate of return (IRR) for irregular cash flows, expressed on an annualized basis. It weights every ruble by the time it actually spent working in the portfolio.

Because of this, XIRR is called a money-weighted return. It is your personal financial result — unlike TWR, which measures the effectiveness of the strategy itself.

Formula

XIRR is the annual rate r at which the net present value (NPV) of all cash flows equals zero:

NPV = Σi=1..N  CFi(1 + r)(di − d1) / 365  = 0 CFi — cash flow #i: deposits with a "−" sign, withdrawals and the final (terminal) value with a "+" sign.   di — the date of the flow.   d1 — the date of the first movement of funds.   r — the XIRR annual rate being solved for.

The equation is nonlinear and has no analytical solution — r is found numerically (see the section below). The logic is the same as the XIRR function (in Russian Excel — ЧИСТВНДОХ).

What counts as a cash flow, and what does not

The key principle of canonical XIRR is that only external capital movements between you and the brokerage account are counted:

  • Counted: money paid into the account (with a "−" sign), money withdrawn from the account (with a "+" sign), and the terminal value on the valuation date.
  • Not counted: internal operations — purchases and sales of securities, commissions, coupons and dividends received. These are the portfolio's internal turnover; they are already reflected in the final value of the assets.
  • Terminal value on the last date is the market value of all positions plus the balance of uninvested cash on the account.

Worked example

You deposited 100 000 ₽ on 1 January, added 50 000 ₽ on 1 July, and a year later, on 1 January, the portfolio is worth 170 000 ₽.

DateFlow CFiMeaning
01.01.2025−100 000 ₽Deposit
01.07.2025−50 000 ₽Deposit
01.01.2026+170 000 ₽Terminal value

Naive profit: you invested 150 000, it grew to 170 000 → "+13.3%". But the second 50 000 only worked for half a year, so the effective annual rate is higher. Solving the NPV = 0 equation gives XIRR ≈ 16.0% per year. This is the figure you can correctly compare with a deposit rate.

How Firewire calculates it

Firewire collects all external movements of funds across your accounts (including aggregating several brokers) and solves the NPV = 0 equation with a hybrid numerical method — a combination of the bisection method and the Newton–Raphson method, with safeguards against division by zero and degenerate cases. This approach converges quickly and is robust to "difficult" sets of flows.

The result matches the financial standard of the XIRR / ЧИСТВНДОХ function in Microsoft Excel, so you can verify the numbers by hand.

XIRR or TWR: which to choose

XIRR shows the result of your money — it "penalizes" or "rewards" the timing of your deposits. TWR removes the influence of deposits and withdrawals and shows the effectiveness of the strategy, which is why it is the one compared with a benchmark (for example, MCFTR). If you regularly buy more, the two figures will differ, and that is normal.

Common mistakes: treating coupons and dividends as "deposits" (they are internal, not external), forgetting about the cash balance in the terminal value, or comparing the XIRR of one portfolio with the TWR of another.

Read next