EMI Calculator
计算您的贷款EMI并查看完整的摊销时间表。
关于此工具
EMI(等额月供)计算器帮助您通过将贷款分解成可预测的月付额来理解真正的借贷成本。无论您在规划住房购买、汽车融资还是个人贷款,提前了解确切的月供金额和总利息负担都能让您自信地制定预算,并有效地比较不同的贷款方案。
使用这个计算器很简单:输入贷款本金、年利率和所需贷款期限(以年为单位),系统会立即显示您的月供和完整的摊销表,详细说明每月付款中有多少用于利息,有多少用于本金偿还。这份详细的还款计划表能让您逐月追踪还款进度,理解利率和贷款期限变化的影响,帮助您全面掌握贷款情况。
这个工具对任何评估贷款的人都很有用。借款人可以用它来与贷款机构协商更优条件,财务顾问可以向客户展示还款方案,金融学生可以亲眼看到贷款和债务计算的原理。摊销表一目了然,让您轻松了解何时还清贷款以及需要支付多少总利息,使财务规划变得透明、易于理解。
常见问题
代码实现
def calculate_emi(principal: float, annual_rate: float, months: int) -> dict:
"""Calculate EMI and generate amortization schedule."""
monthly_rate = annual_rate / 100 / 12
if monthly_rate == 0:
emi = principal / months
else:
emi = principal * monthly_rate * (1 + monthly_rate) ** months / (
(1 + monthly_rate) ** months - 1
)
schedule = []
balance = principal
total_interest = 0
for month in range(1, months + 1):
interest = balance * monthly_rate
principal_part = emi - interest
balance -= principal_part
total_interest += interest
schedule.append({
"month": month,
"emi": round(emi, 2),
"principal": round(principal_part, 2),
"interest": round(interest, 2),
"balance": round(max(balance, 0), 2),
})
return {
"emi": round(emi, 2),
"total_payment": round(emi * months, 2),
"total_interest": round(total_interest, 2),
"schedule": schedule,
}
result = calculate_emi(principal=500000, annual_rate=8.5, months=240)
print(f"Monthly EMI: {result['emi']}")
print(f"Total Payment: {result['total_payment']}")
print(f"Total Interest: {result['total_interest']}")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.