贷款金额:100元(先以100元为例,来对比下公积金贷款和商业贷款)
公积金贷款年利率: 3.25%
商业贷款的年利率: 4.90%
贷款期限:360个月(30年)
还款方式:等额本息
计算公式:之前博文推导过, 用等比数列搞起即可
go代码如下:
package main
import (
"fmt"
"math"
)
func get_pmt(f_interest_rate float64, term_number int, principal int) float64 {
compound_rate := math.Pow(1 + f_interest_rate, float64(term_number))
pmt := float64(principal) * f_interest_rate * compound_rate / (compound_rate - 1)
return pmt
}
func main(){
n := 360
year_month := 12
p := 100
r1 := float64(0.0490) / float64(year_month)
r2 := float64(0.0325) / float64(year_month)
a := get_pmt(r1, n, p) * float64(n) - float64(p)
b := get_pmt(r2, n, p) * float64(n) - float64(p)
fmt.Println(a, b)
}
结果:91.06161942420968 56.67427486605655
也就是说,如果用商业贷款100元,利息大概是91元。如果用公积金贷款100元,利息大概是57元。
来看看链家的计算结果:
实际上,公积金贷款的最大金额是90万(有要求),其余的缺口需要用商业贷款, 即组合贷款。
下面来具体算算买450万房子和500万房子的月供情况:
package main
import (
"fmt"
"math"
)
func get_pmt(f_interest_rate float64, term_number int, principal int) float64 {
compound_rate := math.Pow(1 + f_interest_rate, float64(term_number))
pmt := float64(principal) * f_interest_rate * compound_rate / (compound_rate - 1)
return pmt
}
func get_month_provide(price int) {
n := 360
year_month := 12
gongjijin_loan_limit := 900000
shoufu_rate := 0.3
r1 := float64(0.0490) / float64(year_month)
r2 := float64(0.0325) / float64(year_month)
month_provide := get_pmt(r2, n, gongjijin_loan_limit)
month_provide += get_pmt(r1, n, int(float64(price) * (float64(1) - float64(shoufu_rate)) - float64(gongjijin_loan_limit)) )
fmt.Println(month_provide)
}
func main(){
get_month_provide(4500000)
get_month_provide(5000000)
}
结果:
15858.20808566452
17715.751607844337
如上就是月供金额情况。 来看看链家的计算结果:
最后,来给一个近似的月供公式, 其中x是买房的房价:
m = ((0.7 * x - 900000) * 1.9106 + 900000 * 1.5677) / 360
= 37.15 * (x/10000) - 860
= 37.15 * y - 860
= 37 * y + 0.15y - 860 (以深圳房价为例,近似认为0.15y和60相等)
= 37 * y - 800
所以,买450万的房子和买500万的房子的月供分别为:
m(450万) = 37 * 450 - 800 = 15850 (和实际值15858非常接近)
m(500万) = 37 * 450 - 800 = 17700 (和实际值17715非常接近)
当然啦,除了月供, 还有首付的30%,还有这费那费, 多得很。
所以, 买房的总支付是: 首付 + 这费那费 + 月供*360
最后,如果不使用组合贷,而纯使用商业贷, 那么月供是多少呢?
容易大致计算出: m = 37.15y = 37y + 60 (可以看到,纯商业贷的月供比组合贷的月供贵大约860元)
相似问题