To calculate your mortgage payment manually, apply the interest rate (r), the principal (B) and the loan length in months (m) to this formula: P = B[(r/12)(1 + r/12)^m)]/[(1 + r/12)^m - 1]. This formula takes into account the monthly compounding of interest that goes into each payment.

**Determine the principal, rate and mortgage length in months**Consider a home purchase in which the buyer purchases a home for $400,000 and puts down $80,000, leaving a principal of $320,000. Assume an interest rate of 5 percent and a mortgage that lasts 30 years, or 360 months.

**Fit the numbers into the formula**Designate the principal as B, the interest rate as r, and the number of months in the mortgage as m. Write the interest rate in decimal form (0.05) when you insert it into the formula.

**Plug the numbers into the formula to finish the calculation**Add the numbers to the formula. Use the numbers from Step 1 to complete the example: P = 320000[(0.05/12)(1 + 0.05/12)^360]/[(1 + 0.05/12)^360 - 1]. Calculate this to yield $1,717.85. Alter the length of the loan in your calculations to see if going to a 15-year term is feasible, as the interest savings are significant.