Learn how interest rates/APR affect monthly payments, and how the length of a loan affects total interest paid.This tutorial gets into more than how the length of a loan affects monthly payments.This tutorial will include:How a Monthly Payment (Equated Monthly Installment) is Calculated.How Interest Rates/APR Affect Monthly Payments.How the Length of a Loan Affects Total Interest PaidAs always, the code used in this tutorial is located on my GitHub..Equated monthly installments are used to pay off both interest and principal each month, so that over a specified number of years, the loan is paid off in full.A monthly payment can be calculated using an EMI formula similar to the one below.Example: Calculating a Monthly Payment (Simplified)I want to upgrade my car from a 2002 Toyota Sienna to a 2019 Toyota Sienna.Say I buy want to buy a 2019 Toyota Sienna for $31,115..For the purpose of this tutorial, let’s make it mathematically easier and assume APR and interest rate are the same.By looking at the table below, it is clear that your FICO score affects your APR which affects your monthly payments.Source: The Simple DollarIf you are curious how The Simple Dollar was able to calculate the Total Interest Paid, read the next section..Using the same principal ($34689.96) and interest rate (7.02%) from the Calculating a Monthly Payment (with some fees included) section, the graph belows shows that with every subsequent monthly payment, the principal paid keeps on rising while the interest paid keeps on lowering.Dollars that go towards interest and principal each month from a monthly payment (EMI) of 687.23 with an interest rate of 7.02%Now let’s calculate the total interest paid by producing a table similar to the one below and then sum the Interest Paid column.Notice how much interest and principal are paid each month.While I will do this in Python, feel free to do this in a spreadsheet or whatever you feel comfortable with.1-) The first thing is to calculate how much money of the monthly payment will be paid towards interest in a month.2-) Each month, some of the monthly payment is paid towards principal and some towards interest..In particular, the difference between a 3.59% interest rate vs a 7.02% interest rate over a 60 month term.Code to generate tables of total interest paid for different interest ratesBy using the same calculation method as the previous section, the lower interest rate would save $3285.63 (6543.51 — 3257.88) in total interest paid..I should note that Credit Karma has a guide on refinancing your auto loan and NerdWallet has a few ways to avoid to overpaying for your car loan.How the Length of a Loan Affects Total Interest PaidIn general, with the same interest rate, the longer the length of your loan, the more total interest..While the 72 month loan has a monthly payment (EMI) lower than the 60 month loan (591.76 vs 687.23), the loan will cost more in total interest paid.The graph above shows that the 72 month loan costs $7916.58 in total interest whereas the 60 month loan costs $6543.51 (72 month loan costs $1373.07 more).. More details