For your reference, here are the actual formulas used to compute Calc's financial functions.
Calc will not evaluate a financial function unless the rate or
n argument is known. However, payment or amount can
be a variable. Calc expands these functions according to the
formulas below for symbolic arguments only when you use the a "
(calc-expand-formula
) command, or when taking derivatives or
integrals or solving equations involving the functions.
In pmt
and pmtb
, x=0 if omitted.
These functions accept any numeric objects, including error forms, intervals, and even (though not very usefully) complex numbers. The above formulas specify exactly the behavior of these functions with all sorts of inputs.
Note that if the first argument to the log
in nper
is
negative, nper
leaves itself in symbolic form rather than
returning a (financially meaningless) complex number.
`rate(num, pmt, amt)' solves the equation
`pv(rate, num, pmt) = amt' for `rate' using H a R
(calc-find-root
), with the interval `[.01% .. 100%]'
for an initial guess. The rateb
function is the same except
that it uses pvb
. Note that ratel
can be solved
directly; its formula is shown in the above list.
Similarly, `irr(pmts)' solves the equation `npv(rate, pmts) = 0' for `rate'.
If you give a fourth argument to nper
or nperb
, Calc
will also use H a R to solve the equation using an initial
guess interval of `[0 .. 100]'.
A fourth argument to fv
simply sums the two components
calculated from the above formulas for fv
and fvl
.
The same is true of fvb
, pv
, and pvb
.
The ddb function is computed iteratively; the "book" value
starts out equal to cost, and decreases according to the above
formula for the specified number of periods. If the book value
would decrease below salvage, it only decreases to salvage
and the depreciation is zero for all subsequent periods. The ddb
function returns the amount the book value decreased in the specified
period.
The Calc financial function names were borrowed mostly from Microsoft
Excel and Borland's Quattro. The ratel
function corresponds to
`@CGR' in Borland's Reflex. The nper
and nperl
functions correspond to `@TERM' and `@CTERM' in Quattro,
respectively. Beware that the Calc functions may take their arguments
in a different order than the corresponding functions in your favorite
spreadsheet.