I don't have a mortgage calculator so first I will work out a formula and then use an ordinary calculator.
Let m be the monthly payment, L the initial loan value, and r the fixed interest rate.
The initial amount is L0 and before the monthly payment the interest increases this to L0(1+r). After payment this is L1=L0(1+r)-m, which effectively becomes a new loan amount. The next month we get:
L2=L1(1+r)-m=(L0(1+r)-m)(1+r)-m=L0(1+r)2-m(1+r)-m, so after n months we have an iteration relationship:
Ln=Ln-1(1+r)-m. Now we have to calculate this in terms of L0. Using the above example we can deduce that Ln=L0(1+r)n-m(1+(1+r)+...(1+r)n-1). 1+(1+r)+...(1+r)n-1 is a geometric progression with growth rate 1+r. Call this progression P, then (1+r)P=1+r+(1+r)2+...+(1+r)n, so (1+r)P-P=Pr=(1+r)n-1 and:
P=[(1+r)n-1]/r, and Ln=L0(1+r)n-mP=Ln=L0(1+r)n-m[(1+r)n-1]/r.
After n years Ln=0 (loan paid off with interest) so:
L0(1+r)n=m[(1+r)n-1]/r, rL0(1+r)n=m[(1+r)n-1], m=rL0(1+r)n/[(1+r)n-1]. We now have the monthly payment in terms of the other variables.
We are given n=15 or 30 years=180 or 360 months, L0=$125,000 and r=2.75/12%=0.0022917 per month approx..
First calculate (1+r)n=1.0022917180=1.5099 or 1.0275360=2.2797.
m15=0.0022917×125000×1.5099/0.5099=$848.25,
m30=0.0022917×125000×2.2797/1.2797=$510.31.
The total amount paid over 15 years is $152,685.27 and over 30 years is $183,710.29.
The total interest paid is 180m15-125000=$27,685.27 or 360m30-125000=$58,710.29.
Substituting the figures L0=$200,000, r=1/240 per month (5% per annum), we get:
m=(1/240)×200000×(1+1/240)360/[(1+1/240)360-1]=$1,073.64.