< Go Back to the iBuyer Blog

How to Avoid Capital Gains Tax When Selling Rental Property

Posted on Share:

realtor holding for sale sign inside the property of the seller

Get Multiple Cash Offers in Minutes with an iBuyer.com Certified Specialist.


Selling a rental property can bring in a big payday, but it can also trigger a hefty capital gains tax bill. If you’re not prepared, that tax hit can wipe out a good chunk of your profit. The good news? There are legal ways to reduce or even avoid it.

You’ve probably heard of strategies like the 1031 exchange or converting a rental into your primary home. But which ones actually work for your situation? And how do you time it right to save the most? That’s what we’ll break down here.

In this guide, we’ll walk through how capital gains work, smart ways to reduce your tax burden, and a few common traps to avoid. Whether you’re cashing out or planning to reinvest, the right moves can save you thousands.

Thinking of selling? Get a data-backed cash offer from iBuyer.com, close on your terms and skip the tax surprises.

Instant Valuation, Confidential Deals with a Certified iBuyer.com Specialist.

Sell Smart, Sell Fast, Get Sold. No Obligations.

How Capital Gains Tax Works on Rental Property

When you sell a rental home for more than you paid, that profit is called a capital gain. And just like with income, the IRS wants a slice of it. But not all gains are taxed the same way, how long you owned the property plays a big role.

If you sell within one year of buying, it’s considered a short-term capital gain, taxed at your regular income tax rate. That can be as high as 37 % for high earners. But if you’ve held it longer than a year, it’s a long-term gain, usually taxed at 0 %, 15 %, or 20 %, depending on your income.

Rental income and capital gains are taxed differently. Rental income gets taxed yearly, like wages. Capital gains taxes hit when you sell, and they can be steep if you don’t plan ahead. Some states also charge their own capital gains tax on top of the federal one.

Another thing to watch for: depreciation recapture. If you claimed depreciation while renting out the home, the IRS may tax part of that when you sell. Many landlords forget this and are caught off guard by a higher bill.

Calculating Capital Gains When Selling a Rental Property

To figure out how much tax you might owe, you first need to calculate your capital gain, and it’s not as simple as sale price minus purchase price. The IRS looks at your adjusted cost basis, which takes into account things like improvements and depreciation.

Start with what you paid for the property. Add major improvements (like a new roof or kitchen remodel), and subtract any depreciation you claimed while renting it out. That gives you your adjusted basis. Then subtract that from the sale price to get your gain.

Here’s a quick example:
You bought a rental for $300,000, spent $40,000 on improvements, and claimed $50,000 in depreciation. Your adjusted basis is $290,000. If you sell for $450,000, your gain is $160,000.

Don’t forget, depreciation gets “recaptured” at a higher tax rate, usually 25 %. That means part of your gain could be taxed more than you expect. This is why it helps to talk to a tax professional before listing.

Use a 1031 Exchange to Defer Taxes

A 1031 exchange lets you sell one investment property and buy another, without paying capital gains tax right away. The idea is simple: swap one rental for another, and the IRS won’t count it as a taxable sale.

To qualify, both properties must be held for business or investment, not personal use. You also need to stick to a strict timeline:

  • Identify the new property within 45 days
  • Close on it within 180 days

Missing those deadlines means you pay taxes, no exceptions. Also, the new property must be of “equal or greater value.” If you pocket cash during the swap, it gets taxed.

This strategy doesn’t erase taxes forever, it defers them. But many investors use 1031 exchanges to keep upgrading properties and building wealth while delaying the tax hit for years.

Convert the Rental Into Your Primary Residence

If you live in the rental for at least 2 out of the last 5 years, you may qualify for the primary residence exclusion. That lets you avoid tax on up to $250,000 of gain if single, or $500,000 if married and filing jointly.

But there’s a catch: if you rented it out during that 5-year period, you can’t exclude the part of the gain that happened while it was a rental. That portion is still taxable, and depreciation recapture still applies.

Still, if you’re planning ahead, this move can help cut your tax bill big time. It works best for long-term owners considering downsizing or relocating.

Offset Gains with Tax-Loss Harvesting

Tax-loss harvesting means selling investments, like stocks or crypto, that have lost value, to offset gains from your rental sale. If you have $20,000 in stock losses and $50,000 in capital gains, you’ll only pay taxes on $30,000.

This works best in the same tax year. If your losses exceed your gains, you can apply up to $3,000 against regular income, and carry the rest forward.

Make sure to avoid the wash sale rule, you can’t buy the same investment back within 30 days or the IRS won’t count the loss.

Invest in a Qualified Opportunity Zone (QOZ)

Another tax-deferral route is investing your gains in a Qualified Opportunity Fund. These funds put money into designated low-income areas, called Opportunity Zones.

If you reinvest within 180 days of your sale, you can delay capital gains tax for up to 10 years. Plus, depending on how long you stay invested, you might reduce or eliminate the tax entirely.

This is a more complex option, usually better for experienced investors. But for the right person, it’s a powerful way to build wealth and support community development.

Gift or Donate the Property

Giving your rental to a family member or charity can offer tax advantages. When you gift it, the recipient takes over your cost basis. They may pay tax when they sell, but possibly at a lower rate.

Donating to a Charitable Remainder Trust (CRT) is another path. You get a partial tax deduction now, and the trust can sell the home without immediate tax. You’ll receive income from the trust for life, and the charity gets what’s left after.

These moves require careful planning and legal help, but they can be a smart way to support causes or help heirs while managing taxes.

Time the Sale When Your Income Is Lowest

Capital gains tax rates depend on your income level. If you’re retiring, taking time off, or in a down year, your tax bracket might drop, so could your capital gains rate.

For example, if your total taxable income (including the gain) is below $89,250 (married filing jointly in 2025), you could qualify for the 0 % capital gains rate.

This strategy takes patience but can save you thousands. Just be sure to factor in all income sources, and talk to a pro to get the timing right.

Common Mistakes When Trying to Avoid Paying Capital Gains

Avoiding taxes is legal. Evading them is not. And even with legal strategies, small missteps can cost you big. Here are the most common mistakes landlords make when selling a rental.

One major mistake is missing key deadlines, especially with a 1031 exchange. The 45-day and 180-day windows are strict, there’s no grace period. If you’re late, the IRS treats it as a taxable sale, period.

Another pitfall? Misreporting your basis. Forgetting to include improvements or not adjusting for depreciation can lead to overpaying, or underpaying and triggering an audit. Keep receipts and track every upgrade.

Many sellers also skip talking to a tax professional, hoping to “figure it out later.” But waiting until after closing is often too late. Good planning needs to happen before you list your property.

Lastly, some landlords rely on advice from forums or friends, not professionals. Even if it worked for someone else, your financial situation might be different, and the IRS doesn’t accept “but my buddy said” as a defense.

Reilly’s Two Cents: Selling Smart, Not Scrambling

I’ve helped more than a few folks sell rental properties, and I’ve seen how taxes can catch people off guard. One client had owned his place for over a decade, made smart upgrades, and expected a clean profit. But come tax time? Depreciation recapture hit him like a truck. That tax bill took a real bite out of his return.

Even if you’re not in Florida, where I work, these issues still come up across the country. The rules might vary a bit, but the principles are the same: plan early, document everything, and know what strategies actually apply to you.

If you’re thinking about selling, here are a few things I always tell people:

  • Start planning at least a year in advance. That gives you time to convert the property, explore a 1031, or check if you qualify for an exclusion.
  • Keep detailed records of every dollar you put into the place, new windows, flooring, appliances. Improvements raise your basis and reduce your gain.
  • Talk to a CPA who understands real estate. Not all tax pros do. You want someone who knows depreciation, passive income rules, and exchange timelines.
  • If you’re considering a 1031, line up your replacement property first. Inventory moves fast, and those 45 days disappear quicker than you think.
  • Lastly, don’t assume you’ll be in a lower bracket next year, run the math now, not later.

You don’t have to game the system to come out ahead, you just need to understand the rules and play them wisely.

Rental Property Sale Taxes

Selling a rental property doesn’t have to mean losing a chunk of your profit to taxes. But the key is preparation. The earlier you plan, the more options you’ll have, whether that’s a 1031 exchange, converting the home, or simply timing the sale right.

Every landlord’s situation is different, and what works for one person might not fit another. That’s why it pays to look at the full picture: your income, your goals, your timeline. And if you’re unsure, that’s what professionals are for.

The bottom line? You’ve got choices, and smart ones can save you thousands.

Ready to sell your rental the smart way? Get a fair, cash-backed offer from iBuyer.com, skip the drama and close on your terms.

Compare Cash Offers from Top Home Buyers. Delivered by Your Local iBuyer Certified Specialist.

One Expert, Multiple Offers, No Obligation.

Frequently Asked Questions

Can I avoid capital gains if I lived in the home before renting it?

Yes, if you lived in the home for 2 of the past 5 years before selling, you may qualify for the primary residence exclusion. Just note: time spent as a rental can reduce how much of the gain is excluded.

How long do I have to reinvest with a 1031 exchange?

You must identify your new property within 45 days of the sale and close within 180 days. These deadlines are strict, missing them means you’ll owe taxes on the full gain.

Is depreciation recapture always required when I sell?

If you claimed depreciation during your ownership, yes, the IRS requires recapture. It’s taxed at a maximum of 25 %, and it applies even if you qualify for other capital gains exclusions.

What if I co-own the property and we’re filing jointly?

You’ll still calculate the gain together, and the $500,000 exclusion may apply if it was your primary residence and both of you meet the use and ownership rules. For rentals, you’ll share the tax impact proportionally.

Can I still use tax-loss harvesting if I’ve already sold the property?

Yes, as long as it’s within the same tax year. Sell underperforming assets before December 31 to offset gains from your rental. Be sure not to rebuy the same assets within 30 days, or the IRS may disallow the loss.

Sell Smart, Sell Fast with iBuyer.com
Discover Your Home’s Value in Minutes.