Buying a house is widely considered to be one of the best investments you can make. If you own your home, then your housing payments are being put to use to pay off your mortgage and eventually make the house 100% yours. Rent payments are simply gone forever. But some homeowners think of their houses as more than just homes: They expect to make a substantial profit on the purchase. Here's why that can be a really bad mindset to have.

Home prices

While it's true that home prices steadily rise over time, what many people fail to realize is that this rise has more to do with inflation than anything else. Inflation is the gradual increase in overall prices; it's the reason why a burger you could once buy for $0.10 now costs $2. Over the long haul, the average annual rate of inflation in the U.S. is about 3%. If you buy a house for $200,000 and later sell it for $300,000, once you add in the effects of inflation you may find that there was little, if any, change to the actual value of your home. During the century between 1890 and 1990, home prices rose by roughly 0.2% per year once corrected for inflation.

A For Sale sign in front of a house.

Image source: Getty Images.

Housing bubbles

The housing market doesn't always follow such a smooth pattern, though. Sometimes factors will line up to create a much greater demand for houses than the available supply can meet. When demand is much higher than supply, a steep rise in prices is inevitable. This can create a "bubble" during which prices soar way above the actual value of whatever is being sold.

After the 2000 dot-com crash in the stock market, investors became leery about stocks and started looking for another place to put their money. Low interest rates made mortgages relatively cheap, so real estate looked like a terrific alternative to the stock market. As prices rose thanks to the higher demand, "flipping houses" seemed like a sure-thing investment: Buy a house, hold it for a couple of years, and then sell it for several times the original price.

Unfortunately, no bubble lasts forever. The housing market became so overheated that borrowers could no longer keep up with their mortgage payments, resulting in a wave of foreclosures that nearly crashed the entire U.S. banking system. Consumers who'd bought their houses at inflated prices saw the value of their homes tumble. Many people ended up "underwater," meaning they owed more on their mortgages than the house was now worth.

The real value of a homeownership

Buying your own house really is a great idea, but not if you're buying it for investment purposes. Over the long haul, real estate produces much lower returns than stocks do (indeed, stocks are one of the few investments that reliably beat inflation). Buying a house with the idea of using it to pay for your retirement or for Junior's college education will almost inevitably result in disaster.

The true value of owning your own home is the fact that it makes inflation work for you. If you rent a house, you can expect your rent payments to rise over time as inflation and other factors raise prices as a whole (and your landlord responds by hiking up the rent). If you buy a house using a fixed rate mortgage, your base housing payment will stay the same year after year. Yet inflation will make that housing payment a smaller and smaller percentage of your overall budget, as prices (and hopefully your income) rise steadily over time. By the time you reach the end of a 15-year mortgage, your housing payment will probably look much smaller to you than it did when you started -- even though the dollar amount of the payment hasn't changed. Now there's a way to make your money work for you.

The Motley Fool has a disclosure policy.