loan-calc

Calculate monthly loan payments


Keywords
money, mortgage, loan, calculator
License
Unlicense
Install
npm install loan-calc@0.2.1

Documentation

Build Status

Quickly calculate monthly payments and the total amount of interest paid for a fixed rate loan.

Installation

First install node.js. Then:

npm install loan-calc --save

Usage

Require the module and pass the amount of the loan, annual rate, and length of loan in months.

var LoanCalc = require('loan-calc');

LoanCalc.paymentCalc({
    amount: 200000,
    rate: 5,
    termMonths: 180
});
// returns 1581.59

LoanCalc.totalInterest({
    amount: 200000,
    rate: 5,
    termMonths: 360
});
// returns 186511.57

You can also pass the loan amount as a US currency formatted string:

LoanCalc.paymentCalc({
    amount: '$200,000',
    rate: 5,
    termMonths: 180
});
// returns 1581.59

Contributing

Please read the Contributing guidelines.

Running Tests

We are using nodeunit to test. To run tests, first install nodeunit and any dependencies via npm:

npm install

Run tests with:

npm test