QuickShorts

Buyer & Seller Education

Capital Gains Tax on Home Sales: What Sellers Need to Know

capital gains tax home sale

Capital Gains Tax on Home Sales: What Sellers Need to Know

Capital gains tax is one of the most frequently misunderstood financial implications of selling a home. Many sellers assume they owe taxes on their entire sale price — and many others assume they owe nothing at all. The reality is more nuanced, and understanding the basics helps sellers plan their sale intelligently. This guide explains how capital gains tax works on home sales, the primary exemption that applies to most homeowners, and what sellers should discuss with a tax professional.

Table of Contents

  • What Capital Gains Tax Is
  • The Primary Residence Exclusion
  • Short-Term vs. Long-Term Capital Gains
  • Calculating Your Cost Basis
  • Improvements That Increase Your Basis
  • When You Don't Qualify for the Full Exclusion
  • Depreciation Recapture for Former Rentals
  • State Capital Gains Taxes
  • When to Consult a Tax Professional
  • FAQ

What Capital Gains Tax Is

Capital gains tax is a federal (and often state) tax on the profit made from selling an asset. In real estate, the taxable gain is the difference between what you sell the home for and what you paid for it — adjusted for certain costs and improvements.

Basic formula

Capital Gain = Sale Price − Cost Basis − Selling Expenses

  • Sale price: The gross amount the buyer pays
  • Cost basis: What you paid for the home plus qualifying improvements
  • Selling expenses: Real estate commission, transfer taxes, title fees, legal fees

Example: You bought a home for $300,000, made $40,000 in improvements, and sold it for $500,000 with $30,000 in selling costs. Your gain = $500,000 − $340,000 − $30,000 = $130,000.

The Primary Residence Exclusion

Section 121 of the Internal Revenue Code is the most important tax provision most homeowners never know by name. It allows qualifying sellers to exclude up to $250,000 of gain ($500,000 for married couples filing jointly) from taxable income.

Qualifying for the exclusion

To claim the exclusion, sellers must meet three tests:

1. Ownership test: Owned the home for at least 2 years in the 5-year period ending on the sale date

2. Use test: Used the home as a primary residence for at least 2 of the 5 years ending on the sale date

3. Look-back test: Did not claim the exclusion on another home sale in the 2 years before this sale

Married couples

For the $500,000 exclusion, both spouses must meet the use test (each must have lived there 2 of the last 5 years), but only one spouse needs to meet the ownership test.

The exclusion applies to gain — not sale price

Many sellers confuse this. The exclusion shelters your profit, not the sale price. A seller who bought for $200,000 and sells for $600,000 has a $400,000 gain (simplified). A married couple can exclude $500,000, so $0 is taxable. If they had $600,000 in gain, $100,000 would be taxable.

Short-Term vs. Long-Term Capital Gains

Gain that cannot be excluded is taxed at different rates depending on how long the home was owned.

Short-term capital gains

  • Applies when the home was owned for 1 year or less
  • Taxed at ordinary income tax rates (10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on income bracket)
  • Rare for primary residences since most sellers have lived there at least 2 years

Long-term capital gains

  • Applies when the home was owned for more than 1 year
  • Taxed at preferential rates: 0%, 15%, or 20% depending on taxable income
  • The 0% rate applies to many middle-income taxpayers

2024 long-term capital gains thresholds (approximate)

  • 0%: Single filers with taxable income up to ~$47,000; married filing jointly up to ~$94,000
  • 15%: Single up to ~$518,000; married up to ~$583,000
  • 20%: Above those thresholds
  • 3.8% NIIT surcharge: May apply to high-income taxpayers (income over $200,000 single / $250,000 married)

These brackets adjust annually. Always confirm current year figures with a tax professional.

Calculating Your Cost Basis

Your cost basis is what you paid for the home plus certain costs at acquisition.

What is included in original basis

  • Purchase price
  • Closing costs paid at purchase: title insurance, recording fees, survey, transfer taxes (paid by buyer)
  • Legal fees related to the purchase
  • Any amounts paid to assume the seller's mortgage

What is not included in original basis

  • Fire insurance premiums
  • Mortgage payments
  • Utilities
  • Maintenance and repair costs

Improvements That Increase Your Basis

Capital improvements — additions and upgrades that add value, prolong life, or adapt the home to a new use — increase your cost basis and therefore reduce your taxable gain.

Examples of qualifying capital improvements

  • Room additions
  • New roof or HVAC system replacement
  • Kitchen and bathroom remodels (beyond simple repairs)
  • New flooring throughout the home
  • Landscaping additions (retaining walls, irrigation systems)
  • Swimming pool installation
  • Solar panels
  • Windows and doors replaced throughout

Examples that do NOT qualify

  • Painting (typically considered maintenance)
  • Fixing a leak (repair, not improvement)
  • Replacing broken appliances
  • Annual landscaping and lawn care

Record keeping

Sellers should keep records of all capital improvements for as long as they own the home — and for at least 3 years after filing the tax return for the year of sale. Receipts, contractor invoices, and permits are the documentation needed.

When You Don't Qualify for the Full Exclusion

Partial exclusion rules

Sellers who do not meet the full 2-of-5-year use and ownership tests due to specific circumstances may still qualify for a partial exclusion. Qualifying circumstances include:

  • Change of employment (relocation)
  • Health reasons
  • Unforeseen circumstances (divorce, death of spouse, job loss, natural disaster)

The partial exclusion is calculated as the proportion of the 2-year requirement that was met.

Example: A seller met 18 of the 24 months required. Partial exclusion = (18/24) × $250,000 = $187,500.

Inherited property

Inherited property receives a "stepped-up" basis equal to the fair market value at the date of death — not what the deceased originally paid. This can dramatically reduce or eliminate capital gains for beneficiaries who sell shortly after inheriting.

Depreciation Recapture for Former Rentals

If the home was ever used as a rental property, depreciation taken (or that should have been taken) during the rental period must be "recaptured" and taxed at a special rate — up to 25% — regardless of the Section 121 exclusion.

Why this matters

A homeowner who rented their home for 3 years before moving back in and selling may have a significant depreciation recapture bill. The primary residence exclusion does not shield this. This is one situation where a CPA is essential before the sale closes.

State Capital Gains Taxes

Most states that have income tax also tax capital gains — often at ordinary income tax rates. A few notable exceptions:

  • No income tax states: Alaska, Florida, Nevada, New Hampshire (on most income), South Dakota, Tennessee, Texas, Washington, Wyoming
  • States with preferential capital gains rates: A handful of states provide reduced rates

Sellers moving from a high-tax state may consider timing their sale to occur after establishing residency in a lower-tax state — but this has residency establishment requirements and should only be done with legal and tax guidance.

When to Consult a Tax Professional

Most sellers will pay no capital gains tax thanks to the Section 121 exclusion. However, a CPA or tax attorney is strongly recommended when:

  • Gain exceeds $250,000 ($500,000 married)
  • The property was ever used as a rental
  • The property was inherited
  • A 1031 exchange is being considered (allows deferral if seller reinvests in like-kind property)
  • The seller is subject to the NIIT (high income)
  • The sale involves a divorce, estate, or trust

This guide provides a general overview. Tax law changes frequently and individual circumstances vary widely. Refer clients to a qualified tax professional for advice specific to their situation.

FAQ

Q: Do sellers report the home sale to the IRS even if no tax is owed?

A: If the gain is fully excluded under Section 121 and the seller did not receive a 1099-S from the closing agent, reporting is not required. However, if a 1099-S was issued or the exclusion is only partial, the sale must be reported on Schedule D.

Q: Can a seller do a 1031 exchange on a primary residence?

A: Not typically. 1031 exchanges apply to investment and business property, not primary residences. However, a property that has been used partly as a rental may have a portion eligible for exchange. This is complex — consult a 1031 exchange qualified intermediary.

Q: What if the home was in a trust?

A: Living trusts (revocable) are generally transparent for tax purposes — the grantor uses their Section 121 exclusion as if they owned the home directly. Irrevocable trusts are different and require individual analysis.

Q: How does a divorce affect the exclusion?

A: There are special rules for divorce situations. A spouse who transfers the home to the other spouse in a divorce may not recognize gain at transfer. The recipient spouse gets the transferor's basis. Ownership and use tests are also modified. Both parties should consult a tax professional.

---

Download the printable version of this guide — no sign-up required. Get the free guide →

Related Articles

Capital Gains Tax on Home Sales: What Sellers Need to Know | Real Estate Guides