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 lets a homeowner exclude up to $250,000 of gain (or $500,000 on a joint return) when selling a main home. The 2-of-5-year ownership and use tests unlock the tax-free treatment, and any depreciation claimed after May 6, 1997 stays taxable.
Tax Planning13 min read
By Joanny Ibarbia, EA · CAA

Quick answer
Section 121 lets a single filer exclude up to $250,000 of gain on the sale of a main home, and a couple filing jointly up to $500,000 when both the ownership and use tests are met. Each test requires 24 months of ownership and 24 months of residence within the 5-year window ending on the sale date, plus no other home-sale exclusion claimed in the prior 2 years. Depreciation deducted after May 6, 1997 stays taxable, and a Form 1099-S makes the sale reportable on Form 8949 and Schedule D even when the whole gain is excludable.
Key points
- Section 121 excludes up to $250,000 of gain on a main-home sale, or up to $500,000 on a joint return, when the ownership and use tests are both satisfied
- Ownership and use each require 24 months within the 5-year period ending on the sale date, and the 24 months of residence total 730 days but need not be contiguous
- The look-back rule limits the exclusion to once every 2 years, so a homeowner who used it on a prior sale in the past 2 years is generally not eligible again
- A partial exclusion is available when the sale is caused by a work-related move of at least 50 miles, a qualifying health event, or an unforeseeable event such as a home destroyed or condemned
- Depreciation claimed after May 6, 1997 for business or rental use is unrecaptured Section 1250 gain and stays taxable, and any sale reported on Form 1099-S must appear on Form 8949 and Schedule D
What is the Section 121 home sale exclusion?
Section 121 of the Internal Revenue Code lets a homeowner selling a main home exclude up to $250,000 of the gain from federal income tax, or up to $500,000 on a joint return with a spouse.[1] The point is to keep the tax code from taxing the appreciation on the place a family actually lives, and the rule only reaches the sale of a main home. The IRS treats a main home as the property you occupy most of the time and identify as your residence: a single-family house, a condominium, a cooperative unit, a mobile home, or even a houseboat can qualify when it is the primary residence. The exclusion does not extend to a second home, a vacation property, or a pure rental. When the tests are met, the excluded gain never enters gross income; when they are not, the entire gain is a long-term capital gain reported and taxed at capital-gain rates. Because South Florida is one of the most active resale markets in the country, this rule is the most valuable single tax break most homeowners will ever claim, and it deserves a careful read before a listing is signed. For the broader picture of how rental use, participation rules, and gain exclusions fit together, our the real estate investor tax guide frames the landscape.
How do the ownership and use tests decide who qualifies?
The exclusion turns on two facts the IRS tests separately: whether the taxpayer owned the home long enough, and whether the taxpayer actually lived in it long enough. The IRS states it directly: "In general, to qualify for this exclusion, you must meet both the ownership test and the use test."[2] Ownership is met when you (or your spouse) held title for at least 24 months of the last 5 years leading up to the sale.[2] Residence is met when you lived in the home for at least 24 months during the same 5-year window.[2]
The residence clock has a detail worth remembering. Publication 523 confirms that "the 24 months of residence can fall anywhere within the 5-year period, and it doesn't have to be a single block of time. All that is required is a total of 24 months (730 days) of residence during the 5-year period."[3] A snowbird splitting time across two homes may still qualify by aggregating months across the window. For couples filing jointly, each spouse has to meet the residence test individually, while only one of them has to satisfy the ownership test.[3] This split matters after divorce, remarriage, or a purchase made in one spouse's name before the marriage.

How does the look-back rule limit the exclusion to once every two years?
Even a taxpayer who passes both the ownership and use tests can be blocked from the exclusion by the look-back rule. Publication 523 states it plainly: "If you didn't sell another home during the 2-year period before the date of sale (or if you did sell another home during this period but didn't take an exclusion of the gain earned from it), you meet the look-back requirement. You may take the exclusion only once during a 2-year period."[4] That means a homeowner who claimed the Section 121 exclusion on a prior sale within the last 2 years is generally ineligible on the current sale, even when the second transaction is otherwise textbook. A serial renovator, a mover chasing job relocations, or a family that upsized and quickly downsized should measure the calendar between closings before assuming the second sale is tax-free. In tight cases, delaying a second closing by a matter of weeks can preserve a six-figure exclusion.
When does a sale qualify for a partial exclusion?
The IRS carves out three categories where a sale that misses the standard tests can still support a prorated exclusion: a work-related move, a health-related move, and an unforeseeable event. For a work-related move, one spec is objective: "You took or were transferred to a new job in a work location at least 50 miles farther from the home than your old work location."[5] A doctor's directive can trigger the health path: the IRS accepts a partial exclusion when the taxpayer "moved to obtain, provide, or facilitate diagnosis, cure, mitigation, or treatment of disease, illness, or injury for yourself or a family member."[6] Unforeseeable events include a home destroyed or condemned, a natural or man-made disaster causing casualty loss, or a household event like death, divorce, or the birth of two or more children from a single pregnancy.[6] In each case, the exclusion is prorated by the fraction of the 24-month use period the taxpayer actually met, so a homeowner who lived in the property for half of the required use period claims half of the applicable ceiling. That prorated ceiling is often what makes an early sale tax-free even without full compliance. For advice on structuring the closing to preserve as much of the ceiling as possible, our advisory solutions cover pre-transaction planning.
| 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 |
| Sold main home after half of the required use period met because of qualifying job move of 50 miles or more | Partial exclusion prorated to months met | IRS Selling Your Home guidance |
| 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 | Exclusion does not cover post-1997 depreciation, recaptured as ordinary income | IRS Selling Your Home guidance |

What sales does Section 121 automatically disqualify?
The IRS flags two upfront disqualifications that end the analysis before the tests are even applied. The first is a home obtained through a like-kind swap: "You acquired the property through a like-kind exchange (section 1031 exchange) during the past 5 years."[7] A house acquired through a 1031 swap has to season for 5 years before it can support the Section 121 exclusion, so an investor who took a rental in via 1031 and then converted it to a residence cannot sell tax-free before the 5-year clock runs. The second is expatriate status: "You are subject to expatriate tax"[7] pulls the exclusion entirely, and this is primarily relevant to covered expatriates renouncing U.S. citizenship or long-term green cards. Neither disqualification is a partial denial; both zero out the exclusion. When the sale involves an entity holding the home rather than the individual, the entire question shifts, and our real estate + property management tax help page is the right starting point for those setups.
How does prior rental or business use of the home affect the exclusion?
A meaningful share of South Florida home sales involves a property rented for part of its life, or one that carried a home office. The IRS draws a clean line: "If you were entitled to take depreciation deductions because you used your home for business purposes or as rental property, you cannot exclude the part of your gain equal to any depreciation allowed or allowable as a deduction for periods after May 6, 1997."[8] The gain equal to that post-1997 depreciation is unrecaptured section 1250 gain, taxed at ordinary income rates capped statutorily. The rest of the gain, up to the applicable ceiling, remains excludable when the tests are met. For a homeowner who took depreciation on a home office or a short-term rental year, the recapture bite is often several thousand dollars, so the depreciation ledger has to be pulled before the closing statement is signed. If the property was ever a short-term rental, our the short-term rental material participation rules covers the participation questions that surround that use. And when the rental was long-term, the passive-loss rules in the passive activity loss rules and $25,000 allowance shape how any prior suspended losses release at sale.
How is the sale reported on Form 8949 and Schedule D?
A sale that fully qualifies for the exclusion is often not reportable at all, but there are two triggers that put it on the return anyway. The IRS states them: "If you receive an informational income-reporting document such as Form 1099-S, Proceeds From Real Estate Transactions, you must report the sale of the home even if the gain from the sale is excludable. Additionally, you must report the sale of the home if you can't exclude all of your capital gain from income."[9] When either applies, the IRS directs the seller to "Use Schedule D (Form 1040), Capital Gains and Losses and Form 8949, Sales and Other Dispositions of Capital Assets when required to report the home sale."[9] Most Florida closings generate a Form 1099-S from the title company, so most sellers here end up reporting the transaction whether or not the excludable portion is taxable. The specifics of how the sale is reported (which box on Form 8949, which adjustment code for the excluded gain) determine whether the IRS matches the 1099-S cleanly. Bringing the full closing package to your individual tax return preparation engagement well before April is the practical way to avoid a matching notice later.

Are there special rules for servicemembers and other exceptions?
Federal law recognizes that people on qualifying government assignments cannot always meet the use test on a normal calendar. The IRS confirms the relief: "If you or your spouse are on qualified official extended duty in the Uniformed Services, the Foreign Service or the intelligence community, you may elect to suspend the five-year test period for up to 10 years."[10] Qualified official extended duty applies when the assignment is at a duty station at least 50 miles from the main home, or under government orders in government housing, for more than 90 days or for an indefinite period.[10] Peace Corps volunteers get a comparable path, and physical or mental incapacity that puts the taxpayer in a licensed care facility can count time in the facility toward the residence test. Each of these paths has to be documented in the return package; a servicemember who elects the suspension without preserving the underlying orders and dates loses the audit trail years later.
What should a Miami homeowner think about before closing?
The Section 121 exclusion is one of the largest personal tax breaks in the federal system, and the entire benefit is decided by facts written into a closing statement, a deed date, and a residence history. In practice, four planning moves recover the most value: line the closing date up so both the ownership and use tests are cleared by the time the settlement occurs, confirm that no other Section 121 exclusion was claimed on a prior sale within the previous 2-year period, reconcile any depreciation the property (or a portion of it) absorbed for post-1997 rental or business use, and preserve documentation for any partial exclusion trigger before the buyer takes possession. Federal thresholds have not moved since 1997 while Miami real estate values have, so a growing share of local sales now produce a gain above the $500,000 ceiling. What sits above the ceiling is taxable long-term capital gain that Florida state income tax does not touch (Florida has none), but federal capital gain tax certainly does. For a full picture that includes reinvestment options, timing, and estate implications, layer our advisory solutions engagement over the return preparation.
Frequently asked questions
Do I owe capital gains tax when I sell my primary residence?
For most homeowners meeting Section 121's ownership and use tests, no federal capital gains tax is owed on up to $250,000 of gain, or up to $500,000 on a joint return. Anything above that ceiling stays a long-term capital gain reported on Schedule D. Depreciation claimed for post-May 6, 1997 business or rental use of the home cannot be excluded and is taxed as unrecaptured Section 1250 gain.
What if I did not live in the home for 2 of the last 5 years?
The full exclusion is generally lost, but a partial exclusion may still be available when the sale was caused by a work-related move of at least 50 miles, a qualifying health event, or an unforeseeable event such as a home destroyed or condemned. The prorated ceiling equals the fraction of the 24-month use period actually met, applied against the $250,000 or $500,000 cap.
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, when the ownership and use tests are met, but with an important limit. Any depreciation deductions allowed or allowable for periods after May 6, 1997 for business or rental use of the home cannot be excluded and are taxed as unrecaptured section 1250 gain. Any period of nonresidential use of the home may also reduce the excludable portion.
Do I still have to report a home sale that qualifies for the full exclusion?
Yes, if the closing agent issued a Form 1099-S. Even when the entire gain is excludable, receiving a Form 1099-S triggers a duty to report the sale on Form 8949 and Schedule D of Form 1040. The reporting is also required whenever any portion of the gain exceeds the exclusion.
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
- Topic no. 701: Suspension of the five-year test period · Internal Revenue Service
Continue reading

Passive Activity Loss Rules: The $25,000 Rental Real Estate Special Allowance
Rental real estate losses are passive by default and can only offset passive income. A special $25,000 allowance lets active-participation landlords deduct losses against wages, but it phases out between $100,000 and $150,000 of modified adjusted gross income.

Real Estate Investor Tax Guide: How Passive Rules, Material Participation, and the Home Sale Exclusion Fit Together
Rental real estate is passive by default, so losses can only offset passive income. Real estate professional status, active participation, short-term rental treatment, and Section 121 each change that answer. Here is how the framework fits together.

Real Estate Professional Status: 750 Hours, Half Your Time, and Grouping
Rental losses are passive by default. Real estate professional status takes more than 750 hours in real property trades or businesses plus more than half of all your personal services, and you must still materially participate in each rental activity.
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

