I've pondered this myself recently. I bought a house in 2004 and have just sold it for the same amount I paid for it. I've probably put a minimum of €60,000 into it over ten years. Obviously I haven't gotten any of that back.
I have paid approx €120,000 in mortgage payments & reduced the amount outstanding by €85,000. So have I really lost €60,000? I don't think I have.
It has cost us €120,000 + €60,000 - €85,000 = 95,000 to live here for ten years.
On the other hand we have paid an extra €17,000 to move to another house (not counting fees & stamp duty etc). That house would have cost an extra €50,000 us stamp duty of about €35,000 back in 2004. So we've traded up for €17,000 plus stamp duty rather than €85,000.
I think it might be like statistics you can argue this any way you want.