What renting your condo does to the capital gains exclusion
Most writing on this question answers it with the two-out-of-five-years rule and stops. That rule decides whether you qualify at all, and it is the easy half. The hard half is a 2008 amendment that decides how much of the exclusion survives, and it turns on something nobody thinks to ask about: whether you rented the unit before you lived in it or after. Two sellers with identical purchase prices, identical sale prices, identical years of residence and identical years of rental can owe federal tax about $15,900 apart, and the only difference between them is the order.
Published
This page explains a federal statute. It is not tax advice, it does not know your basis, your filing status or your other income, and the arithmetic below is an illustration rather than a return. The number that matters in your case comes from a CPA who has your documents. What this page can do is tell you which questions change the answer, so that conversation starts in the right place.
1. The test that decides whether you qualify
Section 121(a) is one sentence, and it is worth reading in its own words: gross income does not include gain from the sale of property if, during the five-year period ending on the date of sale, the property was owned and used by the taxpayer as a principal residence for periods aggregating two years or more.
Four things in that sentence do work people miss.
- Two years, not two consecutive years. The statute says "periods aggregating," so a year here and a year there inside the window both count.
- Owned and used. Both, and they do not have to be the same two years — only both satisfied somewhere inside the five.
- The window ends at the sale. It runs backward from the closing date, not forward from the purchase.
- Once every two years. Section 121(b)(3) bars the exclusion entirely if you already used it on another sale in the two years before this one.
Clear that and the cap is $250,000 of gain for a single filer under section 121(b)(1), or $500,000 for a married couple filing jointly under section 121(b)(2) — for which either spouse may meet the ownership test but both must meet the use test.
2. The amendment that decides how much survives
The Housing Assistance Tax Act of 2008 added section 121(b)(5), and it is the provision this whole page exists for. Its rule: gain allocated to "periods of nonqualified use" does not get excluded, and the allocation is a straight ratio — aggregate periods of nonqualified use during your ownership, over the total period you owned it.
A period of nonqualified use is any period the property was not your principal residence. Then come the exceptions, and the first one is the whole ballgame:
Section 121(b)(5)(C) — what does NOT count as nonqualified use
- Anything before January 1, 2009
- The clause is not retroactive. Rental years before that date are simply outside the definition.
- Any part of the five-year window after your last day of principal residence
- Clause (ii)(I). Rent it out after you move out and, inside that window, the rental period is not nonqualified use at all.
- Up to 10 years of qualified official extended duty
- Clause (ii)(II), for the uniformed services, the Foreign Service and the intelligence community.
- Up to 2 years of temporary absence
- Clause (ii)(III), for a change of employment, health conditions, or other unforeseen circumstances.
Read clause (ii)(I) again, because it creates an asymmetry that almost no summary of this rule mentions. Renting after you lived there is protected. Renting before you lived there is not. The statute is indifferent to how many years you rented; it cares where those years sit relative to your residence.
3. The same numbers in both orders
Take one condominium, bought in January 2019 for $600,000 and sold in December 2025 for $900,000. Seven years of ownership, four years lived in, three years rented, a $300,000 gain, a single filer. Only the order changes.
Order A — lived in it first, then rented it
Principal residence January 2019 through December 2022. Rented January 2023 through December 2025. The five-year lookback runs from December 2020, and it contains two full years of principal residence use, so the section 121(a) test is met with nothing to spare.
Now apply (b)(5). The last date of principal residence use is December 2022. Every one of the three rental years falls after that date and inside the five-year window, so clause (ii)(I) removes all of them. Nonqualified use: zero.
Order B — rented it first, then lived in it
Rented January 2019 through December 2021. Principal residence January 2022 through December 2025. The section 121(a) test is met comfortably — four of the last five years.
But the three rental years now sit before the residence, so clause (ii)(I) does not reach them, they are after January 1, 2009, and no other exception applies. Nonqualified use: three years out of seven owned, a ratio of 3/7.
4. What that costs, line by line
Both sellers depreciated the unit over the three rental years. Land is not depreciable, so only the improvement is — say $480,000 of the $600,000 purchase, straight line over 27.5 years, which is $17,455 a year and $52,364 over three. (Real returns apply a mid-month convention in the first and last year, which moves that figure slightly without changing the shape of anything below.)
Depreciation comes off the top for both of them. Section 121(d)(6) says the exclusion does not apply to gain up to the amount of depreciation taken after May 6, 1997, and Publication 523 puts it as gain that "must be recaptured." That slice is unrecaptured section 1250 gain, and IRS Topic no. 409 gives its ceiling: taxed at a maximum 25% rate.
Order A — lived in it, then rented it
- Gain
- $300,000
- Less depreciation recapture
- $52,364 — not excludable, up to 25%
- Remaining gain
- $247,636
- Allocated to nonqualified use
- $0
- Excluded under section 121
- $247,636, inside the $250,000 cap
- Federal tax on the gain
- about $13,091
Order B — rented it, then lived in it
- Gain
- $300,000
- Less depreciation recapture
- $52,364 — not excludable, up to 25%
- Remaining gain
- $247,636
- Allocated to nonqualified use, 3/7
- $106,130 — not excludable, long-term capital gain rates
- Excluded under section 121
- $141,506, inside the $250,000 cap
- Federal tax on the gain, at a 15% rate
- about $29,010
The gap is $15,919, which is exactly the tax on the nonqualified slice. Neither seller is anywhere near the $250,000 ceiling — the cap never binds in either case. What costs Order B the money is not the size of the gain. It is that three of the seven years were rental years standing in the wrong place.
Both figures are federal only. Florida levies no personal income tax, a prohibition that sits in Article VII of the state constitution rather than in a statute a legislature can revisit, so for a Florida property there is no second layer underneath. Depending on your other income, the net investment income tax may add a further 3.8% to some or all of this; that turns on your modified adjusted gross income and not on anything about the property.
5. Three traps worth knowing before you call anybody
Depreciation you never claimed still comes back. Publication 523 recaptures depreciation "allowed or allowable." If the unit was rented and you did not depreciate it, the recapture is calculated on what you could have taken. Skipping the deduction does not skip the tax — it just means you paid for the privilege twice.
The clock runs on your last day of residence, not your closing date. Clause (ii)(I) only protects rental time that falls inside the five-year window. Rent the unit for six years after moving out and the two-year use test fails outright, and the exclusion is gone entirely rather than reduced.
If you are a foreign seller, this is a separate question from withholding. Section 121 turns on use of the property, not on citizenship. FIRPTA withholding turns on the seller's status and is calculated on the sale price rather than the gain, which means it can take a five-figure sum out of a closing on which little or no tax is ultimately owed. Those two rules run on different tracks and are handled at different moments — FIRPTA is its own page.
6. What to take to your accountant
Four dates and two numbers settle almost everything above, and you can assemble them without professional help:
- The date you took title and the date of the closing on the sale.
- Every date the unit started and stopped being your principal residence.
- Every date it was rented, or held out for rent.
- Your purchase price, plus capital improvements, and the closing costs on both ends.
- The land-versus-improvement split you used for depreciation. The Miami-Dade Property Appraiser publishes land value and building value separately on each folio, which is one documented starting point for that allocation rather than a figure invented at the last minute.
- Every depreciation deduction taken, from the depreciation schedules on the returns for the rental years.
An accountant given that list can finish in an hour. An accountant given a closing statement and a shrug spends the hour reconstructing it.
Do I lose the $250,000 exclusion if I rented out my condo?
Not automatically, and often not at all. If you lived in the unit as your principal residence for at least two of the five years before the sale, you still qualify under section 121(a). Whether the exclusion is then reduced depends on when the rental happened: section 121(b)(5)(C)(ii)(I) exempts rental time that falls after your last day of principal residence and inside that five-year window, so renting the unit out after you move out generally costs you nothing beyond depreciation recapture.
What is a period of nonqualified use?
Under section 121(b)(5)(C)(i), any period after January 1, 2009 during which the property was not the principal residence of the taxpayer or their spouse or former spouse. Gain is allocated to those periods by the ratio of nonqualified years to total years owned, and the allocated share cannot be excluded. Rental years that precede your residence are the common case.
Does renting before I moved in count against me?
Yes, and this is the asymmetry that catches people. The exception at clause (ii)(I) covers only the portion of the five-year period after the last date the property was your principal residence. Rental time before you moved in is not covered, so it counts as nonqualified use and proportionally reduces the exclusion.
How is depreciation taxed when I sell?
Separately, and it is never excludable. Section 121(d)(6) removes gain up to the amount of depreciation taken after May 6, 1997 from the exclusion entirely. That amount is unrecaptured section 1250 gain, taxed at a maximum 25% rate per IRS Topic no. 409. Publication 523 recaptures depreciation "allowed or allowable," so the amount you could have deducted counts even if you never claimed it.
Does Florida tax the gain on top of the federal tax?
No. Florida levies no personal income tax, and the prohibition is in Article VII of the Florida Constitution rather than in ordinary legislation. The federal number is the number. The net investment income tax may still apply at the federal level depending on your modified adjusted gross income.
Can I use the exclusion twice?
Not within two years. Section 121(b)(3) denies the exclusion on any sale if you already applied it to another sale during the two-year period ending on the date of this one.
Sources
Every figure on this page traces to one of these. Where a rule changed, the date it changed is stated.
Work with Stefania
Question about a specific building?
Send the building or the unit and Stefania will come back with the real numbers — the fee, the reserve position, and what comparable units actually traded at.
Got it — that reached Stefania directly.
She answers inquiries personally, usually the same day. If it is urgent, call(786) 828-0091.
