In the long run, stocks have a higher return on investment than real estate. But in some circumstances, you’re better off investing in both.

Comparing the Two Returns

If you’re trying to figure out which is a better investment over the long term, you might begin by searching the internet with a simple query like “real estate or stocks better?” You’ll be surprised to find that while most sources conclude that stocks are the better long-term investment, there are writers that come to the opposite conclusion. But not all of these writers rely on appropriate data.

The best source of information on the annual returns of stocks is the Federal Reserve. The Federal Reserve database in St. Louis (acronym FRED) is the source used here. The FRED database tabulates the annual returns of the S&P 500 index from 1928 to 2017.

The arithmetic average over those 89 years is 11.53 percent. The geometric average for the same period is 9.65 percent. For various reasons, the latter is a better indicator when assessing ROIs — if you’re curious why this is so, you can read more about the differences between them here.

While a very long view of ROIs is useful to give you a general idea of the range and volatility of an investment, in some ways a shorter view is better. The economy is in a continuing state of flux and inevitably some changes favor or disfavor specific investments and investment strategies.

For that reason, here we’ll first use the averages for the past 10 years. For the 10 years from 2008 through 2017, the arithmetic average return on investments in the S&P 500 is 10.27 percent. The more useful geometric average is 8.42 percent.

The best source of primary price data for the residential real estate market is the Case-Shiller Home Price Index, a database begun by Nobel economist Robert Shiller and his associate Karel Case. If you’re looking it up online, the formal name is now “The S&P CoreLogic Case-Shiller U.S. National Home Price Index.”

I’m using the index for the residential market because most individual real estate investors invest in rental housing. In January 2008, the Index stood at 171.1. In January 2018, the Index stood at 196.4. A return on investment calculator shows that the average annual ROI for the 10-year period is only 1.39 percent.

The difference in the two returns is striking and to some extent anomalous. Over a longer period, the Case-Shiller index has averaged around 6 percent. But that’s still a considerable difference.

Over a 30-year period, a time frame often chosen by retirement-minded investors, the stock market’s annual return of more than 8 percent on a $300,000 investment produces a retirement portfolio worth about $3,450,000. The residential market’s 6 percent return on the same investment produces a 30-year return of $1,720,000. (Both returns are calculated without including the effects of inflation).

Some Conclusions

One reasonable conclusion you could draw from this comparison is that in the long run you’re better off investing in stocks than in residential real estate.

But you might also consider investing in both. The stock market and the real estate market are only weakly correlated— that is, rising and falling prices in one market don’t necessarily mean similar movements in the other.

Economists, who disagree about many things, are almost entirely in agreement that a good way to lower your investment risk is to diversify your investments by investing in markets that are independent of one another. For that reason, investing in stocks, but also investing in real estate, although it has a lower return, lowers risk.

Because each investor’s situation — importantly, their wealth, time to retirement and tolerance for risk — is unique, it’s not possible to recommend specific percentages, but one rule of thumb is that the percentage invested in real estate can be similar to the percentage invested in foreign funds. For older investors, this might be around 5 percent. For younger investors, as much as twice that.

Index investing allows you invest in real estate without the labor and risk of investment in individual rental properties. Among well-known real estate funds are the Dow Jones U.S. Real Estate Index (DJUSRE) and the various S&P CoreLogic Case-Shiller Home Price Indices. Using the Case-Shiller National Home Price Index gives you the broadest coverage.

Selecting Case-Shiller indices for individual regional markets increases risk but may also elevate returns. Over the past 10 years San Francisco residential real estate — and therefore its price index — have outperformed all other regional markets. Over the past 10 years, large cities and coastal real estate markets have generally outperformed markets in less populated and inland, regions.