Do You Get Taxed When You Sell a House?

Sell house. Make money. Right?

The only difference between a tax man and a taxidermist is that the taxidermist leaves the skin.
–Mark Twain

Statistically speaking, 64.8% of the people who read this website are homeowners. Given that the average homeowner owns a home for 13 years, that means, on average, 5% of the readers on this website will sell a house this year (an interesting pair of statistics: 5.34 million existing homes were sold in 2018, and there were 79.36 million existing homes in the United States).

Since housing prices have increased an average a 2.38% annually since 2000, it’s reasonable to expect that if you’re one of the 5% of the readers who will sell a house this year, you’ll make a profit on that sale.


But…whenever there’s profit, there’s usually Uncle Sam lurking around asking for his share.

If I Sell My House, Do I Pay Tax?

Fortunately, the IRS has a handy publication to help you determine if you owe taxes on the sale of your house. It’s IRS Publication 523, and it has a few steps to go through.

However, before we go through the details of determining exclusions, generally speaking, if you lived in the house for 2 of the past 5 years, then you do not have to paid capital gains tax on the first $250,000 of your sale if you are single or married filing separately, and $500,000 if you are married filing jointly or widowed and you sold the house within 2 years of the death of your spouse, you haven’t remarried at the time of the sale, and neither you nor your late spouse took the exclusion on another home sold less than 2 years before the date of the current home sale.

With that out of the way, let’s go through the eligibility test.

Eligibility Test Steps for Determining If the Sale of Your House Qualifies for a Capital Gains Tax Exclusion

  • Eligibility Test 1: Automatic Disqualification. You get to play the Price is Right sad trombone sound and pay full capital gains tax if either of the following are true:
    • You acquired the property through a like-kind exchange (1031 exchange), during the past 5 years.
    • You are subject to expatriate tax.
  • Eligibility Test 2: Ownership. This one is easy to determine. If you owned the home for at least 24 months (2 years) out of the last 5 years leading up to the date of sale (date of the closing), you meet the ownership requirement. For a married couple filing jointly, only one spouse has to meet the ownership requirement.
  • Eligibility Test 3: Residence. If you owned the home and used it as your residence for at least 24 months of the previous 5 years, you meet the residence requirement. 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. Unlike the ownership requirement, each spouse must meet the residence requirement individually for a married couple filing jointly to get the full exclusion. Even if you were away from home on a vacation or short absence (even if you rented the home out while you were away…!!!!), it still counts towards the residence requirement. (Note: I don’t know what the case law is. Nolo, the legal website, suggests even a 2 month absence would qualify but a 1 year sabbatical – to be a professor at another university, for example, would not qualify. It’s hard to tell where the line is. If in doubt, seek competent tax advice.) Also, if you are physically or mentally unable to care for yourself, that residency requirement is cut to 12 months, and time spent in a care facility, such as a nursing home, counts towards the residence requirement, so long as the facility has a license from a state or other political entity to care for people with your condition.
  • Eligibility Test 4: 2 year look-back. 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.
  • Eligibility Test 5: Exceptions to the Eligibility Test (doesn’t that seem circular or tautological??? You pass…unless we say you don’t pass!). There are several and too detailed for the scope of this article, so I’m just going to quote our friend IRS Publication 523 directly here:


  • Eligibility Step 6 – You made it to Go…do you collect $200? If you meet the ownership, residence, and look-back requirements, taking the exceptions into account, then you meet the Eligibility Test. Your home sale qualifies for the maximum exclusion. According to Worksheet 1 of IRS Publication 523, you qualify for either a $250,000 or a $500,000 capital gains exclusion, depending on your tax filing status. If you do not meet the full residence, ownership, and lookback requirements, then you, effectively, get to take the number of days that you do qualify, divide that number by 730, and multiply it by either $250,000 or $500,000, depending on your filing status, to determine your exclusion amount. Again, see Worksheet 1 of IRS Publication 523.

How Much is the Capital Gain in the Home I Sold?

That’s actually a fairly easy formula.


  • Sale price minus
  • Selling expenses (e.g. title fees, attorneys’ fees, Realtor commissions, etc.) minus
  • Adjustments in basis (e.g., if you added a new roof, added an addition, etc. See IRS Publication 551 for more details.

That’s it! If the capital gain is less than your exclusion, you owe $0 in capital gains taxes on the sale of your house. If the gain is greater than your exclusion, take the gain, subtract the exclusion, and that’s what you owe taxes on.

If you own a rental property and never lived in it, or haven’t lived in it for the past 5 years, then the calculation is slightly different. This article explains the tax implications of selling rental property.

Published by

Jason Hull was the co-founder of Broadtree Partners, a firm that acquires $1-5MM EBITDA companies. He also was the co-founder of open source search consultancy OpenSource Connections, a premier Solr and ElasticSearch firm. He and his wife FIREd (financial independence retire early) at 46 and 45, respectively. He has a BS from the United States Military Academy at West Point and a MBA from the University of Virginia Darden Graduate School of Business. He held a CFP certification from 2015 - 2021. You can read more about him in the About Page. If you live in Johnson County, Texas or the surrounding areas, he and his wife are cash buyers of Johnson County, Texas houses.

Leave a Reply

Your email address will not be published.