
Guides
Section 121 of the Internal Revenue Code allows a taxpayer to exclude a substantial amount of gain from the sale of a primary residence from federal income tax, without any requirement to reinvest the proceeds into another home. This is a fundamentally different mechanism than Section 1031 deferral, which requires acquiring replacement property to defer gain on investment real estate. The Section 121 exclusion is a permanent exclusion, not a deferral, meaning gain that qualifies is simply removed from taxable income rather than carried forward into a future transaction.
To qualify, a taxpayer generally must have owned and used the property as a primary residence for at least two of the five years immediately preceding the sale. The ownership and use periods do not need to be continuous or to overlap perfectly, and short temporary absences, such as vacations, generally do not interrupt the use test, though longer absences require a closer look at the specific facts. A single taxpayer can exclude up to two hundred fifty thousand dollars of gain, while a married couple filing jointly can exclude up to five hundred thousand dollars, provided both spouses meet the use test and at least one spouse meets the ownership test.
The exclusion is generally available only once every two years, measured from the date of a prior sale where the exclusion was claimed. A taxpayer who sold a home and claimed the exclusion within the past two years generally cannot claim it again on a second sale until that two-year window has passed, though a reduced exclusion may be available in certain circumstances involving a change in employment, health, or other unforeseen circumstances specified in the Treasury Regulations, even if the full two-year period has not elapsed.
Gain attributable to periods of nonqualified use, generally meaning periods after 2008 during which the property was not used as the taxpayer's primary residence, such as when it was rented out before or after the primary residence period, is generally not eligible for the exclusion, even if the overall two-of-five-year ownership and use test is otherwise satisfied. This nonqualified use gain is calculated as a ratio of nonqualified use time to total ownership time, applied against the total gain, which means a Boston, MA homeowner who rented a property for several years before moving in, then lived in it as a primary residence, will generally have a portion of the total gain carved out from the exclusion and treated as taxable regardless of the eventual sale timing.
Periods of nonqualified use do not include time after the last date the property was used as a primary residence, up to the date of sale, provided that period falls within the general two-year window contemplated by the statute, and they also generally exclude any period before 2009, since the nonqualified use rule itself was introduced with an effective date. This makes the nonqualified use calculation genuinely fact-specific, and it is a common area where a Boston, MA homeowner's assumption about how much gain qualifies for exclusion differs from the actual calculation once the full ownership timeline is reviewed.
For a property that has both qualifying primary residence use and a period of rental or investment use, Revenue Procedure 2005-14 allows the Section 121 exclusion to be combined with a Section 1031 exchange, applying the exclusion first to gain up to the applicable limit and using an exchange to defer any remaining gain attributable to the investment-use portion, subject to the nonqualified use limitations described above. This combined approach is explored in more detail in the site's Home Sale Capital Gains explainer, which walks through how the two provisions interact for a property with mixed personal and rental history.
Common replacement classes
Section 121 of the Internal Revenue Code allows a taxpayer to exclude a substantial amount of gain from the sale of a primary residence from federal income tax, without any requirement to reinvest the proceeds into another home. This is a fundamentally different mechanism than Section 1031 deferral, which requires acquiring replacement property to defer gain on investment real estate. The Section 121 exclusion is a permanent exclusion, not a deferral, meaning gain that qualifies is simply removed from taxable income rather than carried forward into a future transaction.
To qualify, a taxpayer generally must have owned and used the property as a primary residence for at least two of the five years immediately preceding the sale. The ownership and use periods do not need to be continuous or to overlap perfectly, and short temporary absences, such as vacations, generally do not interrupt the use test, though longer absences require a closer look at the specific facts. A single taxpayer can exclude up to two hundred fifty thousand dollars of gain, while a married couple filing jointly can exclude up to five hundred thousand dollars, provided both spouses meet the use test and at least one spouse meets the ownership test.
The exclusion is generally available only once every two years, measured from the date of a prior sale where the exclusion was claimed. A taxpayer who sold a home and claimed the exclusion within the past two years generally cannot claim it again on a second sale until that two-year window has passed, though a reduced exclusion may be available in certain circumstances involving a change in employment, health, or other unforeseen circumstances specified in the Treasury Regulations, even if the full two-year period has not elapsed.
Gain attributable to periods of nonqualified use, generally meaning periods after 2008 during which the property was not used as the taxpayer's primary residence, such as when it was rented out before or after the primary residence period, is generally not eligible for the exclusion, even if the overall two-of-five-year ownership and use test is otherwise satisfied. This nonqualified use gain is calculated as a ratio of nonqualified use time to total ownership time, applied against the total gain, which means a Boston, MA homeowner who rented a property for several years before moving in, then lived in it as a primary residence, will generally have a portion of the total gain carved out from the exclusion and treated as taxable regardless of the eventual sale timing.
Periods of nonqualified use do not include time after the last date the property was used as a primary residence, up to the date of sale, provided that period falls within the general two-year window contemplated by the statute, and they also generally exclude any period before 2009, since the nonqualified use rule itself was introduced with an effective date. This makes the nonqualified use calculation genuinely fact-specific, and it is a common area where a Boston, MA homeowner's assumption about how much gain qualifies for exclusion differs from the actual calculation once the full ownership timeline is reviewed.
For a property that has both qualifying primary residence use and a period of rental or investment use, Revenue Procedure 2005-14 allows the Section 121 exclusion to be combined with a Section 1031 exchange, applying the exclusion first to gain up to the applicable limit and using an exchange to defer any remaining gain attributable to the investment-use portion, subject to the nonqualified use limitations described above. This combined approach is explored in more detail in the site's Home Sale Capital Gains explainer, which walks through how the two provisions interact for a property with mixed personal and rental history.
Common replacement classes
Section 121 of the Internal Revenue Code allows a taxpayer to exclude a substantial amount of gain from the sale of a primary residence from federal income tax, without any requirement to reinvest the proceeds into another home. This is a fundamentally different mechanism than Section 1031 deferral, which requires acquiring replacement property to defer gain on investment real estate. The Section 121 exclusion is a permanent exclusion, not a deferral, meaning gain that qualifies is simply removed from taxable income rather than carried forward into a future transaction.
To qualify, a taxpayer generally must have owned and used the property as a primary residence for at least two of the five years immediately preceding the sale. The ownership and use periods do not need to be continuous or to overlap perfectly, and short temporary absences, such as vacations, generally do not interrupt the use test, though longer absences require a closer look at the specific facts. A single taxpayer can exclude up to two hundred fifty thousand dollars of gain, while a married couple filing jointly can exclude up to five hundred thousand dollars, provided both spouses meet the use test and at least one spouse meets the ownership test.
The exclusion is generally available only once every two years, measured from the date of a prior sale where the exclusion was claimed. A taxpayer who sold a home and claimed the exclusion within the past two years generally cannot claim it again on a second sale until that two-year window has passed, though a reduced exclusion may be available in certain circumstances involving a change in employment, health, or other unforeseen circumstances specified in the Treasury Regulations, even if the full two-year period has not elapsed.
Gain attributable to periods of nonqualified use, generally meaning periods after 2008 during which the property was not used as the taxpayer's primary residence, such as when it was rented out before or after the primary residence period, is generally not eligible for the exclusion, even if the overall two-of-five-year ownership and use test is otherwise satisfied. This nonqualified use gain is calculated as a ratio of nonqualified use time to total ownership time, applied against the total gain, which means a Boston, MA homeowner who rented a property for several years before moving in, then lived in it as a primary residence, will generally have a portion of the total gain carved out from the exclusion and treated as taxable regardless of the eventual sale timing.
Periods of nonqualified use do not include time after the last date the property was used as a primary residence, up to the date of sale, provided that period falls within the general two-year window contemplated by the statute, and they also generally exclude any period before 2009, since the nonqualified use rule itself was introduced with an effective date. This makes the nonqualified use calculation genuinely fact-specific, and it is a common area where a Boston, MA homeowner's assumption about how much gain qualifies for exclusion differs from the actual calculation once the full ownership timeline is reviewed.
For a property that has both qualifying primary residence use and a period of rental or investment use, Revenue Procedure 2005-14 allows the Section 121 exclusion to be combined with a Section 1031 exchange, applying the exclusion first to gain up to the applicable limit and using an exchange to defer any remaining gain attributable to the investment-use portion, subject to the nonqualified use limitations described above. This combined approach is explored in more detail in the site's Home Sale Capital Gains explainer, which walks through how the two provisions interact for a property with mixed personal and rental history.
Common replacement classes
A single taxpayer can exclude up to two hundred fifty thousand dollars of gain, and a married couple filing jointly can exclude up to five hundred thousand dollars, provided the ownership and use tests are satisfied for at least two of the five years before the sale.
Generally once every two years, measured from a prior sale where the exclusion was claimed. A reduced exclusion may be available sooner in certain circumstances involving employment change, health, or other unforeseen circumstances defined in the Treasury Regulations.
Nonqualified use generally refers to periods after 2008 when the property was not used as the taxpayer's primary residence, such as a rental period before or after primary residence use. Gain attributable to that period, calculated as a ratio of nonqualified use time to total ownership time, is generally not eligible for the exclusion.
No. Unlike a 1031 exchange, the Section 121 exclusion is a permanent exclusion from income, not a deferral, and does not require the taxpayer to purchase another home or reinvest the proceeds in any particular way.
Yes, for a property with both primary residence and investment use. Under Revenue Procedure 2005-14, the exclusion applies first to gain up to the applicable limit, and a 1031 exchange can defer remaining gain attributable to the investment-use portion, subject to the nonqualified use limitations.

Ready to Begin?
Share your timelines and acquisition targets and we will deliver a prioritized property roadmap for your identification window.
Start Your Briefing