Discounted cash flow analysis

Description

This program performs two kinds of discounted cash flow analysis: net present value (NPV) and internal rate of return (IRR). It calculates NPV or IRR for up to 24 groups of cash flows.

To use the discounted cash flow analysis program:

5 f DIM (i)
f USER
n ENTER 2 f DIM C (n=number of cash flow groups)
f MATRIX 1
For each cash flow group:
a. Key in the amount and press STO C, then
b. Key in the number of occurrences and press STO C

To calculate NPV, enter periodic interest rate i in percent and press A.
To calculate IRR, press B.

Example:
5 f DIM (i)
f USER
3 ENTER 2 f DIM C
f MATRIX 1
-4000 STO C
1 STO C
125 STO C
1 STO C
4100 STO C
1 STO C
B

IRR = 2.8168

Program Resources

Labels

Name Description Name Description
 A NPV routine  3
 B IRR routine  4 Branch for IRR = 0
 0 Branch for IRR ≤ −100  5
 1  6
 2 Calculates NPV  7 Branch for all flows used

Storage Registers

Name Description
 2
 3
 4
 5

Flags

Number Description
0 Tests if all cash flows are used

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 023 44 2 STO 2 046 1 1
001 42.21.11 f LBL A 024 1 1 047 34 x↔y
002 26 EEX 025 44 4 STO 4 048 30
003 2 2 026 40 + 049 45.10. 2 RCL ÷ 2
004 10 ÷ 027 43.30. 4 g TEST x≤0 050 45.20. 3 RCL × 3
005 32 2 GSB 2 028 22 0 GTO 0 051 22 5 GTO 5
006 31 R/S 029 44 3 STO 3 052 42.21. 4 f LBL 4
007 42.21.12 f LBL B 030 0 0 053 34 x↔y
008 1 1 031 44 5 STO 5 054 32 6 GSB 6
009 36 ENTER 032 42.16. 1 f MATRIX 1 055 42.21. 5 f LBL 5
010 26 EEX 033 42.21. 3 f LBL 3 056 20 ×
011 16 CHS 034 43. 6. 0 g F? 0 057 44.40. 5 STO + 5
012 3 3 035 22 7 GTO 7 058 45 4 RCL 4
013 42.10. 2 f SOLVE 2 036 32 6 GSB 6 059 44.20. 3 STO × 3
014 22 1 GTO 1 037 45 2 RCL 2 060 22 3 GTO 3
015 22 0 GTO 0 038 43 20 g x=0 061 42.21. 6 f LBL 6
016 42.21. 1 f LBL 1 039 22 4 GTO 4 062 u 45 13 USER RCL C
017 26 EEX 040 1 1 063 43 32 g RTN
018 2 2 041 40 + 064 43. 4. 0 g SF 0
019 20 × 042 32 6 GSB 6 065 43 32 g RTN
020 31 R/S 043 16 CHS 066 42.21. 7 f LBL 7
021 42.21. 2 f LBL 2 044 14 067 45 5 RCL 5
022 43. 5. 0 g CF 0 045 44 4 STO 4 068 43 32 g RTN