I'm working out the loan repayments using the amortization formula
$$\frac{\text{principal} \cdot \text{paymentPercentageInDecimal}}{1 - (1 + \text{paymentPercentageInDecimal})^{-\text{payments}}}$$
I'm confused about the final month. Due to rounding the last month is always a few units below the payment, should the last month's payment be just on the remaining principal or should it have interest applied and be equal to the full amount?
An online calculator (https://www.drcalculator.com/mortgage/ie/) gives (for principal 10000, annual interest 11%, 8 years(monthly interval)
Total interest 5.080.09 Total payments 15,080.09
However the balance for the final month is 155.66 where payment should be 157.08.
My calculations match this calculator except I reduce the payment for the final month to 155.66. Which is correct?