最近你有想过提前还贷吗?
以前,欠别人的是大爷,借别人钱的是孙子。
现在好像反过来了呀,想还钱成了孙子。
现在,各种银行以各种方式增加你提前还贷的难度。
比如第一步,关闭app线上还款入口
第二步,需要提前预约
第三步,需要现场办理
第四步,需要工作日去
第五步,现场去了排号
一系列操作各种下来,呵呵呵
我也动起了歪脑筋,我也想还,于是想着拿出各种借贷利率计算工具,发现不大好折腾...算了,我自己来写个自己算吧。
等额本息,大家大部分是这个,公式:
等额本息还款法每期还款额=贷款本金×月利率×(1+月利率)^还款月数÷(1+月利率)^还款月数-1。
现在大家都聪明了,知道这种方式开始都是还的利息,我们缩短年限,就可以完美的减少还贷年数了。
那么找来的借贷利率计算工具好像并不好使。于是就有了下面的代码:
public class BankLoans {
// 贷款额度 200w
static double totalLoans = 2000000;
// 贷款年利率,贷款详细里面可以找到
static double rateYear = 0.0558;
// 剩余还款期数:28年零6个月
static int month = 28 * 12 + 6;
// 现还贷
static double returnTotal = 100000;
public static void main(String[] args) {
double rateMonth = rateYear / 12;
double monthPay = monthPay(totalLoans, rateMonth, month);
// 月还款
System.out.println("历史每月还款:" + monthPay);
System.out.println("如果还款期数不变,每月可少还:" + (monthPay - monthPay(totalLoans - returnTotal, rateMonth, month)));
// 现还贷10w能少还多少个月
double base = 1 + rateMonth;
double value = monthPay / (monthPay - (totalLoans - returnTotal) * rateMonth);
double monthNow = log(value, base);
System.out.println("如果每月还款不变,可少还月数:" + (month - monthNow));
}
// 每月还款数,等额本息计算公式
private static double monthPay(double totalLoans, double rateMonth, int month) {
return (totalLoans * rateMonth * Math.pow((1 + rateMonth), month)) / (Math.pow((1 + rateMonth), month) - 1);
}
// 对数计算
public static double log(double value, double base) {
return Math.log(value) / Math.log(base);
}
}
修改其中的部分参数,可以计算自己还贷金额跟少还月数,对比起,每个月少还那么几百块与少还好几年比起来,哪个会比较香。
ps:目前基于各大银行的骚操作,听说各种投诉可以加快那么一点点进度。大家可以去试试