How to avoid taxes when selling a rental property?

How to avoid taxes when selling a rental property?

6 min read

When you finally decide to sell your rental property, it is important to know that there are dozens of ways to handle the resulting tax bill. Some people use complex trusts, charitable remainders, or estate planning strategies. However, in most typical situations, you have three primary paths:

  • Defer the taxes forever via a 1031 Exchange.
  • Eliminate a portion of the taxes by moving back into the property (Section 121 Exclusion).
  • Cash out and proactively make Estimated Tax Payments to avoid IRS penalties.

Regardless of which path you choose, the biggest mistake landlords make is ignoring the hidden "Depreciation Recapture" tax until it is too late.

The Hidden Trap: Depreciation Recapture

Before you calculate how much you "made" on the sale, you have to account for depreciation. For every year you rented out the property, the IRS allowed you to take a deduction for the wear-and-tear on the building (usually over 27.5 years).

When you sell, the IRS wants that deduction back. Under IRC § 1250, the depreciation you claimed on the building is taxed at your ordinary income tax rate, but it is capped at a maximum of 25%. This is called "Unrecaptured Section 1250 Gain." (For example, if your standard tax bracket is 22%, you will only pay 22% on the recapture. But if your bracket is 32%, you will only pay the capped 25%). You owe this tax even if the property did not appreciate in value.

If you operated a Short-Term Rental (Airbnb/VRBO) or performed a Cost Segregation study, the trap is even more dangerous. Cost segregation allows you to rapidly depreciate components like appliances, flooring, and landscaping. However, when you sell, the IRS treats these items under IRC § 1245. Unlike building depreciation capped at 25%, Section 1245 depreciation recapture is taxed at your ordinary income tax rates—meaning you could pay up to 37% on that portion of the sale.

Once you factor in Depreciation Recapture plus standard Capital Gains taxes (which can range from 15% to 20%), plus state taxes, your tax bill can be staggering. Here is how you plan for it:

The "Cash-Out Penalty" Estimator

See how much you might owe the IRS in Capital Gains and Depreciation Recapture taxes if you sell outright without a 1031 Exchange.

How this works: The calculator assumes 80% of your purchase price was for the building (depreciable over 27.5 years). It calculates your unrecaptured Section 1250 gain (taxed up to 25%) and your remaining capital gain.

Strategy 1: Move Back In (The Section 121 Exclusion)

If you aren't in a rush to sell, the most powerful tax shield available is IRC § 121. This code section allows you to exclude up to $250,000 of capital gains (or $500,000 if married filing jointly) from the sale of a primary residence.

To qualify, you must have owned and lived in the property as your primary residence for at least two of the five years immediately preceding the sale.

But what exactly constitutes a "primary residence"? If you own two homes—for example, a house in the city and a beach house you used to rent out—the IRS applies a "majority of the time" test. To count a specific year toward your two-year requirement, you generally must live in that specific property for more than six months out of the year. You cannot simply claim it as your primary home while actually spending most of your time at your other house.

The Strategy: You kick out your tenants, move your family back into the rental property, and live there for exactly two years. When you sell, a massive chunk of your capital gains becomes tax-free.
Note: You will still have to pay the 25% depreciation recapture tax on the years it was rented, but avoiding capital gains on the appreciation is a massive win.

Strategy 2: Defer it Forever (The 1031 Exchange)

If you don't want to move back into the house but you still want to stay in the real estate game, you can use IRC § 1031 to do a "Like-Kind Exchange." This allows you to roll the proceeds from the sale directly into a new investment property, completely deferring both the Capital Gains and the Depreciation Recapture taxes.

However, the rules are ruthlessly strict.

What Happens When You Fail? A Tax Court Case Study

Tax Court is littered with landlords who tried to do a 1031 exchange but accidentally triggered a massive tax bill because of "Constructive Receipt."

A classic example is seen in the tax court case Ralph E. Crandall v. Commissioner. The trap is sprung when a landlord sells their property and the funds are handled incorrectly during the closing process. Many sellers mistakenly believe they can park the money in their personal bank account for a few days, or just leave it sitting in a standard real estate escrow account, before buying the new property.

The Court's Ruling: The moment you have access to the cash—even if you haven't spent a dime—you are in "constructive receipt" of the funds. The court has repeatedly ruled that leaving the funds in a normal escrow account does not protect you. The 1031 Exchange is immediately disqualified, and the entire tax bill becomes due.

The Fix: You must use a specifically designated Qualified Intermediary (QI). The money cannot go to your bank, and it cannot sit in a normal title or escrow account. It must go directly from the buyer to the QI. You also have exactly 45 days from the sale to identify a replacement property, and 180 days to close. Miss those deadlines by a single day, and the IRS will tax the entire transaction.

Strategy 3: Cash Out and Pay the Piper (Estimated Tax Payments)

Sometimes, you just want out. You don't want to be a landlord anymore, and you don't want to move back into the house. You just want the cash to retire or invest in the stock market.

If you choose to realize the gain, you need to plan ahead to avoid IRS underpayment penalties.

The US tax system is "pay-as-you-go." If you sell a rental property in March and generate a $150,000 capital gain, you cannot simply wait until next April to pay the taxes. If you do, the IRS will hit you with hefty underpayment interest penalties.

The Strategy: You must calculate your estimated Capital Gains and Depreciation Recapture tax immediately after the sale, and send an Estimated Tax Payment (Form 1040-ES) to the IRS and your state tax board by the next quarterly deadline.

Next Steps

Before you list your rental property, you must calculate exactly what your tax exposure will be. Once you sign the closing papers, it is extremely difficult to reverse course and save the taxes. Consult with a qualified tax professional to model out your specific depreciation recapture and capital gains, so you can confidently decide whether to move in, exchange, or cash out.

If you need help calculating your exact tax exposure, or if you just want a second opinion on your real estate tax strategy, give our office a call or book a meeting here.

Disclaimer: The information provided in this article is for educational purposes only and does not constitute investment, tax, or financial advice. Tax law is highly fact-specific and subject to change. Always consult with a licensed professional regarding your specific situation.

Back to blog