居所贷款计算公式(算法)?

时间:2009-09-17 06:23:12

标签: algorithm

银行如何计算房屋贷款的付款?

例如,

$1,000,000 at 5.00% over a 25 year period.
Monthly payment: $5,845.90


              Current Payment                                 To Date
Payment  --------------------------        ----------------------------------------------
Number   Interest         Principal        Interest Paid    Principal Paid    Balance
1        $4,166.67        $1,679.23        $4,166.67        $1,679.23         $998,320.77
2        $4,159.67        $1,686.23        $8,326.34        $3,365.46         $996,634.54
3        $4,152.64        $1,693.26        $12,478.98       $5,058.72         $994,941.28
4        $4,145.59        $1,700.31        $16,624.57       $6,759.03         $993,240.97
5        $4,138.50        $1,707.40        $20,763.07       $8,466.43         $991,533.57
6        $4,131.39        $1,714.51        $24,894.46       $10,180.94        $989,819.06
7        $4,124.25        $1,721.65        $29,018.71       $11,902.59        $988,097.41
8        $4,117.07        $1,728.83        $33,135.78       $13,631.42        $986,368.58
9        $4,109.87        $1,736.03        $37,245.65       $15,367.45        $984,632.55
10       $4,102.64        $1,743.26        $41,348.29       $17,110.71        $982,889.29

我正在尝试在Excel中进行相同的计算,但我得到另一个数字......

3 个答案:

答案 0 :(得分:3)

算法很好地展示和讨论here(在Javascript中) - 在Excel的VBA,Javascript,Ruby等中实现完全相同的算法,你会得到几乎相同的结果! - )< / p>

答案 1 :(得分:3)

魔术词是amortization schedule

答案 2 :(得分:2)

您在Excel中看到的差异可能与计算复利的方式有关。大多数银行每天都会增加复利(获得更多资金)。

维基百科文章中有nice example美国银行使用的等式。你可以编写代码。