Is buying a house a better investment than the stock market? We did the math, and the answer is clear – Business Insider

Home ownership is one of the biggest financial commitments most Americans will make, while investing in stocks is widely seen as a key component of building wealth.

We decided to take a look at how housing prices and stock prices have fared over the years.

Using house-price indexes from the Federal Housing Finance Agency and prices for the S&P 500 from Yahoo Finance going back to 1991, we looked at how the two compared at various times in the past 27 years, as well as how housing prices in some of the biggest cities in the US have fared against stocks.

In most cases, stocks have outperformed housing prices over the decades, as a nine-year bull market continues to roar.

It’s worth noting that this is a very simplified comparison. Stocks and houses are, of course, two very different types of investments. Home ownership comes with property taxes and upkeep costs, but also provides the key service of being a place for someone to live that stocks clearly do not. Stock ownership can involve brokerage and other fees.

Further, stock prices tend to be more volatile over time than housing prices. While it is possible to accrue great riches in the stock market, it’s also quite possible to lose it all. Housing prices have tended to rise more steadily over time, but as the mid-2000s housing bubble and subsequent bust showed, that increase is far from guaranteed.

Given those caveats, here’s how two of the most important financial markets for ordinary Americans have evolved over the past three decades.