Most homeowners pay nothing. The IRS lets you exclude up to $250,000 of profit ($500,000 if married filing jointly) from the sale of a primary residence, as long as you owned and lived in it for at least two of the last five years. Gains above that amount, or on a second home, are usually taxable.
The two-out-of-five-year rule
To qualify for the exclusion, you need to have owned the home and used it as your primary residence for at least 24 months out of the 60 months before the sale date. Those 24 months do not have to be consecutive, and they do not have to be the two years immediately before closing. If you meet this test and your profit falls under the exclusion limit, you generally do not even need to report the sale on your tax return.
How your gain is actually calculated
Your taxable gain is not simply sale price minus purchase price. It is your sale price, minus your original purchase price, minus what you paid in closing costs both times, minus the cost of qualifying capital improvements (a new roof, an addition, a major system replacement), minus selling costs like agent commission. That adjusted number, your cost basis subtracted from your net proceeds, is what actually gets compared to the $250,000 or $500,000 threshold.
When you might still owe something
You could owe capital gains tax if your profit exceeds the exclusion amount, if you have not lived in the home for two of the last five years (common after a recent move, an inherited property, or a rental you are converting to a sale), or if the property was a second home or investment property rather than your primary residence. In those cases, the rate depends on how long you owned it: gains on a home held more than a year are taxed at long-term capital gains rates, which land at 15 percent for most sellers, though some high earners pay 20 percent.
Partial exclusions and exceptions
Even if you do not meet the full two-year residency test, you may qualify for a partial exclusion if you sold because of a job change, a health issue, or an unforeseeable circumstance like divorce. The IRS prorates the exclusion based on how much of the two-year period you actually lived there, so a partial year still buys you a partial break.
Investment properties and second homes are different
The exclusion only applies to a primary residence, so a rental property, a vacation home, or land you have never lived in does not qualify, and the full gain is generally taxable at your applicable capital gains rate. Investors selling a rental property sometimes use a 1031 exchange to defer that tax by rolling proceeds into another investment property under strict IRS timelines, but that option is not available for a primary residence sale. See our full 1031 exchange guide for property sellers for the IRS deadlines and how the process works.
The Homexa position
A Homexa® agent will not give you tax advice, that is a job for a CPA or tax attorney, but your agent can build out your likely net proceeds before you list, using your estimated sale price, mortgage payoff, and closing costs, so you walk into a tax conversation with real numbers instead of guesses.
Bottom line
Most sellers of a primary residence pay zero capital gains tax because of the $250,000/$500,000 exclusion. The exceptions usually come down to home type, second home or rental, or how recently you moved in, not the sale itself. Talk to a tax professional if your numbers are anywhere close to the threshold, and keep records of any capital improvements, since they lower your taxable gain.