I'm trying to calculate the monthly payment for the following scenario:
$5,000 is borrowed for 3 years at 8.00% compounded monthly with $1,000 due at the end of the term.
/*
From Math.pas
function Payment(Rate: Extended;
NPeriods: Integer;
const PresentValue: Extended;
const FutureValue: Extended;
PaymentTime: TPaymentTime): Extended;
*/
var
Pmt : Extended;
begin
Pmt := Payment(0.08/12,36,5000,1000,ptEndOfPeriod);
Edit1.Text := FloatToStr(Pmt);
end
Result = -181.351526101918
The result is correct except it is negative.
Why does the result of the Payment function return a negative number?