{"_id":"overall-loan-cost","_rev":"40-750866a68ffbbc480df2bdb9dd5d5c52","name":"overall-loan-cost","dist-tags":{"latest":"0.3.4"},"versions":{"0.1.0":{"name":"overall-loan-cost","version":"0.1.0","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","_id":"overall-loan-cost@0.1.0","maintainers":[{"name":"adamdscott","email":"hello@adamdscott.com"}],"homepage":"https://github.com/cfpb/overall-loan-cost","bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"dist":{"shasum":"2ab0a8aead7eeb6e897212f0a2bfa12199fee62a","tarball":"https://registry.npmjs.org/overall-loan-cost/-/overall-loan-cost-0.1.0.tgz","integrity":"sha512-uIhxvo2PDULUlsVBxlxlHz0iWY0nCdUUseNuT4xUW8MJ6u1HEnaDUf0EcI1/eMImGxZ8AW7SFwfIGhwB2wTzcw==","signatures":[{"sig":"MEYCIQDngLNF/AoaO8XcBf6q2LPb8LzDRUiRRTg/ZXE6hro8GwIhAOgFUk2gr0x8OSEzEYRYYprYz2tV8W2HrgBrwrxm4aeT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":"./","files":["lib"],"scripts":{"test":"nodeunit test/overall-loan-cost-tests.js"},"_npmUser":{"name":"adamdscott","email":"hello@adamdscott.com"},"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"_npmVersion":"1.4.6","description":"Calculate the overall cost of a loan.","directories":{},"dependencies":{"amortize":"^0.1.1"},"devDependencies":{"nodeunit":"~0.8.6"}},"0.3.0":{"name":"overall-loan-cost","version":"0.3.0","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","_id":"overall-loan-cost@0.3.0","maintainers":[{"name":"adamdscott","email":"hello@adamdscott.com"}],"homepage":"https://github.com/cfpb/overall-loan-cost","bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"dist":{"shasum":"0e135bf967f55e3b0ecf8949f516acd37a006f6e","tarball":"https://registry.npmjs.org/overall-loan-cost/-/overall-loan-cost-0.3.0.tgz","integrity":"sha512-CmnOqpKW2imJhUzdXrzPft98+bhBkLEhvL0iBdSI6qkvRZdRWL9s2oKBZH3EPfh8vFKM98eDGL/yZYkJE/k3QQ==","signatures":[{"sig":"MEUCIAn2QgWS4Hs4Hs4cYsvLTqpCUbHP5gG1Ryrdwjt2OXObAiEAlnuM8ur9njS7SjQePMxuLelJiZObsWJo31uYal89QHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["lib"],"scripts":{"test":"nodeunit test/overall-loan-cost-tests.js"},"_npmUser":{"name":"adamdscott","email":"hello@adamdscott.com"},"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"_npmVersion":"1.4.6","description":"Calculate the overall cost of a loan.","directories":{},"dependencies":{"amortize":"^0.2.0"},"devDependencies":{"nodeunit":"~0.8.6"}},"0.3.1":{"name":"overall-loan-cost","version":"0.3.1","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","_id":"overall-loan-cost@0.3.1","maintainers":[{"name":"adamdscott","email":"hello@adamdscott.com"}],"homepage":"https://github.com/cfpb/overall-loan-cost","bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"dist":{"shasum":"1d901848f9abdfc3bef84afc437a51e23e3787f8","tarball":"https://registry.npmjs.org/overall-loan-cost/-/overall-loan-cost-0.3.1.tgz","integrity":"sha512-c9Tc7JW9zpivz+QAzUpG5KbuzvgjtcwGu9qiY/N0hybEknmTW+Cb2MEUkY001SAiqOTJQNd19H0S4meNeb4ybw==","signatures":[{"sig":"MEQCIEL3yn/jZAyFPFG6EneeZqN21PUS80MjRkmIgbjYcd2gAiAzwc+zc8ArL18UhbpJJZyg/wNTrP7dwMiy4XyUA3tODw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["lib"],"scripts":{"test":"nodeunit test/overall-loan-cost-tests.js","browser-test":"browserify test/browser/reporter.js | ./node_modules/.bin/testling"},"_npmUser":{"name":"adamdscott","email":"hello@adamdscott.com"},"testling":{"files":"test/browser/reporter.js","scripts":"node_modules/nodeunit-browser-tap/lib/nodeunit.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest"]},"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"_npmVersion":"1.4.6","description":"Calculate the overall cost of a loan.","directories":{},"dependencies":{"amortize":"^0.2.0"},"devDependencies":{"nodeunit":"~0.8.6","testling":"~1.7.0","browserify":"~5.9.1","nodeunit-browser-tap":"git://github.com/contolini/nodeunit-browser-tap"}},"0.3.2":{"name":"overall-loan-cost","version":"0.3.2","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","_id":"overall-loan-cost@0.3.2","maintainers":[{"name":"adamdscott","email":"hello@adamdscott.com"}],"homepage":"https://github.com/cfpb/overall-loan-cost","bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"dist":{"shasum":"12e7b8821de86adf1b316ff111e85f2c03bfa790","tarball":"https://registry.npmjs.org/overall-loan-cost/-/overall-loan-cost-0.3.2.tgz","integrity":"sha512-jI+QHByJUVdCfs8ZV4xeIUsUsOM0TwqEzo36V3jhSUivh9JowNsd/v7phzsmlEVotWpPjSK4d1Feiw8hBfrktA==","signatures":[{"sig":"MEUCIQCu394A1X9uvRqjojNQ6U7Z0RevEbTQJmmuuicqDs+yRQIgd3Rh+lg24KNkEv8QXBIXa1lXIJRQTc8nCvZ8tCMkeLw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"test":"nodeunit test/overall-loan-cost-tests.js","browser-test":"browserify test/browser/reporter.js | ./node_modules/.bin/testling"},"_npmUser":{"name":"adamdscott","email":"hello@adamdscott.com"},"testling":{"files":"test/browser/reporter.js","scripts":"node_modules/nodeunit-browser-tap/lib/nodeunit.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest"]},"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"_npmVersion":"1.4.6","description":"Calculate the overall cost of a loan.","directories":{},"dependencies":{"amortize":"^0.2.0"},"devDependencies":{"nodeunit":"~0.8.6","testling":"~1.7.0","browserify":"~5.9.1","nodeunit-browser-tap":"git://github.com/contolini/nodeunit-browser-tap"}},"0.3.3":{"name":"overall-loan-cost","version":"0.3.3","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","_id":"overall-loan-cost@0.3.3","maintainers":[{"name":"adamdscott","email":"hello@adamdscott.com"},{"name":"contolini","email":"chris@contolini.com"}],"homepage":"https://github.com/cfpb/overall-loan-cost","bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"dist":{"shasum":"8a3992215650f526c0152485d0c486fd6450cd75","tarball":"https://registry.npmjs.org/overall-loan-cost/-/overall-loan-cost-0.3.3.tgz","integrity":"sha512-vTuCl7XuIHuPjeprhW81Bd3kCwnzwRj7xPYVy2oD5PooZG0UGWQNj0ZWWKyR0fcY3M6yJNj9T6BplYxETQoblA==","signatures":[{"sig":"MEYCIQDuMRfduqXovYaDomyBJYO5SR9Ve+3OyDCn8vuJz6/ToQIhAPOXwIiocHPC2Xqshp16fiHXldgjOLcBxZNnDMm8kbNy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"test":"nodeunit test/overall-loan-cost-tests.js","browser-test":"browserify test/browser/reporter.js | ./node_modules/.bin/testling"},"_npmUser":{"name":"adamdscott","email":"hello@adamdscott.com"},"testling":{"files":"test/browser/reporter.js","scripts":"node_modules/nodeunit-browser-tap/lib/nodeunit.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest"]},"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"_npmVersion":"1.4.6","description":"Calculate the overall cost of a loan.","directories":{},"dependencies":{"amortize":"^0.2.1"},"devDependencies":{"nodeunit":"~0.8.6","testling":"~1.7.0","browserify":"~5.9.1","nodeunit-browser-tap":"git://github.com/contolini/nodeunit-browser-tap"}},"0.3.4":{"name":"overall-loan-cost","version":"0.3.4","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","_id":"overall-loan-cost@0.3.4","maintainers":[{"name":"adamdscott","email":"hello@adamdscott.com"},{"name":"contolini","email":"chris@contolini.com"}],"homepage":"https://github.com/cfpb/overall-loan-cost","bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"dist":{"shasum":"0a890dba2ad5ba17a9d08d6ad2a3a4c22582fdf6","tarball":"https://registry.npmjs.org/overall-loan-cost/-/overall-loan-cost-0.3.4.tgz","integrity":"sha512-0BwM62Rn3usORNABFqMooMsV4kYmLyvSkJKCbDLdl0HVinG1NAS63LGSMdH1Q8d+0/PwP3PsYssLmcY8dNzhAQ==","signatures":[{"sig":"MEYCIQDApgOq83T+WgVLmgLnM86Odv5vnGc+jCTOeuA8KtSsPAIhAIp9peET8QrJsxCA1usMfqmIeGL9/B8k0uDnJVpNRdd8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"test":"nodeunit test/overall-loan-cost-tests.js","browser-test":"browserify test/browser/reporter.js | ./node_modules/.bin/testling"},"_npmUser":{"name":"contolini","email":"chris@contolini.com"},"testling":{"files":"test/browser/reporter.js","scripts":"node_modules/nodeunit-browser-tap/lib/nodeunit.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest"]},"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"_npmVersion":"1.3.24","description":"Calculate the overall cost of a loan.","directories":{},"dependencies":{"amortize":"^0.2.2"},"devDependencies":{"nodeunit":"~0.8.6","testling":"~1.7.0","browserify":"~5.9.1","nodeunit-browser-tap":"contolini/nodeunit-browser-tap"}}},"time":{"created":"2014-07-28T21:21:39.047Z","modified":"2026-08-25T20:17:40.086Z","0.1.0":"2014-07-28T21:21:39.047Z","0.3.0":"2014-07-31T17:19:13.309Z","0.3.1":"2014-07-31T17:37:32.119Z","0.3.2":"2014-07-31T17:48:52.227Z","0.3.3":"2014-08-25T20:05:50.584Z","0.3.4":"2014-09-02T17:21:33.665Z"},"bugs":{"url":"https://github.com/cfpb/overall-loan-cost/issues"},"author":{"url":"http://consumerfinance.gov","name":"Consumer Financial Protection Bureau"},"license":"Public Domain","homepage":"https://github.com/cfpb/overall-loan-cost","keywords":["overall-loan-cost","money","mortgage","loan","calculator","financial","browserify"],"repository":{"url":"https://github.com/cfpb/overall-loan-cost","type":"git"},"description":"Calculate the overall cost of a loan.","maintainers":[{"email":"higs4281@gmail.com","name":"wmhiggins"},{"email":"devops@cfpb.gov","name":"cfpbadmin"},{"email":"chris@contolini.com","name":"contolini"},{"email":"mistergone@gmail.com","name":"mistergone"},{"email":"wyatt.pearsall@cfpb.gov","name":"wpears"},{"email":"github@anselmbradford.com","name":"anselmbradford"},{"email":"dick.dinh@gmail.com","name":"flacoman91"},{"email":"Joshua.Allen@cfpb.gov","name":"allenjo"},{"email":"whimmels@gmail.com","name":"billhimmelsbach"},{"email":"david.palmer@cfpb.gov","name":"dave_palmer"},{"email":"hello@adamdscott.com","name":"adamdscott"},{"email":"himedlooff@gmail.com","name":"himedlooff"},{"email":"scott@scottcranfill.com","name":"scotchester"}],"readme":"# overall-loan-cost [![Build Status](https://secure.travis-ci.org/cfpb/overall-loan-cost.png?branch=master)](http://travis-ci.org/cfpb/overall-loan-cost)\n\n[![browser support](https://ci.testling.com/cfpb/overall-loan-cost.png)\n](https://ci.testling.com/cfpb/overall-loan-cost)\n\n> Calculate the overall cost of a loan.\n\n## Installation\n\nFirst install [node.js](http://nodejs.org/). Then:\n\n```sh\nnpm install overall-loan-cost --save\n```\n\n## Usage\n\n## Basic usage\n\nRequire the module and pass it an object of loan values (amount borrowed, rate, and total loan term in months):\n\n```javascript\nvar cost = require('overall-loan-cost');\n\ncost({\n  amountBorrowed: 300000,\n  rate: 4.25,\n  totalTerm: 360,\n});\n```\n\nThis will return the total cost of the loan, total equity of the loan, and the overall cost of the loan (cost + equity):\n\n```javascript\n{\n  totalCost: 231295.08,\n  totalEquity: 300000,\n  overallCost: 531295.08\n}\n```\n\n## Additional values\n\nYou can also include the down payment and closing costs of the loan.\n\n```javascript\ncost({\n  amountBorrowed: 300000,\n  rate: 4.25,\n  totalTerm: 360,\n  downPayment: 20000,\n  closingCosts: 30000\n});\n```\n\nWill return:\n\n```javascript\n{\n  totalCost: 261295.08,\n  totalEquity: 320000,\n  overallCost: 581295.08\n}\n```\n\nIf you're interested in seeing the costs of a loan for a period that is shorter than the total life of the loan, you can pass the `amortizeTerm` value in months:\n\n```javascript\ncost({\n  amountBorrowed: 255000,\n  rate: 4.5,\n  totalTerm: 360,\n  amortizeTerm: 84,\n  downPayment: 45000,\n  closingCosts: 6000\n})\n```\n\nThis will return the total cost, total equity, and overall cost after 7 years:\n\n```javascript\n{\n  totalCost: 81449.02,\n  totalEquity: 78082.98,\n  overallCost: 159531.99\n}\n```\n\n## Contributing\n\nPlease read the [Contributing guidelines](CONTRIBUTING.md).\n\n### Running Tests\n\nWe are using [nodeunit](https://github.com/caolan/nodeunit) to test. To run tests, first install nodeunit and any dependencies via npm:\n\n```\nnpm install\n```\n\nRun tests with:\n\n```\nnpm test\n```\n","readmeFilename":"README.md"}