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.