Today is the 20th anniversary of Amazon’s IPO. In case you haven’t noticed, Amazon has been on quite the hot streak. Investors are cheering as the stock hits new a new high every few weeks. In many ways, Amazon stock is closely related to another local commodity that is on fire lately: Seattle real estate.

Let’s take a look at how the return on those two hot investments compare to each other.

Back in May of 1997, the median price of a single-family house in Seattle was about $205,000. If you started with a typical 20 percent down payment, your initial investment in your home would have been around $41,000. As of April, data from the Northwest Multiple Listing Service shows that Seattle’s median house price has shot up to $722,250—an all-time high.

If you sold a home today for $722,250 that you bought in 1997 for $205,000, you would end up with about $568,000 after paying real estate agents (6% – $43,335), excise tax (1.78% – $12,856), and the remaining balance of your 30-year mortgage ($98,000). That’s a 1,285 percent return on your initial investment. Nice!

Now let’s see how that stacks up to $AMZN …

On May 15, 1997 Amazon sold 3 million shares at $18 per share. The price fluctuated a bit over the first few days, but stayed at around that price until early July that same year, giving plenty of time for average Joe investors to buy in close to the IPO price. Let’s say instead of buying a Seattle home, you took your $41,000 and put it all into Amazon stock, buying 2,278 shares at the $18 per share IPO price.

Three stock splits (two 2:1 and one 3:1) and twenty years later, you now hold 27,336 shares of Amazon, worth $26,242,560—a return of 63,900 percent.

It’s not even a close race. Amazon stock has absolutely walloped Seattle real estate as an investment over the last twenty years, with nearly fifty times larger returns.

To put it another way… The most expensive home on the market in Seattle is currently 814 East Highland Drive, an 11,000 square foot mansion currently listed at $15 million. If you had invested your down payment in Amazon in 1997 instead of buying a house in Seattle, today you would have enough money to pay cash for that house, and still keep $11 million in the bank.

Of course, hindsight is always 20/20. The real question is which investment will perform better over the next twenty years. Is Amazon played out, or will its stock continue to defy gravity? At least one market analyst thinks there’s plenty more price gains to come, raising his price target to $1,100 today.

As for local home prices, as Amazon’s employment growth and local footprint continues to increase, Seattle’s real estate fortunes are likely to become even more closely intertwined with Amazon’s success.

As investments go, real estate is a pretty expensive one with many added costs, and even the best real estate returns are unlikely to outperform stocks in strong companies like Amazon. Then again, you can’t live in your Amazon stock.

My advice? If you want a place to live, buy a home. If you want to make money, buy stocks.