Question: Do I owe capital gains tax when I sell my primary residence in Miami?
Section 121 Home Sale Exclusion: $250,000 and $500,000 Rules
Section 121 can exclude up to $250,000 of gain on a main-home sale, or up to $500,000 for eligible joint filers. The ownership, use, and look-back tests determine eligibility, and rental history may limit the exclusion.
Tax Planning10 min read
By Joanny Ibarbia, EA · CAA

Quick answer
Section 121 can exclude up to $250,000 of gain on a main-home sale, or up to $500,000 on a qualifying joint return. For the joint limit, in the 5 years before the sale at least one spouse must have owned the home for 2 years, and both must have used it as a main home for 2 years. Neither spouse may have used the exclusion on another sale in the prior 2 years. Gain attributable to depreciation allowed or allowable after May 6, 1997 remains taxable.
Key points
- The federal exclusion covers up to $250,000 of gain, or up to $500,000 for eligible joint filers.
- Ownership and main-home use are measured separately within the 5 years before the sale. The general rule calls for 2 years under each test.
- An exclusion on another sale in the prior 2 years generally prevents the full exclusion.
- A sale primarily due to work, health, or an unforeseen event may qualify for a reduced exclusion.
- Depreciation allowed or allowable after May 6, 1997 and some rental periods can leave part of the gain taxable.
What is the Section 121 home sale exclusion?
Section 121 lets an eligible homeowner exclude up to $250,000 of gain from the sale of a main home from federal taxable income. The ceiling reaches $500,000 on a qualifying joint return.[1] The figures apply to gain. The sale price, selling expenses, and adjusted basis determine that gain.[12]
A house, condo, mobile home, co-op, or houseboat can qualify if it was the taxpayer's principal residence. When someone splits time among homes, the IRS considers the time spent at each property and evidence such as addresses used for tax returns and voter registration. A vacation property or rental can become a principal residence, but its earlier use may still limit how much gain can be excluded. The the real estate investor tax guide covers related rules for rental and investment property.[12]
How do the ownership and use tests decide who qualifies?
Ownership and residence each require a total of 2 years in the 5-year period ending on the sale date. The periods can differ, and the residence requirement can be met with separate periods adding up to 24 months or 730 days. Once someone meets that test, they need not still live in the home on the sale date.[2][3]
For the full $500,000 on a joint return, either spouse can satisfy ownership, both must satisfy residence individually, and neither can have used the exclusion on a sale within the prior 2 years. If the couple misses the joint test, their available exclusions are determined separately and combined, with each spouse credited with ownership time from either spouse. The statute also allows an eligible unmarried surviving spouse the higher limit for a sale within 2 years of the other spouse's death when the joint requirements were met immediately before the death.[11]

How does the look-back rule limit the exclusion to once every two years?
A seller who used the exclusion on another sale within the prior 2 years is generally ineligible for the full exclusion, even if the seller meets the ownership and residence tests. A previous sale within that window does not prevent eligibility if the seller did not exclude its gain. An early sale may qualify for a reduced exclusion if the primary reason meets the applicable conditions.[4][13]
When does a sale qualify for a partial exclusion?
An early sale can qualify for a reduced exclusion when the primary reason is a change in place of employment, health, or an unforeseen circumstance. For an employment move, one safe harbor is a new workplace at least 50 miles farther from the home than the old one. With no previous workplace, the new workplace must be at least 50 miles from the home for that safe harbor. Health-related moves and unforeseen events can also qualify, such as a move for necessary medical care or a sale following a casualty that damaged the home. Facts and circumstances can support eligibility even outside a safe harbor.[5][6][13]
The reduced ceiling depends on the shortest applicable period of ownership, residence, or time since the last sale for which the taxpayer used the exclusion. An otherwise eligible single seller who owned and lived in the home for 12 months, had no earlier excluded sale, and moved for a qualifying job change could exclude up to $125,000. That is half of the normal $250,000 ceiling. Our advisory solutions covers pre-sale planning.[14]
| Fact pattern | Section 121 outcome | Authority |
|---|---|---|
| Sold main home, owned and lived in it 2 of last 5 years, no other exclusion in prior 2 years | Up to $250,000 excluded (single), $500,000 (joint) | IRS Sale of Home guidance |
| Sold main home but excluded gain on another home in prior 2 years | Full exclusion generally denied by look-back rule | IRS Selling Your Home guidance |
| Qualifying work-related sale after 12 months of ownership and residence, with no prior excluded sale | Up to $125,000 for a single seller | IRS Publication 523 |
| Home acquired through a Section 1031 like-kind exchange within past 5 years | Automatically disqualified | IRS Selling Your Home guidance |
| Home used partly as rental after May 6, 1997 | Gain attributable to depreciation allowed or allowable stays outside the exclusion | IRS Selling Your Home guidance |

What sales does Section 121 automatically disqualify?
A home acquired in a Section 1031 exchange generally cannot qualify for the exclusion if sold within 5 years of the acquisition. The bar can also apply to a subsequent owner whose basis depends on that of the owner who made the exchange. Section 121 also bars the exclusion if the expatriation tax treatment under Section 877(a)(1) applies to the seller. Our real estate + property management tax help practice covers situations involving an entity, exchange, or investment property.[7][18]
How does prior rental or business use of the home affect the exclusion?
Gain attributable to depreciation allowed or allowable for business or rental use after May 6, 1997 is ineligible for the exclusion, even if the owner never claimed the available depreciation. This amount may be unrecaptured Section 1250 gain, which has a maximum federal rate of 25%. A home office within the dwelling generally does not require separate gain allocation, while a separate rental unit can require its own allocation and residence analysis.[8][15]
Nonqualified use is a separate limit. Post-2008 periods before the home became a principal residence can leave some gain taxable. A period after the last use as a main home within the 5-year test window generally is excepted. The allocation uses nonqualified-use time divided by total ownership time and applies after removing gain attributable to depreciation.[16]
Suppose a single owner rents a home for 2 years, lives in it for the next 3, then sells it at a $210,000 gain, calculated using an adjusted basis that reflects $10,000 of allowable depreciation. Assuming all periods are after 2008 and the owner otherwise qualifies, $10,000 is attributable to depreciation and $80,000 of the remaining $200,000 is allocated to the prior rental period. Up to $120,000 is excludable. A rental after the last main-home use in the 5-year window may avoid the time allocation while still exposing the depreciation amount. The the short-term rental material participation rules and the passive activity loss rules and $25,000 allowance cover separate income and loss rules during rental ownership.[8][16]
How is the sale reported on Form 8949 and Schedule D?
A homeowner who receives Form 1099-S reports the sale even if all the gain is excludable. A seller also generally reports a sale with gain that cannot be fully excluded. Form 8949 and Schedule D are used for reportable home-sale gain, and a separately used business or rental portion can involve additional reporting. Our individual tax return preparation covers the return and supporting closing and depreciation records.[9][12]

Are there special rules for servicemembers and other exceptions?
People on qualifying extended duty in the uniformed services, Foreign Service or intelligence community can elect to suspend the 5-year period for up to 10 years. Qualifying duty lasts more than 90 days or for an indefinite period and requires a duty station at least 50 miles from the main home or government housing under official orders. The suspension also applies by election to qualifying Peace Corps employees on extended duty abroad and to enrolled Peace Corps volunteers and volunteer leaders serving abroad.[10][11]
A physically or mentally incapacitated person can count time in a licensed care facility toward residence within the 5-year period if they still own the home and already owned and used it as a main home for at least 1 year within that period.[11]
Can a main home outside the United States qualify?
A principal residence can be outside the United States. Section 121 uses ownership and principal-residence tests and has no U.S. location requirement. U.S. citizens and resident aliens are generally subject to federal income tax on worldwide income, so the exclusion can matter when they sell a foreign main home. The exclusion applies for U.S. federal income tax purposes, and the country where the home is located can have separate tax rules.[11][17]
For sellers in Miami and abroad, the same federal questions matter. Closing records establish the sale date and proceeds, residence records support the use test, and depreciation history affects both adjusted basis and the amount of gain left outside the exclusion. Our advisory solutions can evaluate how those facts affect the sale.
Frequently asked questions
Do I owe capital gains tax when I sell my primary residence?
An eligible homeowner can exclude up to $250,000 of gain. The limit rises to $500,000 on a joint return if either spouse meets the ownership test, both meet the residence test, and neither used the exclusion on another sale in the prior 2 years. Gain above the applicable limit and gain attributable to depreciation allowed or allowable after May 6, 1997 remain taxable.
What if I did not live in the home for 2 of the last 5 years?
A sale primarily due to work, health, or an unforeseen event can qualify for a reduced exclusion. An employment safe harbor applies when the new workplace is at least 50 miles farther from the home than the old workplace. The reduced limit uses the shortest applicable period of ownership, residence, or time since the previous excluded sale.
How often can I use the Section 121 exclusion?
The look-back rule limits the exclusion to once every 2 years. A homeowner who sold another home in the prior 2-year period and took the exclusion on that sale generally cannot use it again on the current sale, even when both the ownership and use tests are otherwise satisfied.
Does the exclusion still apply if my home was ever a rental?
Yes, if the eligibility tests are met. Rental use after 2008 before the home became a principal residence can leave part of the gain outside the exclusion. Rental time after the last use as a main home within the 5-year period is generally excepted. Gain attributable to depreciation allowed or allowable after May 6, 1997 stays outside the exclusion in either case.
Do I still have to report a home sale that qualifies for the full exclusion?
If you receive Form 1099-S, you must report the sale even when all the gain is excludable. The sale is also reportable if you cannot exclude all of the gain. Form 8949 and Schedule D are used to report the gain on the federal return.
Sources
- Topic no. 701, Sale of your home · Internal Revenue Service
- Topic no. 701: Qualifying for the exclusion · Internal Revenue Service
- Publication 523 (2025), Selling Your Home: Ownership and Residence · Internal Revenue Service
- Publication 523 (2025), Selling Your Home: Look-Back requirement · Internal Revenue Service
- Publication 523 (2025), Selling Your Home: Work-Related Move · Internal Revenue Service
- Publication 523 (2025), Selling Your Home: Health-Related Move and Unforeseeable Events · Internal Revenue Service
- Publication 523 (2025), Selling Your Home: Automatic Disqualification · Internal Revenue Service
- Publication 523 (2025), Selling Your Home: Recapturing Depreciation · Internal Revenue Service
- Topic no. 701: Reporting the sale · Internal Revenue Service
- Publication 523, qualified extended duty · Internal Revenue Service
- 26 U.S.C. § 121, principal residence and special rules · Office of the Law Revision Counsel
- Publication 523, main home and sale gain · Internal Revenue Service
- Publication 523, other facts and circumstances · Internal Revenue Service
- Publication 523, reduced exclusion measurement · Internal Revenue Service
- IRS Topic 409, unrecaptured Section 1250 gain · Internal Revenue Service
- Publication 523, calculating gain from nonqualified use · Internal Revenue Service
- Publication 54, worldwide income · Internal Revenue Service
- 26 U.S.C. § 121(e), expatriation rule · Office of the Law Revision Counsel
Continue reading

Opportunity Zones in 2027: New Designations and Capital Gains Deferral
The IRS announced new Opportunity Zones effective January 1, 2027. The investment date determines whether the 2026 inclusion deadline or the new five-year deferral rules apply.

Inherited Real Estate: U.S. Tax Basis for Property in the U.S. and Abroad
Inherited real estate usually takes a basis equal to fair market value at death. Ownership, an alternate valuation election, and currency conversion can change the U.S. tax calculation.

Passive Activity Loss Rules: The $25,000 Rental Real Estate Special Allowance
Rental losses generally offset passive income. The special allowance can offset up to $25,000 against wages, depending on your participation, income and filing status.
About the author

Founder & Principal · Enrolled Agent (EA)
Joanny Ibarbia is an Enrolled Agent with unlimited rights to represent taxpayers before the IRS, and a Certifying Acceptance Agent for ITIN applications. He leads the bilingual tax and accounting practice at Top Pro Accounting.
- EA
- CAA
- Harvard Certified
- QuickBooks ProAdvisor
Image credits
- Photo by Thirdman Pexels
- Photo by Pavel Danilyuk Pexels
- Photo by Kampus Production Pexels
- Photo by Tara Winstead Pexels

