To do simple interest for a year, the formula is trivial. Convert the interest from percent to decimal (e.g., 5% = 0.05) and the formula is (1 + i) amount to be compounded. For more years compounded annually, it's Amt (1 + i) ** years. To compound it more often than once a year, divide the interest by the number of periods and multiply years by the same amount. If you compound it monthly, divide i by 12 and replace years by months in the exponent.
In mortgage.htm, that value is calculated as x on line 75 to be used in a mortgage calculation on line 77. On line 71, the interest rate percentage is divided by 100 and 12 to make it a decimal value and determine the monthly interest rate.