Category: FUNCTION | Updated: 2026-11-22
How to Use the XIRR Function | Calculate Annualized Yield (IRR) for Irregular Investments and Returns
Syntax
=XIRR(cashflow_amounts, cashflow_dates, [rate_guess])
- cashflow_amounts: A range of amounts for investments (negative) and returns or current valuations (positive).
- cashflow_dates: A range of cells containing the dates corresponding to each cash flow.
- rate_guess (optional): An initial estimate for the rate of return (default is
0.1).
Practical Example with a Table
Here is an example of calculating the annualized yield (XIRR) after making 3 irregular investments, with a valuation of ¥1,800,000 as of November 22, 2026.
| Date | Cash Flow (JPY) | Transaction |
|---|---|---|
2025/04/01 |
-1,000,000 |
Initial purchase (outflow is negative) |
2025/09/15 |
-300,000 |
Additional purchase (outflow is negative) |
2026/03/10 |
-200,000 |
Additional purchase (outflow is negative) |
2026/11/22 |
1,800,000 |
Current valuation (assumed inflow, positive) |
- Formula:
=XIRR(B2:B5, A2:A5) - Result: 14.38% (annualized yield)
Common Errors and Notes
- First Cash Flow Should Be Negative: If the earliest cash flow chronologically starts with a positive value (inflow), a
#NUM!error may occur. Sort your dates in chronological order. - Must Contain Both Positive and Negative Values: If all entries are negative (purchases only) and you forget to include the current valuation, the function cannot calculate a result and returns
#NUM!.
Frequently Asked Questions
Q. What types of investments is the XIRR function best suited for?
A. It is ideal when you want to know the "annualized return on stocks or mutual funds purchased sporadically whenever spare cash was available, rather than on a fixed monthly schedule."
Q. How can I calculate the yield of an asset I still hold using the XIRR function?
A. Add a final row with "today's date" and the "current valuation (as a positive value)" and include it in the range to calculate the annualized return as of today.