The formula for amortization is shown in the following image:
In this formula,
A is the amortization amount that will be paid per period,
P is the principal or loan amount, r is the interest rate per period, and
n is the total number of periods.
This page demonstrates the use of the Python amortization library to solve calculate the amortization amount and generate amortization schedules.
For in-depth tutorial and discussions on how to use the Python library, read the blog Calculating Amortization with Python.