Only if you will sell it off when you retire.
Your retirement saving or corpus is the money which you will need to incur your expenses once you stop earning. Naturally, if you are living in a house then that can’t pay your bills. So, house is an investment for retirement only if you plan to sell it off (assuming you will be able to sell it off when required earning a good return on investment).
Also, we can actually calculate how much money you need when you retire. Thumb rules are good to have for approximations but it’s not difficult to calculate more accurate retirement corpus and how can you build it right from today.
My following articles will also help you in understanding it further.
Hope it helps.
Originally answered on Quora.