Unless your house appreciates considerably ever year, you will pretty much always sell at a loss when you factor in the interest paid over your time as owner. This is not even including incidental expenses like appliance repair or extra warranties hi might purchase to "protect" you from said incidental costs.
In short, from a financial standpoint the math on buying a house with a mortgage never works out in your favor. It's not even close. I am looking at this from a purely mathematical standpoint. I do undere that there are qualitative reasons that owning beats renting; however, I'm sick of hearing people try to make the case that a home is an investment, which is true only if you ignore the interest paid.
EDIT: if you did sell early in in the loan you could treat the money lost to interest as an implicit rent. This makes me laugh because you could've just rented in the first place and had the benefit of mobility and avoided the headache of putting a house on the market.