When you use a mortgage calculator sometimes the results coming with a graph as well showing interest and principal paid every month. Image below...
Is there a formula/function that defines those lines individually, such that I can plug in any month number and get the amount paid for the respective line. For example, for the interest paid line, given month 14, what is the interest paid for month 14.
On the Wikipedia page for Mortgage Calculator, they have this graph (below)...
The blue shaded line/area is remaining principal balance. I was able to find the forumla/function of that line on the page. So for any given month, you can calculate the remaining principal. On the same page, there is a formula to calculate the total/aggregate interest paid for any given month.
But I'm not able to find a formula/function to find the principal paid or interest paid for any given month without going through multiple steps.