Real Estate & Mortgages

9 Things to Know About Taxes When Selling a House

Sold home with moving boxes and a subtle tax calendar concept after closing

Understanding tax implications is an essential part of the broader home selling process.

Federal home-sale tax rules start with your gain, which depends on the amount realized from the sale and your adjusted basis. If the property is your main home and you meet the eligibility rules, you may then be able to exclude a substantial amount of that gain from federal income.

For many homeowners, the biggest tax mistake happens long before tax season: they fail to keep records that could support their basis.

Quick Answer

⚡ QUICK ANSWER
  • Eligible homeowners may be able to exclude up to $250,000 of gain, or up to $500,000 for certain married couples filing jointly, on the sale of a main home.
  • The basic rule generally requires ownership and use of the home as your main home for at least two years during the five-year period ending on the sale date.
  • Taxable gain is not simply sale price minus mortgage balance. Your mortgage payoff does not determine your tax basis.
  • Qualifying capital improvements and certain selling expenses can affect the gain calculation, so old records can be valuable.
  • Rental or business use can complicate the exclusion, especially because depreciation can create taxable gain that cannot be excluded.
  • A personal loss on the sale of your main home generally is not deductible.

Home-sale tax calculation from sale amount through adjusted basis and exclusion

1. The $250,000/$500,000 Rule Applies to Gain, Not Sale Price

The federal exclusion is commonly described as the “$250,000/$500,000 home-sale exclusion.”

Those numbers refer to gain that may be excluded, not the price of the house.

The IRS says an eligible individual may be able to exclude up to $250,000 of gain. Certain married couples filing jointly may be able to exclude up to $500,000.

So selling a $900,000 house does not automatically create a large federal tax bill.

You first calculate the gain.

✓ KNOW THIS BEFORE

Do not compare your sale price with the $250,000 or $500,000 exclusion limit. Compare your calculated gain with the exclusion for which you actually qualify.

For strategies on minimizing your tax liability, see how to reduce capital gains tax when selling a home.

2. The Basic Eligibility Test Looks Back Five Years

For the maximum exclusion, the IRS generally looks at the five-year period ending on the sale date.

The basic requirements include:

  • Ownership test: you owned the home for at least two years during that five-year period.
  • Use test: you lived in the property as your main home for at least two years during that period.
  • You generally cannot have used the exclusion on another home sale during the two-year period ending on the current sale date.

The rules for married couples filing jointly have additional details. For the full $500,000 maximum, do not assume that simply filing jointly is enough.

There are also exceptions and reduced-exclusion rules for certain circumstances.

💡 TIP

Before choosing a closing date near your two-year ownership or use anniversary, check the exact dates. A few days can matter when eligibility depends on meeting a time test.

Evaluating potential tax exposure helps when deciding whether you should sell your house or keep it.

3. Your Mortgage Balance Has Almost Nothing to Do With Calculating the Gain

This is a major source of confusion.

The IRS explains that gain is based on the amount realized from the sale compared with the home’s adjusted basis.

A simplified framework is:

Selling price
− qualifying selling expenses
= amount realized

Then:

Amount realized
− adjusted basis
= gain or loss

Paying off a large mortgage does not by itself reduce that gain.

The IRS specifically addresses this misconception: financing the original purchase with a mortgage does not remove the borrowed amount from your cost basis.

⚠️ WARNING

“I only received $80,000 after paying off the mortgage, so my gain is $80,000” is not a valid tax calculation.

Cash at closing and taxable gain are different numbers.

4. Your Adjusted Basis May Be Much Higher Than the Price You Originally Paid

Your starting basis is generally tied to what the home cost you, with specific acquisition-cost rules.

Then basis can change.

IRS Publication 523 explains that certain improvements can increase basis. Examples can include qualifying additions and improvements that add value, prolong useful life, or adapt the home to new uses.

Routine repairs and maintenance generally do not receive the same treatment unless they are part of a qualifying improvement project under the applicable rules.

Basis can also be reduced by certain events.

✓ KNOW THIS BEFORE

That old folder of renovation invoices may be worth real money at tax time. If a qualifying improvement increases your basis, it can reduce the gain you calculate when you sell.

Do not wait until the week before filing to reconstruct decades of home improvements.

5. Some Selling Expenses Can Reduce the Amount Realized

Publication 523’s gain calculation begins with selling price and subtracts selling expenses to determine the amount realized.

That means transaction records can matter to your tax calculation.

Examples identified in IRS guidance can include certain commissions, advertising fees, legal fees, and other costs directly associated with the sale, depending on the facts and applicable rules.

This is different from saying every dollar you spend before selling is deductible.

💡 TIP

Keep the final settlement statement, brokerage invoices, legal invoices, and other sale-related records together with your basis records. Do not rely on memory when preparing the return.

6. A Former Rental Can Still Qualify—but Depreciation Changes the Math

Converting a main home to a rental does not automatically destroy the home-sale exclusion.

The IRS gives examples where a homeowner moves out, rents the home, later sells, and still satisfies the two-out-of-five-year ownership and use requirements.

But rental use introduces additional rules.

Most importantly, the IRS says gain equal to depreciation deductions allowed or allowable for rental or business use after May 6, 1997 generally cannot be excluded under the main-home exclusion.

Even depreciation you were entitled to claim but failed to claim can matter because basis generally must still be reduced by allowable depreciation.

⚠️ WARNING

If the house was ever rented or used for business, do not run a simple “sale price minus purchase price minus $250,000” calculation. Depreciation and nonqualified-use rules can materially change the result.

This is a strong reason to involve a qualified tax professional when selling a former rental.

If you converted or plan to rent an investment property, review what to know before renting out your second home.

7. Selling at a Loss Does Not Usually Create a Personal Tax Deduction

If you sell your personal main home for less than your tax basis, that can feel like a financial loss.

For federal income tax purposes, however, the IRS states that a loss on the sale of a personal residence is generally not deductible.

Different rules can apply to property converted to business or rental use, and the calculation can be more complicated.

✓ KNOW THIS BEFORE

A financial loss and a deductible tax loss are not always the same thing.

Do not count on a home-sale loss to offset investment gains or ordinary income without confirming that the tax rules actually allow it.

8. You May Still Have to Report the Sale Even If the Gain Is Excluded

If you qualify to exclude all the gain, you often do not need to report the home sale on your federal return.

But there are important exceptions.

IRS Topic 701 says you must report the sale if you receive Form 1099-S, even if the gain is otherwise excludable. You also report when you have gain that cannot be fully excluded or choose not to claim the exclusion.

When reporting is required, Form 8949 and Schedule D can be involved.

💡 TIP

Do not throw away a Form 1099-S because you believe your home-sale gain is tax-free. The form itself can create a reporting requirement.

Also remember that state income-tax treatment can differ from federal treatment.

9. Build Your Tax File Before the House Goes on the Market

The best home-sale tax “hack” is not an exotic loophole.

It is documentation.

Before listing, gather:

  • original purchase closing records;
  • records of qualifying acquisition costs;
  • invoices and receipts for capital improvements;
  • permits where relevant;
  • records of casualty or insurance-related basis adjustments;
  • depreciation records if the home was rented or used for business;
  • sale-related invoices;
  • final settlement records after closing;
  • Form 1099-S if issued.

If you are missing records, start retrieving them from contractors, email, cloud storage, banks, permit offices, or prior tax files while you still have time.

✓ KNOW THIS BEFORE

Your tax return may be prepared months after the sale, but the easiest time to reconstruct the home’s history is before you move out and scatter the records.

Organized home-sale tax record archive with improvement and closing records

Before You Sell Your House Tax Checklist

  • Determine whether the property is your main home for federal tax purposes.
  • Check exact ownership and use dates.
  • Check whether you claimed a home-sale exclusion within the previous two years.
  • Estimate amount realized and adjusted basis separately from mortgage payoff.
  • Gather original purchase and closing records.
  • Find invoices and receipts for qualifying capital improvements.
  • Gather records of selling expenses.
  • Identify any period of rental or business use.
  • Locate depreciation schedules if the property was rented or used for business.
  • Keep the final settlement statement after closing.
  • Keep Form 1099-S if one is issued.
  • Check your state’s home-sale tax rules separately.
  • Get professional tax advice when rental use, divorce, inheritance, partial exclusion, foreign-person rules, or unusually large gains make the situation complex.

FAQ

Do I pay tax on the full amount I receive when I sell my house?

No. Federal tax generally focuses on gain calculated from the amount realized and adjusted basis, not the full sale price or the cash remaining after your mortgage is paid.

How much home-sale profit can I exclude?

An eligible individual may be able to exclude up to $250,000 of gain. Certain married couples filing jointly may qualify for up to $500,000. Eligibility rules must be satisfied.

Do I have to live in the house for two consecutive years?

The IRS generally requires at least two years of use as your main home during the five-year period ending on the sale date. Publication 523 contains the detailed eligibility rules and exceptions.

Do home improvements reduce capital gains tax?

Qualifying capital improvements can increase adjusted basis, which can reduce calculated gain. Routine repairs and maintenance generally are treated differently. Keep records and apply the IRS basis rules to the actual project.

Can I deduct a loss when I sell my main home?

Generally no. The IRS says a loss on the sale of a personal residence is not deductible.

What if I rented the house before selling it?

You may still qualify for some home-sale exclusion depending on your ownership and use, but depreciation and other rental-use rules can create taxable gain or limit the exclusion. This situation deserves a more detailed calculation.

The Bottom Line

The tax bill from selling a house is not calculated from the check you receive at closing.

Start with the home’s amount realized and adjusted basis, calculate the gain, and only then apply the home-sale exclusion for which you qualify.

For many sellers, the most valuable action happens before closing: recover the paperwork that proves what you spent acquiring and improving the home.

A folder full of legitimate records is far more useful than trying to remember a 15-year-old renovation after the sale is over.

Sources