Let's say I want to buy a house that costs X, and that I have 20% of X to put as a down payment.
But I could put only 5% of X down and I would have to pay a 3.26% insurance premium on the mortgage amount because that's the law. So I would have an extra cost of X * 0.95 * 0.0326 but, on the other hand I would have 0.15 * X to invest and earn interest on.
The question is: How can I calculate how much the interest rate must be so that it will be more advantageous to put just the 5% down instead of putting 20% down?
Edit: To make it clearer, I am looking for the formula that finds what's the interest rate I would have to make on my investments to break-even with the insurance premium.
I forgot to mention something important, the insurance premium will be added to the mortgage balance.