PIVOT/RESET

Empty nest · When the last child leaves

Do I pay tax when I sell my home?

Often not. If the home was your main home, the home sale tax exclusion lets you leave up to $250,000 of gain out of your income, or up to $500,000 on a joint return. You must have owned the home and lived in it for at least 24 months of the 5 years before the sale. Gain above the limit is taxed.

Check the two tests with your numbers

Count months in the 5 years that end on the sale date.

Gain you can exclude

$320,000

You meet both tests and the whole gain is inside the $500,000 limit for a joint return. You still report the sale if you receive Form 1099-S.
Ownership test
60 of 24 months
Use test
60 of 24 months
Gain left to tax
$0

The two tests, side by side

TestWhat the IRS asksOn a joint return
OwnershipYou owned the home for at least 24 months (2 years) out of the last 5 years leading up to the date of the saleEither spouse can meet it
UseYou used the home as a residence for at least 24 months (2 years) of the previous 5 yearsEach spouse must meet it individually
No recent exclusionYou did not exclude gain on another home during the two-year period prior to the sale of your homeCheck both spouses' past sales

IRS Publication 523 adds: 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.

How much you can exclude

How you fileGain you can exclude
On your ownUp to $250,000
Jointly with your spouseUp to $500,000

The limit applies to gain, not to the sale price. Publication 523 has worksheets to figure the gain. They start from your total basis, which it describes as the total amount you invested in your home.

Before you list the home

  1. Count your months. Work back 5 years from the likely sale date. Publication 523 says: A vacation or other short absence counts as time you lived at home (even if you rented out your home while you were gone).
  2. Gather your cost records. Your basis is the total amount you invested in your home, so find the purchase papers and receipts for improvements.
  3. Estimate the gain. If it is above your limit, the part above is taxed, so plan for it.
  4. Check the date. If you are a few months short of 24, a later closing date can change the answer.

Then weigh the move itself in downsize or stay?

When you must report the sale

  • You receive Form 1099-S. The IRS says you must report the sale of the home even if the gain from the sale is excludable.
  • Part of the gain is taxable. The IRS says you must report the sale of the home if you can't exclude all of your capital gain from income.

When you report, use Schedule D (Form 1040), Capital Gains and Losses, and Form 8949, Sales and Other Dispositions of Capital Assets. See how the sale sits in the whole year with how will this change my taxes?

If you do not meet the tests

Falling short does not always mean the whole gain is taxed. IRS Publication 523 covers exceptions to the two-year rule. It has sections on a work-related move, a health-related move and unforeseeable events, and a section for surviving spouses. Read the one that fits before you set a sale date.

Members of the Uniformed Services, the Foreign Service and the intelligence community have their own rule. On qualified official extended duty, you may elect to suspend the five-year test period for up to 10 years.

Selling after the children leave

Three questions sit beside the tax one.

If the home came to you from a parent or spouse, different rules set the gain. See taxes on selling an inherited house, and keep the rest of the empty nest path in order.

Quick answers

How much gain can I exclude when I sell my home?

Up to $250,000, or up to $500,000 if you file a joint return with your spouse, when you meet the ownership and use tests.

What is the 2 out of 5 year rule?

You must have owned the home for at least 24 months (2 years) out of the last 5 years leading up to the date of the sale, and used the home as a residence for at least 24 months (2 years) of the previous 5 years. The IRS says you must meet both tests during the 5-year period ending on the date of the sale.

Do both spouses have to meet the tests?

Not both tests. On a joint return, either you or your spouse must meet the ownership test while both you and your spouse must meet the use test individually. Publication 523 puts it this way: each spouse must meet the residence requirement individually for a married couple filing jointly to get the full exclusion.

Can I use the exclusion more than once?

Yes, but not within two years. You are not eligible if you excluded the gain from the sale of another home during the two-year period prior to the sale of your home. Publication 523 says: You may take the exclusion only once during a 2-year period.

Do I have to report the sale on my tax return?

In two cases. If you receive Form 1099-S, you must report the sale of the home even if the gain from the sale is excludable. And you must report the sale of the home if you can't exclude all of your capital gain from income.

Which forms report a home sale?

When you are required to report it, the IRS says to use Schedule D (Form 1040), Capital Gains and Losses, and Form 8949, Sales and Other Dispositions of Capital Assets.

What if I was away on military or government service?

For 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.

What if I do not meet the two-year tests?

IRS Publication 523, Selling Your Home, covers exceptions to the two-year rule, with sections on a work-related move, a health-related move and unforeseeable events. Read it or ask a tax professional before you set the sale date.

Next decision

Downsize or stay? What a move would cost, save and free up.

Open it

Empty nest · your dates

A child can usually stay on your health plan until they turn 26.

When that cover ends, their window to pick a Marketplace plan opens 60 days before and closes 60 days after. Put both dates on the calendar now.

Source: HealthCare.gov.

  • 2 dated steps worked out from your own date
  • 4 papers to gather, ticked off as you find them
  • 3 things to check you can claim
Put my dates on this pathSee a sample plan first

Every answer on this site stays free. Your own dated plan is the Pro Pass: one payment, and it never renews. What it includes

Sources

  1. Topic no. 701, Sale of your home (page last reviewed November 9, 2026), Internal Revenue Service. Checked December 2, 2026.
  2. Publication 523 (2025), Selling Your Home, Internal Revenue Service. Checked December 2, 2026.

Methodology, data and accuracy reviewed by Eskezeia Y. Dessie, PhD and Armin Allahverdy, PhDPublished Last reviewed How we check our numbers