We derived a model to compute the penalty of Residential Mortgage in the case clients prepay their mortgage. The penalty conditions are described in the terms and conditions posted by the bank. We used these terms and conditions to derive a theoretical penalty. This approach allowed us to make a model, which doesn’t depend on statistical analysis.