擅长:python、mysql、java
<p>这基本上是一个<a href="http://en.wikipedia.org/wiki/Mortgage_calculator" rel="noreferrer">mortgage repayment calculation</a>。</p>
<p>假设开始时间大于结束时间,并且利息在0和1之间(即10%利息为0.1)</p>
<p>首先考虑一下你想付清的那部分款项。</p>
<pre><code>Principal = start - end
</code></pre>
<p>每月付款方式如下:</p>
<pre><code>pay_a = (interest / 12) / (1 - (1+interest/12) ^ (-months))) * Principal
</code></pre>
<p>然后你需要考虑额外的利息。等于剩余本金乘以月利息</p>
<pre><code>pay_b = interest / 12 * end
</code></pre>
<p>所以总的付款是</p>
<pre><code>payment = (interest / 12) * (1 / (1 - (1+interest/12) ^ (-months))) * Principal + end)
</code></pre>
<p>你举的例子</p>
<pre><code>Start: 100000
End: 50000
Months: 70
Interest: 8%
pay_a = 896.20
pay_b = 333.33
Payment = 1229.54
</code></pre>
<p>当我在Excel中测试这些值时,在70次付款后,重做贷款是50000。假设你在每月付款前支付名义利息。</p>