The calculation method for one-time early repayment of equal amounts of principal is as follows:
Equal amounts of principal, number of months = year*12, monthly interest rate = annual interest rate/12
The monthly principal is the same = loan amount/number of months
N-month interest: [(loan amount-loan amount*(N-1)/number of loan months)]*monthly interest rate
M-month early repayment:
Amount of principal repaid: loan amount*M/number of months
Early repayment amount = loan amount-loan amount*M/loan month number.