Financial calculations

Many financial calculations reduce to the computation of the present or future value of a lump sum or a sequence of cash flows, subject to a periodic interest rate. The CommonPoint system includes the functions Annuity and Compound for such situations.

One way to express the fundamental formula relating present value PV, future value FV, number of periods n, periodic interest rate r, and payment per period pmt is this:

By convention, dollar amounts are positive when they are received and are negative when they are paid out. Powers of are not easy to compute accurately, especially when r is small. Here is the formula recast using library functions:

This formula is accurate to within roundoff. It applies readily to loans, in which the present value is the amount of the loan and the future value is zero (when the loan is paid off). Here is a statement that evaluates the monthly payment (a negative number) on a $50,000 mortgage, payable over 30 years at an annual interest rate of 8%.

    double pmt = -5.0E4 / Annuity((0.08/12), 30.0*12);

The floating-point expression 30.0*12 is the number of months in 30 years and 0.08/12 is the monthly interest rate.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker