Back to Calculators

XIRR Calculator

Find the money-weighted annual return from dated deposits, withdrawals and account balances

Account balances

Dates are written YYYY-MM-DD. The starting and ending balances are valuations: enter each once, not again as a deposit.

For example 2025-01-01

Use 0 if the account began empty

After the start date

Deposits and withdrawals

Between the start and end dates, inclusive. Blank rows are ignored.

XNPV check

Used only for the XNPV and discount table

Calculated in your browser; nothing you enter is saved or sent.

Illustrative example shown: 1,000 on 2025-01-01, a 500 deposit on 2025-07-01 and 1,700 on 2026-01-01. Enter your own figures and press Calculate.

XIRR (annual effective)
16.0936%
money-weighted, actual days / 365
Profit
200.00
ending - starting - deposits + withdrawals
XNPV at the discount rate
68.54
at 10.0000% annual effective
Days in the period
365
1.0000 years on a 365-day year

Dated cash flows

Dated investor cash flows and discounted values
DateComponentsNet investor flowDay offsetYear fractionDiscount factorDiscounted value
2025-01-01Starting balance 1000-1,000.0000.0000001.000000-1,000.00
2025-07-01Deposit 500-500.001810.4958900.953836-476.92
2026-01-01Ending balance 17001,700.003651.0000000.9090911,545.45

The discounted values add up to the XNPV of 68.54. Flows on the same date are shown netted, with every component listed. Discounting at the XIRR of 16.093585% gives a total of zero.

Enter balances and dated cash flows

Start with the account itself. Enter the date and value of the account at the start, the date and value at the end, and then each deposit or withdrawal in between with its date. Dates are written as year-month-day, for example 2025-07-01. The starting balance counts as money you put in on the start date, and the ending balance counts as money you could take out on the end date, so each is entered once and never repeated as a transaction.

The example on the page is hypothetical: 1,000 on 2025-01-01, a deposit of 500 on 2025-07-01 and a balance of 1,700 on 2026-01-01. Rows can be added in any order, and a row you leave completely blank is ignored. Deposits and withdrawals must fall between the two dates, inclusive, and the account can span up to 100 years with up to 500 transactions.

Dates must be real calendar dates with a four-digit year in year-month-day form. A date such as 2025-02-30, or one written 2025-7-1, is rejected with a message rather than guessed at, and the end date must come after the start date. Nothing is inferred about the time of day, so every flow on a date is treated as happening on that date.

XIRR formula and 365-day convention

XIRR finds the annual effective rate r for which the dated cash flows have a net present value of zero: the sum of each flow divided by (1 + r) raised to the number of days since the start divided by 365. A flow on the start date is not discounted at all, and a flow one year of 365 days later is discounted by exactly 1 + r.

Days are counted as actual calendar days between dates, using UTC calendar days, so clock changes and time zones cannot move a flow by a day. In the default example the 2025-07-01 deposit falls 181 days after the start, a year fraction of 0.495890. The result is 16.0936%.

Two flows a clean two years apart show the convention. 100 on 2025-01-01 and 121 on 2027-01-01 span 730 days and give 10.0000%, exactly 10% a year. Over a leap year the answer changes slightly: 100 growing to 110 between 2024-01-01 and 2025-01-01 spans 366 days, so the annual rate is 1.10^(365/366) - 1 = 9.9714%, not 10%.

Spreadsheet XIRR functions commonly use the same actual-days-over-365 convention. If yours disagrees with this page, export the CSV: it lists each day offset, year fraction and discount factor, so you can see exactly where a different day count or a different date entry changes the result.

Money-weighted return versus profit

Profit and return are different things. Profit is the money gained: the ending balance, minus the starting balance, minus the deposits, plus the withdrawals. In the default example that is 1,700 - 1,000 - 500 = 200.00. XIRR turns the same history into a rate by also considering when each amount was invested.

The page never divides profit by the cash contributed and calls the result an annual return, because that would ignore the time the money spent in the account. A deposit made the day before the end date and one made on the first day have the same effect on profit but a very different effect on the return, and XIRR reflects that difference.

A rough check makes the idea concrete. In the default example 1,000 was invested for the whole year and the extra 500 for only about half of it, so the average amount at work was about 1,250. The profit of 200.00 divided by 1,250 is 16.0%, close to the XIRR of 16.09%. The exact answer weights each amount by the precise number of days it was invested, which is what the formula does.

IRR, XIRR and time-weighted return

XIRR is the dated version of IRR. The periodic IRR calculator assumes equal spacing between flows, while XIRR uses the real dates. Both are money-weighted: they answer what return your own timing of deposits and withdrawals earned.

A time-weighted return answers a different question: how well the investments performed regardless of when money was added. It chains the returns between external cash flows, which needs the account value just before each flow. Start and end balances with transaction dates do not contain that information, so this page does not estimate it.

The two can disagree sharply. Suppose an account returns +10% in the first half-year, you then add 1,000 to a 1,100 balance, and it returns -10% in the second half. The time-weighted return is 1.10 x 0.90 - 1 = -1.00%. But you had more money in the account during the loss, so your money-weighted result for the same year, with 1,000 at the start, 1,000 added on 2025-07-01 and 1,890 at the end, is -7.27% and your profit is -110.00.

Different providers report different things. A personal rate of return on a brokerage statement is usually money-weighted, because it reflects when you added or removed money. A fund fact sheet usually reports a time-weighted return so that one investor's timing does not affect the published figure. Neither is wrong; they answer different questions, and this page answers the first.

Duplicate dates, losses and ambiguous rates

Several flows can share a date. They are combined before anything else is analysed, and the table lists every component next to the net amount so you can audit it. A deposit and a withdrawal of the same size on the same day cancel, and the account behaves as if neither happened: in a test account of 1,000 growing to 1,200, cancelling flows of 100 leave the rate at 20.0000%.

Some histories do not identify a rate. If the ending balance is zero and nothing was ever withdrawn, there is no money back and no finite rate. If all the flows have the same sign, or cancel, none can balance. And flows that change sign more than once can fit several rates, so the page withholds a single figure and shows the XNPV at your discount rate instead, which is always well defined.

To solve a level-payment problem instead, solve a level-payment finance problem; to compare with a single lump-sum return, compare a simple lump-sum return; and to adjust a nominal result for inflation, convert nominal to real return. Amounts here are hypothetical and ignore taxes and fees.

A deposit made on the final day is allowed and is combined with the ending balance on that date. Deposits and withdrawals outside the two dates are rejected, since the account has no value outside that interval.

XIRR questions

What is XIRR?

XIRR is a money-weighted annual rate: the rate at which the dated cash flows into and out of an account have a net present value of zero. It reflects both how much you earned and when your money was in the account.

What sign is a deposit?

From your point of view as the investor, a deposit is negative because money leaves your pocket. A withdrawal, and the ending balance, are positive because money comes back to you. The starting balance is treated as money you put in on the start date.

Why does a leap year matter?

The calculator divides the actual number of elapsed days by 365. A period that spans 29 February contains 366 days, so a year-long span is slightly more than one year and the annual rate comes out marginally lower for the same gain.

Do I enter the ending balance twice?

No. The ending balance on the end date already creates the terminal cash flow. Entering it again as a withdrawal would count the same money twice and overstate the return.

Does this show a fund manager's time-weighted return?

No. A time-weighted return needs the account value just before each external cash flow, which start and end balances with transaction dates cannot supply. This page reports your money-weighted return only.

Why is a unique rate unavailable?

Flows that all have the same sign, flows that cancel each other, a total loss with no money back, or several sign changes may not identify one rate. The page says which case applies and still shows profit and XNPV.

Get New Free Calculators by Email

Get practical calculator guides and QuantStock updates. Occasional emails only, unsubscribe at any time.

No spam. See our privacy policy.