According to the Federal Reserve Bank of St. Louis, the median home sales price in the first quarter of 2009 was $208,400. In the fourth quarter of 2021, the median home sales price was $423,600, more than doubling in 13 years. But that doesn’t tell the whole story.
Over the past few years, home prices in certain locations have risen far faster. According to Redfin, the median home price in Los Angeles has risen 14 percent compared with last year. Zillow reports that the typical home in Boise, Idaho, rose 20.6 percent in value over the same period. And according to the S&P CoreLogic Case-Shiller Index, home prices in 2021 rose 32.6 percent in Phoenix, 30.8 percent in Tampa and 28.1 percent in Miami — in a single year.
If you bought your home in a top-20 metro area a while ago, perhaps during the “Great Recession” or even 30 or 40 years ago, it’s likely that your property has seen a significant increase in value. If you’re getting ready to sell, you may imagine that you may have a significant capital gains tax bill to pay. And, that capital gains tax might eat significantly into the funds you’ll have to pay for your next home, which has also increased significantly in value.
Here’s how the capital gains tax currently works: Generally, if you buy a home and live there as your primary residence for two of the past five years, you can keep up to $250,000 in capital gains tax free. If you’re married, you can keep up to $500,000 in capital gains tax free.
How do you calculate your capital gains? According to IRS Publication 523, “Selling Your Home,” add up the cost of purchasing the property, plus the cost of any material improvements you’ve made over the years (such as replacing a roof, adding a room or a pool), plus the cost of selling the property (like the commission you’ll pay). Then, subtract that number from the sales price of the home.
One of our readers asked how to calculate the capital gains on the home they demolished in 1993. They rebuilt it for about $250,000, and a year later added a swimming pool for $25,000. Their improvements totaled $275,000. Assuming they paid $100,000 for the old house, the basis (using very general figures) would be $375,000.
Let’s assume the house would sell today for $1 million. If they paid a 5 percent commission, or $50,000, they would add that amount to the basis, bringing it to $425,000. They would subtract $425,000 from the sales price of $1 million and realize $575,000 in capital gain. They could keep $500,000 tax free and would then owe long-term capital gain tax on the $75,000 at whatever their marginal tax rate would indicate.
(They may owe an additional 3.8 percent for the net investment income tax. That tax may affect those who have net investment income and adjusted gross income above certain thresholds. For 2021, the threshold was $250,000 in adjusted gross income for married couples filing jointly. They may also owe taxes to the state in which the home is located.)
Many homeowners have rented out their properties for some period of time during their years of ownership. That complicates the capital gain calculation, especially if you’ve taken depreciation and need to repay the federal government for that depreciation after you sell.
Another of our correspondents wrote: “We are selling our townhouse this year that we bought in 1996. We lived there for 17 years as our primary residence. Then, we rented it out for eight years. There will be substantial gain. How do we shelter that?”
The easiest thing to do would be to move back into the property for two years and use it as your primary residence. Then, you would meet the standard of having lived there as your primary residence for two of the past five years, which would allow you to keep up to $500,000 in profits tax free. You may still have to recapture 25 percent of the depreciation you took on the property for those years, but you would shelter a significant part (if not all) of the gains.
As you rented the home for many years, you will have to make sure that you strictly adhere to the “two out of the last five years” rules. Otherwise, you might fail the test and not be entitled to take the exclusion. IRS Publication 523 gives a number of examples on your eligibility and how the exclusion works.
As with anything that comes from the IRS, the rules can be convoluted and confusing. If you have questions, you might want to consult with a tax or financial adviser that has extensive experience in this area. What you don’t want to do is sell the home thinking you are safe only to find out that you technically didn’t fit into the exclusion and end up paying quite a bit of money to the federal government.
Alternatively, if the property is now fully a rental property, and you want to sell it, you could set up a 1031 tax deferred exchange. You would buy a rental property that costs at least as much as the property you’re selling. That would allow you to defer capital gains tax until you sell the new property. If you keep the property and pass it down to your heirs, under current tax law the property would receive a step-up in value to the current market value at the time of your death.
Be aware that 1031 exchanges can be complicated, and there are strict rules you have to follow when identifying replacement property and completing the sale. You can read some of our past columns about 1031 exchanges here and here.
Ilyce Glink is the author of “100 Questions Every First-Time Home Buyer Should Ask” (Fourth Edition). She is also the chief executive of Best Money Moves, an app that employers provide to employees to measure and dial down financial stress. Samuel J. Tamkin is a Chicago-based real estate attorney. Contact them through the website, BestMoneyMoves.com.