I wondered about this problem too, so I looked into the maths and made this app :-

http://demonstrations.wolfram.com/BuyOrRentInvestmentReturnCalculator/

(It uses the free Wolfram computable-document format (CDF) Player.)

If you try it out you can see what conditions favour renting vs buying.  My own conclusion was to aim to buy a property outright upon reaching retirement age, if not sooner.

**Example**

This example compares buying a £400,000 house with renting for £1,000 a month while depositing equivalent amounts (in savings) to total the same monthly outgoings as the buyer.  Mortgage rate, deposit rate, property appreciation and rent inflation can be variously specified.  The example mortgage term is 20 years.  As you can see the buyer and renter come out about even after the mortgage term, but the buyer comes off better after that, (having no more mortgage to pay).  Of course, the rent to live in a £400,000 house would probably be more than £1,000 but this case shows an equivalence point.

![enter image description here][1]


  [1]: https://i.sstatic.net/6qaN1.png