They are calculated using the French repayment system. The monthly payment will be calculated at the beginning of each interest period and will be fixed for the duration. The payment may vary in each interest period and during the period if a partial repayment is made. This calculation system makes the monthly payment as constant as possible. It can only vary if the interest rate changes or if you make early repayments.
To calculate the payments with this system, we use the following formula: (C*i/m)/(1-(1+i/m)^(-m *n), where C is the principal, i is the annual nominal interest rate, m the number of annual payments and n the years over which you're going to repay the loan.
Let's look at an example using the formula. If you have a €150,000 loan at an annual interest rate of 2.50% and you repay it monthly (12 installments a year) for 25 years, each monthly payment will be €672.93.
Here is the formula, with the sample figures: (150,000x0.025/12)/(1-(1+0.025/12)^(-12x25) = €672.93