Columnist

If you live in a high-cost area, you may wonder whether it’s worth it to buy a home when real estate prices are through the roof.

You have only so much money. If you purchase a house, there’s less — far less — to save for retirement. So the question becomes: Do you forgo homeownership in favor of putting money in your workplace retirement account?

This is the situation with a reader who wonders whether he made the right financial decision.

I’m in my mid-50s working in tech since the late 1990s in San Francisco, but I’ve not been smart or lucky enough to get rich,” he wrote. “And I don’t make enough to get a foothold in this city’s crazy real estate market. Prices keep shooting up beyond my comfort level. For years, I’ve followed the mantra to put money away in a 401(k). But now, as I see the prospects of owning a home recede, I wonder if that mantra was in fact misleading?”

Read: Loads of houses are for sale — but middle-class buyers are still shut out

He continued: “Looking back now after more than 20 years of living and working here, it seems that it would have been better if I had plowed my money into a home — which would have seen incredible appreciation over two decades — versus putting money into retirement mutual funds. As it is, I’ve gotten decent (even amazing) gains in my 401(k) account, but putting my savings there meant that money hasn’t been available for a home’s down payment and mortgage. So I’ve remained a renter.”

His bottom-line concern: “This makes me think that at some level, the advice to put money into 401(k)s can be pretty bad for a lot of people, because that money isn’t available to use for a down payment and mortgage,” the reader wrote. “It seems that the advice to sock money away in a 401(k) is self-serving for the 401(k) industry. I can’t be the only person who’s gotten stuck in a ‘hot’ real estate market. Have we all followed the advice to put money into our 401(k), to our detriment, as home affordability has become ever more difficult?”

It is true that for many Americans, their net worth is mostly attributable to their home equity. Yet there are many experts who will tell you that buying a home isn’t a great investment.

“In general, if someone plans to live in a place for a very long time, and loves the area, we do encourage a home purchase, but not because it could be a good investment,” says Carolyn McClanahan, a physician-turned-certified financial planner who founded the fee-only Life Planning Partners, based in Jacksonville, Fla. “We encourage it because it is a way to reduce future housing costs when the home is totally paid off or builds equity for the next home purchase. If you need flexibility to move, renting is a better option. If you are lucky, you’ll make money on your home purchase and have a bigger nest egg. The past 20 years have been a boon for both real estate and the stock market — the problem is, in hindsight, who would know what would have won? We could have a bear market for the next 20 years but we can’t predict the future."

If you compare the inflation-adjusted return on a house with investing in equities, stocks win the race based on historical returns.

“For the majority of U.S. history — or at least as far back as reliable information goes — housing prices have increased only slightly more than the level of inflation in the economy,” Sean Ross wrote recently for the online financial website Investopedia. “Only during the period between 1990 and 2006, known as the Great Moderation, did housing returns rival those of the stock market. The stock market has consistently produced more boom and busts than the housing market, but it has also had better overall returns as well.”

Ross notes that the Case-Shiller Housing Index reports that “the average annualized rate of return for housing increased 3.7 percent between 1928 and 2013. Stocks returned 9.5 percent annualized during the same time."

“For families that own their primary residence, mean net housing value — defined as the home’s value less any debts on the home — increased 20 percent between 2013 and 2016 after slightly declining between 2010 and 2013,” according to the Federal Reserve’s Survey of Consumer Finances. “In 2016, among home-owning families, the average net housing wealth was $197,500.”

But it’s also true that renters aggressively saving for their retirement over several decades could amass similar wealth investing in a workplace plan.

Even in expensive areas of the country where the market value of homes appreciates greatly, to get to the equity that has built up you either have to sell or take out a home-equity loan or line of credit. So, you could end up house rich and cash poor, meaning all your money is tied up in your home. And, if you sell your home, you still need a place to live.

You could extract your equity through a reverse mortgage, but that isn’t for everyone. A reverse mortgage allows people who are 62 or older to borrow against their home’s equity.

Read: Can a reverse mortgage help save an underfunded retirement?

If you’re getting close to retirement and you’re second-guessing having to rent, don’t neglect to factor in that homeownership comes with a lot of expenses that renters don’t have, such as taxes, insurance and maintenance. Plus, with the housing bust, many people are still underwater, meaning they owe more on their homes than they are worth.

Read: A self-made millionaire who retired at 37 says buying a home was 'probably the worst financial decision' he ever made

“Declines in house prices in particular had a disproportionate effect on families in the middle of the net worth distribution, whose wealth portfolio is dominated by housing,” the Federal Reserve report found.

If you’ve saved well as a renter, you aren’t necessarily worse off because you didn’t buy a home.

Read: Should you rent or own a home in retirement?

“People aren’t saving enough for the day they can no longer work,” McClanahan says. “The 401(k) industry has benefited but it is a stretch to say putting money in a 401(k) account is wrong. The real answer is people need to make decisions early in their life about the different ways to save.”

Your Thoughts

Are you a renter who now regrets not having bought a home as you get closer to retirement? Are you retired but still renting? What’s your perspective on saving for retirement vs. buying a home?

Read more:

Should I rent or buy a home? That’s not the only question you should be asking.

It turns out Americans weren’t ready to become a nation of renters. Homeownership is back in.

To deal with high housing costs, more married couples are taking in roommates

Retirement Rants and Raves

I’m interested in your experiences and concerns about retirement and aging. What do you like about retirement? What came as a surprise?

If you haven’t retired yet, what concerns you financially?

You can rant or rave. This space is yours. It’s a chance for you to express what’s on your mind. Send your comments to colorofmoney@washpost.com. Please include your name, city and state. In the subject line, put “Retirement Rants and Raves.”

Subscribe and stay informed

If you’re viewing this post online, sign up to automatically receive Michelle Singletary’s newsletters in your email box: “Your Retirement” on Mondays and “Personal Finance” on Thursdays

Read and share Michelle Singletary’s Color of Money Column on Wednesdays and Sundays in The Washington Post. You may also see the column in your local newspaper.

Follow Michelle Singletary on Twitter @SingletaryM and Facebook.