Selling Your Home
Selling Your Home: law, regulations, guidance and cases
Every source this hub relies on, strongest first. Cases are labelled by court and whether they bind.
Code
- Code I.R.C. § 1(h)(1)(E), (h)(6) Unrecaptured section 1250 gainDefines unrecaptured section 1250 gain, long-term capital gain attributable to depreciation on real property, and taxes it at a maximum rate above the regular capital gain rates.
- Code I.R.C. § 1001(a)-(c) Determination of amount of and recognition of gain or lossGain is the amount realized over the adjusted basis; loss is the adjusted basis over the amount realized; the whole gain or loss is recognized unless another provision says otherwise.
- Code I.R.C. § 1012(a) Basis of property: costBasis is generally the cost of the property.
- Code I.R.C. § 1014(a), (b)(6) Basis of property acquired from a decedentProperty acquired from a decedent generally takes the fair market value at the date of death (or alternate valuation date); the surviving spouse's half of community property also steps up if at least half of the whole community interest was in the decedent's gross estate.
- Code I.R.C. § 1015(a) Basis of property acquired by giftA gift generally takes the donor's basis, except that for determining a loss the basis cannot exceed fair market value at the time of the gift.
- Code I.R.C. § 1016(a)(1), (a)(2) Adjustments to basisBasis is increased by expenditures properly chargeable to capital account and decreased by depreciation allowed, or allowable if greater.
- Code I.R.C. § 1041 Transfers of property between spouses or incident to divorceNo gain or loss on a transfer to a spouse, or to a former spouse incident to the divorce (within one year of the end of the marriage or related to it); the receiving spouse takes the transferor's adjusted basis; not available if the receiving spouse is a nonresident alien.
- Code I.R.C. § 108(a)(1)(E) Qualified principal residence indebtednessExcludes from income qualified principal residence indebtedness discharged before January 1, 2026, or discharged under an arrangement entered into and evidenced in writing before January 1, 2026. The Code text through P.L. 119-121 has no later date.
- Code I.R.C. § 121 Exclusion of gain from sale of principal residenceExcludes gain on the sale of a principal residence that the taxpayer owned and used for periods aggregating two years or more in the five years before the sale, up to a dollar cap, with special rules for joint returns, early sales, spouses, service members and depreciation.
19 paragraphs
- 121(a) Gross income does not include gain on the sale of property owned and used as the taxpayer's principal residence for periods aggregating 2 years or more during the 5-year period ending on the date of sale.
- 121(b)(1) The exclusion cannot exceed $250,000. The amount is written into the statute and is not indexed.
- 121(b)(2) On a joint return the cap is $500,000 if either spouse meets the ownership test, both meet the use test and neither is barred by the once-every-two-years rule; otherwise it is the sum of each spouse's own cap, and each spouse is treated as owning the property for the period either owned it.
- 121(b)(3) The exclusion does not apply if, in the 2-year period ending on the date of sale, the taxpayer had another sale to which section 121 applied.
- 121(b)(4) An unmarried surviving spouse gets the joint-return cap if the sale is within 2 years after the spouse's death and the joint-return requirements were met immediately before the death.
- 121(b)(5) Gain allocated to periods of nonqualified use (periods on or after January 1, 2009 when the property was not the taxpayer's, spouse's or former spouse's principal residence) is not excluded, by the ratio of nonqualified-use time to total ownership time; listed periods are not nonqualified use, including time after the last day of residence in the five-year window, up to 10 years of qualified extended duty, and up to 2 years of temporary absence for work, health or unforeseen circumstances.
- 121(c) A taxpayer who fails the ownership, use or once-every-two-years test gets a reduced cap, the full cap times the shorter of qualifying time or time since the last excluded sale over 2 years, if the sale is by reason of a change in place of employment, health or, as regulations provide, unforeseen circumstances.
- 121(d)(2) An unmarried individual whose spouse is deceased on the date of sale counts the deceased spouse's time of ownership and use.
- 121(d)(3) Ownership counts the time a spouse or former spouse owned the property when it came in a section 1041 transfer; a spouse or former spouse's use under a divorce or separation instrument counts as the owner's use. Only ownership time carries over on a transfer; use time does not.
- 121(d)(4) A tenant-stockholder in a cooperative housing corporation applies the ownership test to the stock and the use test to the apartment.
- 121(d)(5) Destruction, theft, seizure, requisition or condemnation is treated as a sale; section 121 applies before section 1033, and the excluded gain is reflected in the replacement property's basis.
- 121(d)(6) The exclusion does not apply to gain up to the depreciation adjustments attributable to periods after May 6, 1997.
- 121(d)(7) A taxpayer unable to care for themselves who used the home as a principal residence for at least 1 year in the five-year period is treated as using it as a principal residence while living in a licensed care facility.
- 121(d)(8) A taxpayer may elect to apply section 121 to the sale of a remainder interest, but not if the buyer is a related party.
- 121(d)(9) On election, the five-year period is suspended during qualified extended duty (uniformed services, Foreign Service, intelligence community) of the taxpayer or spouse, for no more than 10 years, one property at a time.
- 121(d)(10) Property acquired in a section 1031 exchange does not qualify if sold within 5 years after the acquisition.
- 121(d)(12) The same suspension election is available for a Peace Corps employee or enrolled volunteer serving outside the United States.
- 121(e) The exclusion does not apply to an individual subject to the expatriate-tax rule of section 877(a)(1).
- 121(f) A taxpayer may elect not to have section 121 apply to a sale.
- Code I.R.C. § 1411(a), (b), (c)(1)(A)(iii) Net investment income taxA tax on the lesser of net investment income or the excess of modified adjusted gross income over a threshold; net investment income includes net gain from the disposition of property only to the extent it is taken into account in computing taxable income, so gain excluded under section 121 is not in it.
- Code I.R.C. § 143(m) Recapture of federal mortgage subsidyOn a disposition of a home financed with a qualified mortgage bond or under a mortgage credit (MCC) program, tax is increased by the lesser of the recapture amount or half of the gain, with no recapture for a disposition by reason of death or more than 9 years after the testing date.
- Code I.R.C. § 164(b)(6), (b)(7) Taxes: real property taxes and the state and local tax limitAllows a deduction for state and local real property taxes, subject to the limit in subsection (b)(6) and (b)(7), and apportions real property taxes between buyer and seller in a sale (subsection (d)).
- Code I.R.C. § 217(k) Moving expenses: suspensionSection 217 does not apply to taxable years beginning after 2017 except for members of the Armed Forces (subsection (g)) and, since P.L. 119-21, employees and new appointees of the intelligence community who move on a change of assignment.
- Code I.R.C. § 25C(g), (i) Energy efficient home improvement creditThe credit reduces the basis of the property by the amount allowed, and does not apply to property placed in service after December 31, 2025.
- Code I.R.C. § 25D(f), (h) Residential clean energy creditThe credit reduces the basis of the property by the amount allowed, and does not apply to expenditures made after December 31, 2025.
- Code I.R.C. § 6045(e) Information returns for real estate transactionsThe real estate reporting person (closing agent, then lender, then brokers) files an information return on a real estate transaction; (e)(5) excepts the sale of a principal residence for no more than the stated amount when the seller gives written assurance that it is the principal residence and the full gain is excludable.
Session law
- Session law Pub. L. 119-21 § 70113 Moving expense suspension made permanent; intelligence community exceptionMade the section 217(k) suspension permanent and added a rule treating intelligence community employees on a change of assignment like members of the Armed Forces.
- Session law Pub. L. 119-21 § 70120 State and local tax limit for 2025 through 2029Raises the section 164(b) limit for 2025 and adjusts it for later years through 2029, with a phase-down for high incomes.
- Session law Pub. L. 119-21 § 70505 Energy efficient home improvement credit terminatedEnds the section 25C credit for property placed in service after 2025.
- Session law Pub. L. 119-21 § 70506 Residential clean energy credit terminatedEnds the section 25D credit for expenditures made after 2025.
Regulation
- Regulation Treas. Reg. § 1.121-1 Exclusion of gain from sale or exchange of a principal residencePrincipal residence is a facts-and-circumstances test; the two-year tests can be met with 24 months or 730 days and need not be concurrent; short temporary absences count as use; vacant land, trusts, single-owner entities, out-of-residence care, depreciation after May 6, 1997 and mixed business use are covered with examples.
6 paragraphs
- 1.121-1(b)(2) Where a taxpayer uses more than one home, the one used a majority of the time ordinarily is the principal residence; relevant factors include place of employment, family's abode, addresses on returns, licenses and registrations, mailing address, banks and clubs.
- 1.121-1(b)(3) Vacant land is part of the principal residence only if adjacent, used as part of it, and the dwelling is sold within 2 years before or after the land, with one dollar cap for the combined sales.
- 1.121-1(c)(1) The tests may be met with 24 full months or 730 days, and ownership and use may be met in nonconcurrent periods within the five-year window.
- 1.121-1(c)(2) Occupancy is required for the use test, but short temporary absences such as vacations count as use even if the home is rented while away; time in a licensed care facility counts for someone who cannot care for themselves.
- 1.121-1(d) Gain up to the depreciation adjustments for periods after May 6, 1997 is not excluded (and is unrecaptured section 1250 gain).
- 1.121-1(e) Business use inside the same dwelling unit needs no allocation (only depreciation is taxed); a separate dwelling unit or separate structure used for business or rental must be allocated using the same method used for depreciation.
- Regulation Treas. Reg. § 1.121-2 LimitationsOne maximum exclusion per principal residence; joint owners who file separately each get a cap on their own share; the joint-return rules, the once-every-two-years rule and examples including a spouse who dies before the sale.
- Regulation Treas. Reg. § 1.121-3 Reduced maximum exclusion for taxpayers failing to meet certain requirementsDefines the change of employment, health and unforeseen-circumstances reasons, the primary-reason test and its safe harbors (including a distance safe harbor of 50 miles and a physician-recommendation safe harbor), who counts as a qualified individual and how to compute the reduced cap.
6 paragraphs
- 1.121-3(b) If no safe harbor applies, the primary reason for the sale must be a change in employment, health or unforeseen circumstances, judged on all the facts, using listed factors.
- 1.121-3(c)(2) Distance safe harbor: the new place of employment is at least 50 miles farther from the home than the old one, or at least 50 miles from the home if there was none.
- 1.121-3(d) Health: a sale to obtain, provide or facilitate diagnosis, cure, mitigation or treatment of disease, illness or injury; a physician's recommendation is a safe harbor; merely beneficial to general health does not count.
- 1.121-3(e) Unforeseen circumstances: safe harbors for involuntary conversion, casualty, death, qualifying unemployment, inability to pay basic costs after an employment change, divorce or legal separation, and multiple births; a preference for a different home or an improvement in finances does not qualify.
- 1.121-3(f) A qualified individual is the taxpayer, spouse, co-owner or a person sharing the same household (and, for health, certain relatives).
- 1.121-3(g) The reduced cap is the dollar cap times a fraction: the shortest of ownership time, use time or time since a prior excluded sale, over 730 days or 24 months.
- Regulation Treas. Reg. § 1.121-4 Special rulesDeceased spouse's ownership and use, divorce transfers and use under a divorce instrument, co-ops, involuntary conversions, partial interests and remainder interests, expatriates, and the election not to apply section 121 (changeable within 3 years of the unextended due date).
- Regulation Treas. Reg. § 1.121-5 Suspension of 5-year period for certain members of the uniformed services and Foreign ServiceExplains the election to suspend the five-year period during qualified extended duty, made by filing a return that does not include the gain. The regulation addresses the uniformed services and the Foreign Service; the intelligence-community and Peace Corps suspensions are in the statute.
IRS guidance
- Notice Notice 2002-60 Reduced exclusion for taxpayers affected by September 11, 2001 IRS guidance (limited to the events described)The Commissioner determined that taxpayers affected by the September 11, 2001 attacks in listed ways qualify for the reduced exclusion by reason of unforeseen circumstances. An example of how the IRS designates events beyond the regulation's safe harbors.
- Rev. Proc. Rev. Proc. 2005-14 Sections 121 and 1031 applied to a single exchangeExplains how section 121 and section 1031 apply together when a taxpayer exchanges property that was partly a principal residence and partly business or investment property, and confirms that square footage is an appropriate way to allocate basis and amount realized between residential and business portions.
- Rev. Proc. Rev. Proc. 2007-12 Seller certification for the Form 1099-S principal-residence exceptionSets out the sample written certification a seller of a principal residence can give a closing agent so the sale is excepted from information reporting under section 6045(e)(5).
- Rev. Proc. Rev. Proc. 2013-13, § 4.06 Safe harbor home-office deductionA taxpayer using the safe harbor (simplified) method for a year cannot deduct depreciation for the business part of the home that year, and the depreciation deduction for that year is deemed to be zero.
Case
- Case DeBough v. Commissioner, 799 F.3d 1210 (8th Cir. 2015) Installment sale of a home, buyer defaults, seller reacquires Court of appeals opinion; precedential in the Eighth CircuitA seller who excluded gain on an installment sale of his residence reacquired it after the buyer defaulted and did not resell it within a year. The Eighth Circuit affirmed that the earlier excluded gain could not be used again to reduce gain on the reacquisition under section 1038; the one-year resale rule in section 1038(e) is the exception that keeps the exclusion in play.
- Case Gates v. Commissioner, 135 T.C. 1 (2010) House demolished and replaced, never lived in Tax Court (regular) opinion; precedentialTaxpayers lived in a house for two years, tore it down and built a new one that they never occupied and sold. The Tax Court held that gain on the new house could not be excluded under section 121 because the new house was never used as their principal residence; it also held them liable for the late-filing addition to tax.
Not precedent
- Case Farah v. Commissioner, T.C. Memo. 2007-369 Which of two homes is the principal residence Tax Court memorandum; not precedentialApplying Treas. Reg. 1.121-1(b)(2) on all the facts, the court held that a couple's Berlin, Maryland house was their principal residence for the periods they lived there even though their tax returns, licenses and registrations kept the old address, and that the gain on an adjacent lot owned through a family partnership was not excludable because they did not prove they owned it.
- Case Webert v. Commissioner, T.C. Memo. 2022-32 Rented house sold years later Tax Court memorandum on a summary judgment motion; not precedentialOn the Commissioner's motion for summary judgment, a couple who rented out their former home for six years and never lived in it during the five years before the sale did not meet the use test. The court explained that the health-based reduced exclusion still needs some use in the five-year period (a zero numerator gives a zero exclusion) and left health reasons for later proceedings.
- Case Wickersham v. Commissioner, T.C. Memo. 2011-178 Home and towing business on one parcel; easement sale Tax Court memorandum; not precedentialOn a parcel with a residence and a separate towing business, the court allocated basis and proceeds between the parts. It treated the residential portion of a permanent easement sold to a county as eligible for section 121 because the rest of the property was sold within two years under Treas. Reg. 1.121-1(b)(3), and it found no accuracy-related penalty.
Form or publication
- Publication IRS Publication 523 (2025), Selling Your Home Selling Your Home Publication (not authority)The IRS's plain-language guide, with a step-by-step eligibility test, three worksheets, basis rules, mixed business use, nonqualified use and reporting. The 2025 edition is dated February 26, 2026; its What's New items cover energy credits and opportunity zones, not section 121.
- Form instructions Instructions for Form 1099-S (Rev. 12-2026) Proceeds From Real Estate Transactions Form instructions (not authority)Says a sale of a main home may be reportable even if the gain is excludable, lists the exceptions (including the seller's certification on a principal residence sold for no more than the stated amounts), and how the closing date is determined.
- Form instructions Instructions for Form 8949 (2025) Sales and Other Dispositions of Capital Assets Form instructions (not authority)Shows how to report a home sale on Part II (box F at the top of Part II when a Form 1099-S was received; box L is for digital assets), with code E for unreported selling expenses and code H for the exclusion, and an example in which the excluded gain nets to zero.
- Form instructions Instructions for Schedule D (Form 1040) (2025), Sale of Your Home Capital Gains and Losses Form instructions (not authority)Says to report the sale of a main home on Form 8949 if you cannot exclude all the gain or if you received Form 1099-S, and summarizes the two tests, the reduced exclusion, the surviving-spouse rule, the suspension election and the like-kind exchange rule.
Where the numbers come from
Checked
Every figure above comes from the source listed here, with the date we checked it and the date it is due for a re-check.
- Home sale: depreciation cutoff dateIRC 121(d)(6) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.depreciation_cutoff_date - Home sale: election change window yearsTreas. Reg. 1.121-4(g) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.election_change_window_years - Home sale: employment safe harbor milesTreas. Reg. 1.121-3(c)(2)(ii) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.employment_safe_harbor_miles - Home sale: extended duty suspension maximum yearsIRC 121(d)(9)(B) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.extended_duty_suspension_max_years - Home sale: incapacity minimum residence yearsIRC 121(d)(7) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.incapacity_min_residence_years - Home sale: like kind holding yearsIRC 121(d)(10) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.like_kind_holding_years - Home sale: mortgage subsidy recapture yearsIRC 143(m)(2)(B) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.mortgage_subsidy_recapture_years - Home sale: nonqualified use extended duty maximum yearsIRC 121(b)(5)(C)(ii)(II) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.nonqualified_use_extended_duty_max_years - Home sale: nonqualified use start dateIRC 121(b)(5)(C)(i) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.nonqualified_use_start_date - Home sale: ownership use test yearsIRC 121(a) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.ownership_use_test_years - Home sale: repeat sale lookback yearsIRC 121(b)(3) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.repeat_sale_lookback_years - Home sale: surviving spouse sale window yearsIRC 121(b)(4) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.surviving_spouse_sale_window_years - Home sale: temporary absence maximum yearsIRC 121(b)(5)(C)(ii)(III) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.temporary_absence_max_years - Home sale: vacant land window yearsTreas. Reg. 1.121-1(b)(3)(i)(C) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.vacant_land_window_years - Home sale exclusion: maximum gain excluded26 U.S.C. sec. 121(b) checked 2026-09-24, review by 2027-01-22
federal-2026:home_sale_exclusion.max_gain_excluded