There is a calculation formula. Monthly mortgage = (total loan × monthly interest rate ×( 1+ monthly interest rate) number of periods (months)) /(( 1+ monthly interest rate) number of periods-1)
Monthly interest rate = annual interest rate/12; The number of installments is the total number of repayment months = loan period * 12.