If you paid $21,947 in interest in the 20th year, then after adjusting for the inflation rate, which is about $13,566, that would be the value. If we change the inflation rate to 5 percent throughout the 30-year loan, with a mortgage rate of 2.5 percent for a term of 30 years, it will generate total interest of approximately $844,870.47 nominal value and interest paid in total $536,410.68 present value. Typically, two inflation rates are quoted – the underlying inflation rate based on retail prices and the rate based on the average expenditure of the family, which includes the cost of mortgages. So, if your mortgage repayments increase, it makes sense that the rate of inflation that includes repayments is also increasing. more info here
This means that inflation depends on your mortgage rates, but it is also true that the rate of inflation depends on your mortgage rates. How does it work the other way around if interest rates reflect variables, including mortgage rates? When inflation changes, what happens to the mortgage rates?