这里有一个计算季度复合经常性存款的公式:
<script type="text/javascript">
function Function() {
amount = 1000;
months = 18;
intrest = 12;
quaters = Math.floor(months / 3);
monthpayment = parseInt(amount) * ((Math.pow(intrest / 400 + 1, quaters) - 1) / (1-(Math.pow(intrest / 400 + 1,(-1/3)))));
newpayment = monthpayment - amount * months;
document.getElementById("MaturityAmt").value = monthpayment.toFixed(2);
document.getElementById("IntrestAmt").value = newpayment.toFixed(2);
document.getElementById("Deposit").value=(monthpayment.toFixed(2)-newpayment.toFixed(2))
}
要在这里改变以获得每年复合的定期存款:例如: 本金额为1000个月分期付款,每年按12%的利率复利。
总投资:18000 到期价值:19713.24,获得的利息:1713.24
答案 0 :(得分:0)
试一试: parseInt(amount)*((Math.pow(intrest / 100 + 1,quaters) - 1)/(1-(Math.pow(intrest / 100 + 1,( - 1/3)))));