Calculate the Cash Inflow Needed for a Target XIRR in WPS Spreadsheets
Question details
Calculate the future cash inflow required to reach a target internal rate of return when previous cash outflows occurred on different dates.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- The user has dated cash outflows and wants to determine the inflow required on a future date to achieve a target XIRR.
- Observed behavior
- The required inflow should produce the target annualized return when combined with the previous dated cash flows.
Enter the previous dates as valid spreadsheet dates and the corresponding outflows as negative numbers. Enter the future inflow date after all previous dates and a target annual rate greater than -100%.
Calculate the required inflow with SUMPRODUCT
Use a direct formula when the previous cash flows are outflows on different dates.
The formula discounts each previous cash flow to the first date, then compounds the total to the future inflow date using a 365-day year.
In WPS Spreadsheets, enter the previous dates in A2:A7 and their negative cash flows in B2:B7. Put the earliest date in A2.
Enter the target annual rate as a percentage, such as 10%, in E2. Enter the future inflow date in A8.
Select B8 and enter =-SUMPRODUCT(B2:B7/(1+E2)^((A2:A7-A2)/365))*(1+E2)^((A8-A2)/365). Press Enter to display the required inflow.
In an empty cell, enter =XIRR(B2:B8,A2:A8). The result should match the target rate in E2, subject to rounding.

Calculate and check a target XIRR in WPS Spreadsheets
Use WPS Spreadsheets to calculate a future inflow from dated cash flows, then check the result with XIRR.
- 1. Open a spreadsheet: Open WPS Spreadsheets and create a workbook or open an existing cash-flow file.
- 2. Enter the inputs: Put previous dates in A2:A7, negative cash flows in B2:B7, the target rate in E2, and the future date in A8.
- 3. Calculate the future inflow: In B8, enter =-SUMPRODUCT(B2:B7/(1+E2)^((A2:A7-A2)/365))*(1+E2)^((A8-A2)/365).
- 4. Verify the return: Enter =XIRR(B2:B8,A2:A8) in an empty cell and compare the result with E2.

Frequently Asked Questions
Why are the previous cash outflows entered as negative numbers?
XIRR uses cash-flow signs to distinguish money paid out from money received. Enter investments as negative values in B2:B7 and the future inflow as a positive value in B8.
Can I use XNPV to calculate the required inflow?
XNPV generally requires at least one positive and one negative cash flow in its values range. If B2:B7 contains only outflows, use the SUMPRODUCT formula instead.
Why does the formula divide the number of days by 365?
XIRR annualizes returns using a 365-day year. The formula uses the same day-count basis when discounting and compounding the cash flows.
What should I check if the formula returns an error?
Check that A2:A8 contains valid dates, B2:B7 contains numeric cash flows, and E2 contains a rate greater than -100%. Make sure A2 is the earliest date and A8 is after the previous cash-flow dates.




