If you want to calculate the capitalisation factor using the Julia programming language, you can find the
code here. The inhibition threshold may be somewhat higher than with the online calculators above, but Julia
has a philosophy that only so much needs to be understood as is absolutely necessary. Here it will remain
very easy. You don't need any programming knowledge.
Download Julia here and
install it.
Start Julia by clicking on the icon on the desktop, or in the menu.
Copy the following code and paste it into Julia (REPL) with a right click. Then press Enter and the
important formulas are saved as a function in the session.
pvifa(i, g, r, n) = (1 - (1 + g)^n * (1 + i + r)^-n) / (i + r - g)
pvifa(i, g, r) = 1 / (i + r - g)
The code for the calculation of the two examples follows.
pvifa(0.1, 0.02, 0, 30) # Example 1
pvifa(0.1, 0.02, 0) # Example 2
Copy the code from the examples and enter your values. i stands for the interest rate, g for the growth
rate, r for a potential risk premium, and n for the number of years. If (n) is not specified, the present
value of a perpetual annuity is calculated.
The result is displayed after pressing the Enter key.