Skip to content

Instantly share code, notes, and snippets.

@GlenTiki
Created October 26, 2015 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GlenTiki/baa461e7ab2147755c25 to your computer and use it in GitHub Desktop.
Save GlenTiki/baa461e7ab2147755c25 to your computer and use it in GitHub Desktop.
double monthlyInterestRate = annualInterestRate / 1200;
double monthlyPayment = (loanAmount * monthlyInterestRate)/(1 -(1/Math.pow(1+monthlyInterestRate, numberOfYears*12)));
double totalPayment = monthlyPayment*numberOfYears*12;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment