7

我有四个字段查找每月付款的公式

  1. 贷款额度
  2. 利率
  3. 贷款条款
  4. 每月支付

Formula: Monthly Payment =Loan amount * ((1 + Interest rate per annum/100) ^ Term of loan) / Term of loan / 12

现在我想找到

  1. 贷款额度
  2. 利率
  3. 贷款条款

如果填充了三个字段中的任何一个。

我还有根据利率、贷款条款和每月还款额计算贷款金额的公式。

Formula: Loan amount = Monthly Payment/ ((1 + Interest rate per annum/100) ^ Term of loan) * Term of loan * 12

但它并没有计算完美的数字。

任何人都可以给我这三个计算贷款金额/利率/贷款条件的公式(java脚本将更加感激)

4

3 回答 3

16

这是我的,

公式 :

M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]

书呆子钱包

希望这在某种程度上有所帮助

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);
}

于 2015-07-23T05:46:28.577 回答
1
var deno = (100 + Interest_rate_per_annum)/100;
var pdeno = Math.pow(deno, Term_of_Loan);
var loan_amount = (Monthly_payment * Term_of_Loan * 12) / pdeno;
于 2013-06-14T05:19:05.440 回答
1

这与@shay 给出的答案完全相同,但拼写了变量名以便我更容易理解:

// totalPayments should be the total number of payments expected to be made for the life of the loan: years * 12
// interestRate: eg. 6.2% should be passed as 0.062
function getMortgagePayment(startingLoanAmount, totalPayments, interestRate)
{
    let interestRatePerMonth = interestRate / 12;
    return startingLoanAmount * interestRatePerMonth * (Math.pow(1 + interestRatePerMonth, totalPayments)) / (Math.pow(1 + interestRatePerMonth, totalPayments) - 1);
}
于 2019-05-04T15:39:03.547 回答