PPMT Function
The PPMT function calculates the principal portion of a payment for a specified period in the life of a loan, given the amount of the loan and a given rate of interest. Based on same equation as the FV (future value) function (see
FV Function).
This function has the following syntax:
PPMT(per = value, pv = value, i = value, nper = value,
fv = value, paybegin, byref(context))
Note: Paybegin is either 1 or 0, indicating that the payment is made at the beginning or end of the period.
This function returns:
• Float—The principle portion for the specified period
• Null—On error
Example—PPMT function:
/* In the following example period and principle are
** EntryFields of DataType Float. A specific period
** would be entered in the period field. There is
** also a ButtonField named btn_ppmt. The frame
** script is shown below. The loan is for $10,000
** for 48 months at 7% interest per year.
*/
on initialize =
declare
context = PMT_CONTEXT;
enddeclare
on click btn_ppmt =
begin
principal = ppmt(period = period,
pv = 10000,
i = .07/12,
nper = 48,
fv = 0,
paybegin = 0,
context = byref(context));
if principal is NULL then
message 'Failed to calculate principle portion';
endif;
end
Last modified date: 06/25/2024