Sub topic 10
Cash Flows on Irregular Dates
Assume you know Excel cell references, ranges, percentages, compound interest, and how to enter valid Excel dates. This chapter focuses on cash flows that do not occur at regular monthly, quarterly, or annual intervals.
Why dates change the calculation
A periodic NPV assumes that each cash flow is exactly one period after the previous one. Real projects often have a different pattern:
- An investment occurs on January 15.
- A customer payment arrives on March 31.
- A second payment arrives on November 10.
- A final payment arrives the following July.
Using ordinary NPV for these cash flows would force them into artificial periods. XNPV instead discounts each cash flow according to the number of days since the first date.
The Excel functions use a 365-day year:
\[ PVi = \frac{CFi}{(1+r)^{(datei-date0)/365}} \]
Here, CF_i is a cash flow, r is the annual discount rate, and date_0 is the first date in the range.
Preparing the date and cash flow ranges
Put dates and cash flows in matching rows. The first date should be the date from which all other cash flows are measured. Use a consistent sign convention:
- Cash paid by the project is negative.
- Cash received by the project is positive.
Dates must be real Excel dates, not text that only looks like a date. You can test a date by changing its format to General. A real date displays as a serial number.
| Date | Cash flow |
|---|---|
| 1-Jan-2026 | -10,000 |
| 31-Mar-2026 | 3,000 |
| 10-Nov-2026 | 4,000 |
| 15-Jul-2027 | 5,000 |
Calculating XNPV
If dates are in A2:A5, cash flows are in B2:B5, and the annual discount rate is in D1, calculate present value with:
=XNPV(D1, B2:B5, A2:A5)XNPV requires the dates and values ranges to have the same number of entries. It uses the first date in A2:A5 as the valuation date. The first cash flow is therefore not discounted, because its elapsed time is zero.
You can independently reproduce the calculation with SUMPRODUCT:
=SUMPRODUCT(B2:B5 / (1 + D1)^((A2:A5 - A2) / 365))The two results should be approximately equal. This check helps detect a reversed range, a wrong discount rate, or a date stored as text.
> callout note > Do not use NPV merely because the cash flows fit into a table. Use XNPV when the actual dates matter. The 365-day basis is fixed by these Excel functions; it is not a day-count convention you can change inside XNPV.
Calculating XIRR
XIRR finds the annual rate that makes the dated cash flows' XNPV equal to zero:
=XIRR(B2:B5, A2:A5)The cash flows must include at least one negative and one positive value. To verify the result, substitute the returned rate into XNPV:
=XNPV(XIRR(B2:B5, A2:A5), B2:B5, A2:A5)The result should be close to zero, subject to rounding.
Troubleshooting convergence
#VALUE! commonly indicates that a date is text, a range contains nonnumeric values, or the date and cash flow ranges have different lengths. #NUM! can occur when there is no valid solution or when the iterative solver does not find one from its starting point.
Supply an optional guess when necessary:
=XIRR(B2:B5, A2:A5, 0.1)The guess is an annual rate, so 0.1 means 10%. Try a few reasonable guesses, then investigate the cash flow pattern if results differ substantially.
Exercise
Dates are in A2:A6, cash flows are in B2:B6, and the discount rate is in D1. Which formula calculates present value using the actual dates, and how can you check it?
Show answer
Use =XNPV(D1,B2:B6,A2:A6). Check it with =SUMPRODUCT(B2:B6/(1+D1)^((A2:A6-A2)/365)).