Last active
August 29, 2015 14:21
-
-
Save rs77/77b49f8dd40eb5de86ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var p = 25000, // principal amount | |
i = 0.06, // annual interest rate over the life HP | |
n = 60, // number of periods in life of HP | |
y = 12, // number of payment periods per annum | |
t = true, // if payment is to be made in ADVANCE | |
r = 1 + ( i / y ), // interest rate per period = 1.005 | |
S_n = ( (r^n) - 1 ) ) / ( r - 1 ), // limiting sum of payments = 69.77 | |
repay; // repayments per period | |
if ( t ) S_n *= r; // = 70.12 | |
repay = (p * ( r^n )) / S_n; // = 480.92 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment