mortgage-calculate

0.0.1 • Public • Published

mortgage-calculate

Calculate mortgage payments.

Install

npm install mortgage-calculate
bower install mortgage-calculate

Usage

Calculate monthly payment

const mortgageCalculate = require('mortgage-calculate');
 
const result = mortgageCalculate({
  loanAmount: 100000,
  APR: 4.7,
  termYears: 30
});
 
console.log(result);
/*
{
  loanAmount: 10000,
  totalCost: 186709.61139815467,
  monthlyPayment: 518.6378094393185,
  APR: 4.7,
  termYears: 30
}
*/

Calculate max loan amount

const result = mortgageCalculate({
  monthlyPayment: 500,
  APR: 4.7,
  termYears: 30
});
 
console.log(result);
/*
{
  loanAmount: 96406.3920716719,
  totalCost: 180000,
  monthlyPayment: 500,
  APR: 4.7,
  termYears: 30
}
*/

Test

npm test

License

MIT

Package Sidebar

Install

npm i mortgage-calculate

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • miguelmota