Finance & Investment
XIRR Formula: Discount Dated Cash Flows to Zero
Write the Actual/365 XIRR equation, solve a two-cash-flow example, and check signs, dates and the numerical residual.
Write each amount beside its actual date
XIRR is an annualized money-weighted return calculated from dated cash flows. From an investor's perspective, money paid into the investment is negative and money received is positive. Include the ending investment value as a positive amount on its valuation date when measuring an investment that is still held. The local input format is one line per date and amount, such as 2026-03-01, -1000. Use a plain numeric amount without a thousands separator, because the comma separates the date from the amount in this input format.
Set up the zero-present-value equation
Let Cj be each cash flow and dj its date, with d0 the starting reference date. The Actual/365 equation is the sum of Cj/(1+r)^((dj−d0)/365)=0, where the date difference is counted in calendar days and r is the annual rate as a decimal. The local calculator uses the earliest entered date as its reference and seeks a rate greater than −100%. A positive and a negative cash flow are required for an ordinary investment-return problem. The equation discounts all amounts to one date before adding them.
Solve a two-flow example directly
Consider an outflow of 1,000 on 1 March 2026 and a receipt of 1,010 on 1 April 2026. There are 31 calendar days between the dates. The equation is −1,000+1,010/(1+r)^(31/365)=0. Rearranging gives r=(1.01)^(365/31)−1, approximately 12.4296% annualized. The actual gain over the 31-day holding period is 1%, not 12.4296%. Annualization expresses the equivalent compounded rate on a one-year basis; it does not say that an additional 11.4296% has already been earned.
Verify the result by substitution
Substitute the unrounded rate back into the equation and compute the discounted receipt. It should be approximately 1,000, making the sum with the original −1,000 close to zero. Using only the displayed four-decimal percentage leaves a small rounding residual. This is expected and differs from a material mismatch caused by incorrect dates or signs. For the local tool, enter the two dated lines exactly and compare the displayed annualized value. The date calculation is based on calendar days, so daylight-saving changes in the browser's time zone do not alter this example's result.
Distinguish the 365 denominator from calendar-year length
A fixed 365-day denominator does not mean every calendar-year interval contains 365 days. From 1 January 2024 to 1 January 2025 there are 366 days. For an outflow of 1,000 followed by 1,100 on those dates, the annualized rate is 1.1^(365/366)−1, approximately 9.9714%, rather than exactly 10%. The 10% figure remains the holding-period return. Leap days count as actual elapsed calendar days; the convention places those days over the fixed 365 denominator when forming the exponent.
Understand numerical solving for longer schedules
With several dated amounts, there is generally no single elementary rearrangement for r. The local implementation starts an iterative search and uses a bracketing fallback when available. Some cash-flow patterns can have multiple solutions or no suitable solution, especially when signs change repeatedly. A returned rate is therefore a candidate satisfying the schedule, not proof of a unique economic interpretation. Inspect the signs, dates and discounted residual. If two tools disagree, compare the full cash-flow schedule and solving assumptions before treating one displayed value as authoritative.
Keep the input record with the rate
The calculator does not retrieve bank statements, fund transactions, fees or taxes. Missing a withdrawal or using a statement date instead of a transaction date changes the problem. Do not add an unrealized gain as a separate positive cash flow if the ending value already includes it. For spreadsheet comparison, keep dates and amounts in paired rows and use XIRR on those two ranges. Retain the original schedule alongside the result so the annualized rate can be reproduced and distinguished from a simple gain percentage or an equal-period IRR.
Use the XIRR Calculator
Source and scope
Microsoft: XIRR syntax, dated cash flows and day-count basis