house-loan-calculator
v1.0.4
Published
A Chinese policy based calculator of house loan.
Downloads
12
Readme
house-loan-calculator
A Chinese policy based calculator of house loan.
基于中国国情的购房贷款计算器
Usage
Export three calculate functions: houseLoanCalc, averageCapital, averageInterest.
提供三种计算方法:houseLoanCalc、averageCapital、averageInterest。分别是组合计算器,等额本金计算器,等额本息计算器。
houseLoanCalc
组合计算器:公积金贷款、商业贷款组合计算
- {float} comLoanAmount 商业贷款金额(百万)
- {float} resLoanAmount 公积金贷款金额(百万)
- {float} comRate 商业贷款年利率(年利率%) eg. 4.9对应4.9%
- {float} resRate 公积金贷款年利率(年利率%) eg. 4.9对应4.9%
- {int} comLoanMonth 商业贷款期数
- {int} resLoanMonth 公积金贷款期数
- {string} loanType 还款方式['debj', 'debx']
Example:
// 房贷计算器---组合贷款(等额本息)
const combHouseDebx = houseLoanCalc(100, 4.9, 240, 100, 3.25, 240, 'debx')
console.log('combinational house loan debx calc:', combHouseDebx)
// 房贷计算器---组合贷款(等额本金)
const combHouseDebj = houseLoanCalc(100, 4.9, 240, 100, 3.25, 240, 'debj')
console.log('combinational house loan debj calc:', combHouseDebj)
averageCapital
非组合贷的等额本金计算器
- {float} oriAmount 贷款金额(万元)
- {float} oriRate 贷款利率(年利率%) eg. 4.9%
- {int} loanMonth 贷款期数
Example:
// 房贷计算器---等额本金
const houseDebj = averageCapital(100, 4.9, 240)
console.log('house loan debj calc', houseDebj)
averageInterest
非组合贷的等额本息计算器
- {float} oriAmount 贷款金额(万元)
- {float} oriRate 贷款利率(年利率%) eg. 4.9%
- {int} loanMonth 贷款期数
Example:
// 房贷计算器---等额本息
const houseDebx = averageInterest(100, 3.25, 240)
console.log('house loan debx calc', houseDebx)