Skip to content

General education, not advice for your situation.

Carry Forward Learning Search the site

Selling Your Home

Selling Your Home: the basics

Same facts. Pro adds the full authority stack under each answer.

What is the home sale exclusion?

It's a rule that lets you leave part or all of the profit from selling your main home out of your income. If you qualify, the first slice of gain, up to a dollar cap, is simply not taxed. Plenty of home sellers never owe a cent on the sale, and many never have to report it.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(a) provides that gross income does not include gain from the sale or exchange of property owned and used as the taxpayer's principal residence for periods aggregating the required time in the five years before the sale. The exclusion is automatic if you qualify; 121(f) lets you elect out.

How much gain can I exclude?

Up to $250,000 if you're single (or married filing separately), and up to $500,000 if you're married and file a joint return and meet the extra tests for couples. Those amounts are written into the law and don't rise with inflation.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-2
  3. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(b)(1) and (b)(2)(A). The amounts are statutory and not indexed. The joint-return tests are in 121(b)(2)(A)(i)-(iii); Reg. 1.121-2(a)(3) restates them.

Is the cap measured against the sale price or the gain?

The gain, not the price. Gain is what you got from the sale (after selling costs) minus your basis, which is roughly what you paid plus what you put into the house. A home can sell for far more than the cap and still be fully excluded if the gain is small.
Sources

Authority, strongest first

  1. Code I.R.C. § 1001(a)-(c)
  2. Publication IRS Publication 523 (2025), Selling Your Home
Section 1001(a) defines gain as the amount realized over the adjusted basis. Pub. 523 Worksheet 2 walks through sale price, selling expenses, amount realized, total basis, basis adjustments and adjusted basis.

What are the ownership and use tests?

During the 5 years before the sale, you must have owned the home for at least 2 years, and lived in it as your main home for at least 2 years. You also can't have used the exclusion on a different home sale in the last 2 years.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-1
  3. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(a) and (b)(3). Reg. 1.121-1(c)(1) says the two years can be shown by 24 full months or 730 days. Ownership and use are separate tests and need not be concurrent.

Do the years have to be in a row?

No. You need 2 years in total (that's 24 full months or 730 days), and they can be scattered anywhere inside the 5 years before the sale. The owning and the living there don't even have to happen in the same 2 years.
Sources

Authority, strongest first

  1. Regulation Treas. Reg. § 1.121-1
  2. Publication IRS Publication 523 (2025), Selling Your Home
Reg. 1.121-1(c)(1) and (c)(4) Examples 3 and 5. Example 3 shows a renter who bought his townhouse and then moved out: use from before the purchase counted because both tests were met somewhere in the five-year window.

Do I have to do anything to get the exclusion?

If you qualify and the whole gain fits under the cap, you generally don't report the sale at all, unless you received a Form 1099-S. You can also choose not to use the exclusion for a particular sale, which sometimes makes sense.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-4
  3. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(f) and Reg. 1.121-4(g): the election not to apply section 121 is made by filing a return that includes the gain, and can be made or revoked within the period in the regulation.

Can I deduct a loss if I sell my home for less than I paid?

No. A loss on your own home is a personal loss, and the IRS doesn't let you deduct it. You also don't owe tax on the money you received. If you get a Form 1099-S you may still need to report the sale, even though there's no gain.
Sources

Authority, strongest first

  1. Publication IRS Publication 523 (2025), Selling Your Home
  2. Form instructions Instructions for Form 8949 (2025)
Pub. 523, Worksheet 2, line 7: a negative result means a nondeductible loss. The Instructions for Form 8949 have a code for reporting a nondeductible loss when a Form 1099-S was received.

What counts as a home for this rule?

A house, condo, co-op apartment, mobile home or houseboat can each qualify, as long as it's where you actually live. It has to be your main home, not a vacation place or a rental you never lived in.
Sources

Authority, strongest first

  1. Regulation Treas. Reg. § 1.121-1
  2. Publication IRS Publication 523 (2025), Selling Your Home
Reg. 1.121-1(b)(1) lists a houseboat, a house trailer, and the house or apartment a tenant-stockholder is entitled to occupy in a cooperative housing corporation. Personal property that is not a fixture under local law is not a residence.

Did anything change for 2026?

Section 121 itself didn't change: same tests, same $250,000 and $500,000 caps, and the caps still don't rise with inflation. What changed around it: the two big home energy credits ended for improvements made in 2026 and later; the exclusion for forgiven home-mortgage debt ended for most debt forgiven in 2026; Form 1099-S gets new digital asset boxes for 2026 and some boxes were renumbered; and if you itemize, the cap on deducting state and local taxes is $40,400 for 2026.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Code I.R.C. § 108(a)(1)(E)
  3. Session law Pub. L. 119-21 § 70505
  4. Session law Pub. L. 119-21 § 70506
  5. Session law Pub. L. 119-21 § 70120
  6. Form instructions Instructions for Form 1099-S (Rev. 12-2026)
We read the Code text through P.L. 119-121 (October 9, 2026): the last amendment to section 121 is Pub. L. 115-97 (2017), and P.L. 119-21 amended none of sections 121, 1001, 1012, 1014, 1016, 1250, 1411, 6045, 1041, 143, 453 or 1038. P.L. 119-21 did terminate sections 25C and 25D (sections 70505-70506), make the section 217 suspension permanent (70113) and set the new section 164(b)(7) SALT cap (70120). Section 108(a)(1)(E) was not extended.

Which date counts: the contract, the closing or the day I moved out?

The closing date. If there's no Form 1099-S showing it, the date of sale is the earlier of the day title passes and the day the benefits and burdens of ownership shift to the buyer. The 5-year look-back counts back from that date, so a slipped closing can change your answer in either direction. Count your days to the closing, not the contract.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-1
  3. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(a): the 5-year period ends 'on the date of the sale or exchange'. Pub. 523 and the Instructions for Form 1099-S give the date of sale as the date title transfers or, if earlier, the date the benefits and burdens of ownership shift. Reg. 1.121-1(c)(1) allows 730 days to prove two years.

More questions

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: ownership use test days
    Treas. Reg. 1.121-1(c)(1) checked 2026-10-19, review by 2027-01-19
  • Home sale: ownership use test years
    IRC 121(a) checked 2026-10-19, review by 2027-01-19
  • Home sale: repeat sale lookback years
    IRC 121(b)(3) checked 2026-10-19, review by 2027-01-19
  • Home sale exclusion: maximum gain excluded
    26 U.S.C. sec. 121(b) checked 2026-09-24, review by 2027-01-22
  • Itemized deductions: salt cap
    26 U.S.C. sec. 164(b)(7)(A) checked 2026-09-24, review by 2027-01-22