Q&A Post

Do I Have to Pay Capital Gains Tax When I Sell My Home?

Learn about the primary residence exclusion, when it applies, when you do owe capital gains tax on a home sale, and how to calculate your gain.

The Short Answer (Most People Do Not Pay It)

Most homeowners who sell their primary residence do not owe federal capital gains tax on the sale, thanks to a generous exclusion in the tax code. If you have owned and lived in the home as your primary residence for at least two of the five years before the sale, you can exclude up to $250,000 of profit from taxation if you are single, or up to $500,000 if you are married filing jointly.

This exclusion is per sale, not per lifetime. You can use it multiple times as long as you meet the ownership and use tests and have not used the exclusion on another home sale within the prior two years.

For a typical homeowner who bought a home for $300,000 and sells it for $500,000, the gain is $200,000. As a single filer, the entire $200,000 gain is within the $250,000 exclusion and owes zero federal capital gains tax. As a married couple, the same gain would be entirely excluded under the $500,000 limit.

The Primary Residence Exclusion Explained

The IRS requires you to meet two tests to claim the exclusion. The ownership test means you must have owned the home for at least two years out of the five years preceding the sale. The use test means you must have lived in the home as your primary residence for at least two years out of those same five years. These two-year periods do not need to be continuous or the same two years.

You can only use this exclusion once every two years. If you sold another home and claimed the exclusion within the previous two years, you cannot claim it again on this sale.

The exclusion applies to federal taxes. State taxes vary by state. Some states follow federal rules and offer a similar exclusion. Others tax capital gains more aggressively. Check your specific state's rules for home sale gains.

When You Do Owe Capital Gains Tax

You owe capital gains tax on the portion of your gain that exceeds the exclusion amount, or if you do not qualify for the exclusion. If you are single and your gain is $350,000, you can exclude $250,000 and owe tax only on the remaining $100,000.

You do not qualify for the exclusion if you have not lived in the home as your primary residence for two of the last five years. Investment properties, vacation homes, and rental properties do not qualify — those sales are generally subject to full capital gains tax on the entire gain.

Short-term capital gains (on property held less than one year) are taxed as ordinary income at your regular marginal rate, which can be as high as 37%. Long-term capital gains (on property held more than one year) are taxed at 0%, 15%, or 20%, depending on your taxable income. Most homeowners who do owe gains tax on a home sale face the long-term rate since homes are typically held for many years.

How to Calculate If You Owe Anything

Your taxable gain is the sale price minus your adjusted basis. Your adjusted basis starts with what you paid for the home (including closing costs at purchase). It is increased by the cost of capital improvements you made over the years — things like a new roof, kitchen remodel, additional bathroom, or room addition. It does not include routine repairs and maintenance.

Keep records of all capital improvements you make to your home. Contracts, invoices, and permits provide documentation for increasing your basis. Every dollar of capital improvement reduces your eventual taxable gain. A $50,000 kitchen renovation increases your adjusted basis by $50,000, which reduces your taxable gain by $50,000.

The full calculation is: sale price minus selling costs (real estate commissions, closing costs) minus adjusted basis (purchase price plus closing costs at purchase plus capital improvements) equals total gain. Then subtract the applicable exclusion ($250,000 or $500,000) to find your taxable gain, if any.