How to Determine the Taxes Owed on the Sale of Your House

Feature Main Image


When you sell a home, the federal taxes you pay are determined by how it was used and if the sale was at a gain or loss over your cost. IRS Publication 523: Selling Your Home at can help you figure out the amount of taxes owed and any potential tax breaks. If you are selling at a gain, you may be eligible for a capital gain exclusion if the home was your primary residence and meets certain criteria. If you are selling at a loss, you cannot deduct anything from your taxes.


Selling at a Gain: The Criteria for a Capital Gain Exclusion

For a home to be considered for a capital gain exclusion, you must meet these qualifications:


  • You must have owned the home for at least two years during a five-year period which ends on the date of the sale.
  • You must have lived in the home as your primary residence for at least two years during that same five-year period.
  • You can only sell a primary residence once every two years.


There is no limit on how many times, during your lifetime, you can sell a primary residence for a capital gains exclusion.


Selling at a Gain: The Capital Gain Exclusion


When you sell your primary residence at a gain, you may be eligible to leave out all or part of the gain from your income if you meet the criteria. This means that you would not pay federal income tax on the eligible amount of gain. The capital gain exclusion has a limit of $250,000 on a single return or $500,000 on a joint return. You may not exclude the portion of the gain equivalent to the depreciation allowed after May 6, 1997, however.


Selling at a Gain: Calculating the Gain for the Capital Gain Exclusion


To calculate the gain after the sale of your primary residence, you begin with the amount you originally paid for the home. Add in the cost of buying the home (such as real estate agent commissions, title fees, and escrow fees), home improvements, and the cost of selling the home. Then subtract any accumulated depreciation, for example if you took the home office deduction at any point during your ownership. The result is your cost basis.


To determine if you have a capital gain or loss, deduct the cost basis figure from the price at which you sold your home. A positive number is a gain, while a negative is a loss. Deduct the amount of the capital gain exclusion ($250,000 single or $500,000 joint) to determine the amount of your taxable gain.


Selling at a Gain: Exceptions


There are exceptions to the capital gain exclusion. You may also be eligible for a capital gain exclusion if you owned and/or lived in the primary home for less than two years, but the maximum amount excluded is reduced. The exceptions include:


  • Selling your primary residence because the location of your job has changed (but not if you are beginning a new job or are moved to a new location with your current employer).
  • Selling your primary residence because of documentable medical or health-related reasons.
  • Selling your primary residence because of unforeseen circumstances. The Internal Revenue Service considers the following as unforeseen circumstances:


-- man-made disasters like an act of war or terrorism

-- a natural disaster

-- death

-- divorce or marital separation

-- multiple births from the same pregnancy

-- a change in your employment situation which does not allow you to pay for basic living expenses.


Selling at a Gain: Calculating the Exception


A partial capital gain exclusion is based on how long you lived in your primary residence. To calculate, divide the number of months you resided in your main home by 24. This number is then multiplied by $250,000 on a single return or $500,000 on a joint return. The final amount is your partial capital gain exclusion.


Selling at a Gain: Reporting It to the Internal Revenue Service


If the amount of capital gain must be reported on your income taxes, you are required to fill out IRS Form 1040, Schedule D, Capital Gains and Losses. If the total amount is under the exclusion limit, the sale of the home does not have to be reported on your tax return. The portion of the gain equal to depreciation after May 6, 1997, must be reported on IRS Form 4797. Any amount over the capital gain exception must be reported as taxable income on your return.


Selling at a Loss


When you sell your primary residence at a loss, there are no federal income tax deductions. You cannot deduct the loss on your personal income taxes. There are also no exclusions.


Second Homes and Other Properties


Any second homes or rental properties are regarded as a capital asset and ineligible for the capital gain exclusion. You must use IRS Form 1040, Schedule D to report any sales of these properties. Such sales are subject to taxation as part of your income gain.


Additional Resources


  • Questions & Answers
  • Question & Answers
  • Quizzes
  • Word of the Day


    The term "assignment" refers to the method of transferring a right or contract from...


    What Is a Series EE Patriot Bond?

    Commonly known as a “war bond,” the Series EE Patriot Bond was created...