She’ll Move Into the Condo She’s Rented Out for Years, Live There Two Years, and Sell It for $400,000 More Than She Paid. Those Two Years Will Keep Part of That Gain Away From the IRS for Good

Moving into a long-term rental and living there two years sounds like a clean path to a tax-free payday, but a 2008 law change rewrote the math in ways most landlords never see coming.

Published October 10, 2026, 2:24pm ET · 4 min read

Life After Work desk. Editor: David Beren.

This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.

Vacation condo rental building in Princeville, with balconies facing the ocean, surrounded by palms and manicured lawa, north shore of Kauai, Hawaii
© bluestork / Shutterstock.com

A popular move-in strategy for rental owners says to live in the property for two years, sell, and the IRS can’t touch the gain. On a condo worth $400,000 more than its purchase price, that’s a big promise. That version of the home sale tax exclusion for rental property stopped being accurate after 2008. Moving in still permanently shields part of the gain from tax. The size of that exclusion depends on a specific IRS formula.

What Two Years in the Condo Actually Buys

Section 121 of the Internal Revenue Code allows you to exclude up to $250,000 ($500,000 if married and filing jointly) of gain on your main home. To qualify, you must have owned the home for at least 2 years and lived in it as your main home for at least 2 years during the 5-year period ending on the sale date. The years don’t need to be consecutive.

Section 121(b)(5) changed the picture. Any gain allocated to “nonqualified use” loses the exclusion. Nonqualified use means any period after December 31, 2008, when the property wasn’t your main home. The IRS divides your nonuse days by your total ownership days, and that share of the gain remains taxable (Publication 523, Worksheet 3).

Two Carve-Outs That Rewrite the Arithmetic

Rental years before 2009 do not count as nonqualified use, but depreciation from those years may still produce taxable gain. The worksheet counts only nonuse days “after 2008,” but it divides by every day you owned the home.

Timing matters too, because under section 121(b)(5)(C)(ii), the period after you last lived in the home, within the 5-year window, doesn’t count as nonqualified use. Living there first and renting afterward works in your favor. Renting first and moving in later works against you.

Running Her Numbers

A few assumptions set the stage. She files as single. She bought the condo in January 2017 and rented it out through December 2024, then lived in it from January 2025 through December 2026. She sells in January 2027, which makes 10 years of ownership, 8 of them as a rental.

Of that gain, $320,000 is treated as nonqualified use and taxed as long-term capital gain. Only $80,000 can be excluded, which leaves most of her $250,000 cap unused. Different dates produce different results. In the IRS’s own example, a taxpayer who rented for 2 of 5 years had $120,000 of a $300,000 gain assigned to nonqualified use.

Depreciation Gets Taxed No Matter What

Depreciation is a second bill with its own math. You can’t exclude gain equal to depreciation “allowed or allowable” for periods after May 6, 1997. “Allowable” means an owner who never took it still has to cut basis (what you paid, adjusted) by the amount that could have been deducted. That amount is unrecaptured Section 1250 gain, and the top rate is 25%. Moving in has zero effect on it.

Other Taxes Riding on the Sale

The rest of the taxable gain is taxed at long-term rates of 0%, 15%, and 20%. For 2025, single filers hit the 20% rate at $533,401 of taxable income. Additionally, the 3.8% net investment income tax applies to income above $200,000 for single filers and $250,000 for joint filers. A big gain can also raise Medicare premiums, which are set using income from 2 years prior. In 2026, Part B surcharges begin above $109,000 for single filers and $218,000 for joint filers.

Section 121(b)(5) is one of several quiet IRS rules that can save six figures out of a retirement-era sale, and we laid out the rest in a free tax trap guide for anyone sitting on appreciated property or large pre-tax balances.

Rules That Can Block the Exclusion Entirely

  • You can take the exclusion only once during a 2-year period.
  • If the condo came to you through a like-kind (1031) exchange, section 121(d)(10) requires a 5-year holding period before you can use the exclusion.

Stacking Up the Alternatives

  • Sell it as a rental: The whole gain is taxable, plus recapture.
  • Exchange it: Trading investment real property for like-kind property means you don’t recognize any gain or loss until later.
  • Hold it until death: Heirs generally take a basis equal to fair market value at the date of death, and no ordinary income from depreciation is reportable on that transfer.

Run the Calculation Before Packing a Single Box

You’ll need your purchase date and price, the exact dates the condo switched between rental and home, and a full depreciation history, including any years where you could have taken it and didn’t. Run those figures through Worksheet 3 in IRS Publication 523 before you sign a moving contract. Your result depends on your dates.

Contact [email protected] for any questions or corrections.

David Beren

David Beren has been a Flywheel Publishing contributor since 2022. Writing for 24/7 Wall St. since 2023, David loves to write about topics of all shapes and sizes. As a technology expert, David focuses heavily on consumer electronics brands, automobiles, and general technology. He has previously written for LifeWire, formerly About.com. As a part-time freelance writer, David’s “day job” has been working on and leading social media for multiple Fortune 100 brands. David loves the flexibility of this field and its ability to reach customers exactly where they like to spend their time. Additionally, David previously published his own blog, TmoNews.com, which reached 3 million readers in its first year. In addition to freelance and social media work, David loves to spend time with his family and children and relive the glory days of video game consoles by playing any retro game console he can get his hands on.

All articles →