本文介绍了如何计算javascript中的抵押贷款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有四个字段查找每月付款的公式
I have formula for finding monthly payment with four fields
- 贷款金额
- 利率
- 贷款条款
- 每月付款
- Loan Amount
- Interest Rate
- Terms of loan
- Monthly Payment
公式:每月付款=贷款金额*((1 + +每年利率/ 100)^贷款期限)/贷款期限/ 12
现在我想找到
- 贷款金额
- 利率
- 贷款条件
如果填写了三个字段中的任何一个。
if any of three fields are populated.
我还有根据利率,贷款条件和每月付款计算贷款金额的公式。
I have also formula for calculating loan amount based on interest rate, terms of loan and monthly payment.
Formula: Loan amount = Monthly Payment/ ((1 + Interest rate per annum/100) ^ Term of loan) * Term of loan * 12
但它没有计算完美的数字。
But it does not calculating perfect figure.
任何人都可以给我这三个计算贷款金额/利息的公式loa的费率/条款n(将更感谢java脚本)
Any one can give me these three formulas for calculating loan amount/interest rate/terms of loan (java script will be more appreciated)
推荐答案
这是我的,
公式:
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
Hope这有点帮助
var M; //monthly mortgage payment
var P = 400000; //principle / initial amount borrowed
var I = 3.5 / 100 / 12; //monthly interest rate
var N = 30 * 12; //number of payments months
//monthly mortgage payment
M = monthlyPayment(P, N, I);
console.log(M);
function monthlyPayment(p, n, i) {
return p * i * (Math.pow(1 + i, n)) / (Math.pow(1 + i, n) - 1);
}
这篇关于如何计算javascript中的抵押贷款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!