XIRR Formula in Excel

There are two ways to “xirr formula in excel”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above with a tool to test it; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: use =XIRR(values, dates) — it returns the annualised return of cash flows that happened on real dates rather than at even intervals.

On this page8

Syntax

=XIRR(values, dates, [guess])

Arguments

Argumentrequired / optionalDescription
valuesrequiredThe cash flows. At least one negative and one positive are required.
datesrequiredThe date of each cash flow.
guessoptionalStarting estimate. Defaults to 10 %.

Related functions

IRRXNPVNPV
ƒxNPV & IRR CalculatorLive
%
Net present value
€1,307.29

3 one value per year

IRR
16.34%
=NPV(rate, flows)−investment · =IRR(B1:B4)

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

XIRR is the return measure that matches how investments actually behave: contributions and withdrawals on arbitrary dates, and a result already annualised. That makes it the right function for a personal portfolio, a property with irregular costs, or a fund with capital calls — cases where IRR's assumption of even periods produces a meaningfully wrong number. It solves iteratively, so a difficult series may need the guess argument. At least one negative and one positive value are required, or it returns #NUM!. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “xirr formula in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

Investing -10,000 on 1 Mar 2024, adding -5,000 on 12 Sep 2024, and holding 19,400 on 30 Jun 2026: =XIRR(B2:B4, A2:A4) returns roughly 17 % annualised, correctly weighting the second contribution for the shorter time it was invested. IRR over the same three numbers would treat them as three even periods and mislead. XIRR is the honest return figure for anything with irregular contributions, which is most real-world investing. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “xirr formula in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.

Common mistakes

  • Omitting the current value as a closing cash flow, which makes the return look far worse than it is.
  • All values sharing a sign, which returns #NUM! — there must be at least one of each.
  • Annualising the result again; XIRR already returns an annual rate.

Frequently asked questions

What is the difference between IRR and XIRR?

IRR assumes evenly spaced periods; XIRR uses actual dates and returns an annualised figure. For real portfolios, XIRR is nearly always correct.

Why does XIRR return #NUM!?

Either every value has the same sign, or the iteration did not converge. Supply a guess near the expected return.

Do I need to annualise the result?

No — XIRR is already annualised, whatever the span of the dates.