What's a better investment: San Francisco real estate or Apple stock?

I want to delve into a question about comparing a San Francisco home to inflation, gold, the S&P 500 & Apple stock. With home values at historical highs in the City, which would give you the greatest rate of return?

Illustrated above is the cash investment side of buying a home and the compound annual return on that investment if one had purchased a median SF house in 1994.

While Apple stock is clearly the winner, a 14.4% compound annual rate of return on your SF property makes for quite an investment. Keep in mind that there are a few factors that would increase your rate of return from your home:

  1. Capital Gains Exclusion: For a primary residence, homeowners are allowed to exclude up to $250,000 or $500,000 (if married filing jointly) of gain from being taxed.

  2. Tax Deductions from Mortgage Interest: You may deduct any mortgage interest paid towards your home as well. While there are some limitations on mortgages with a principal balance over $1m dollars, the cumulative deductions over 30 years makes a difference.

  3. Tax Deductions from State Property Taxes: There are additional deductions you may take based on your California state property taxes paid. 

In the San Francisco real estate market, your home is a valuable asset that appreciates in value, provides tax benefits, and offers multiple avenues for accumulating wealth.