Many tax benefits are available to you when you sell your principal residence. However, the rules are complex and personal guidance is necessary to take full advantage of these benefits so that you and your tax advisor can best work together to minimize the tax on the gain. This financial guide discusses the key rules so that you and your tax advisor can best work together to minimize the tax on the gain.
Table of Contents
- Principal Residence
- How To Figure Gain Or Loss
- Non-Traditional Sales
- Basis Other Than Cost
- Adjusted Basis
- Exclusion For Sales After May 6, 1997
- Recapture Of Federal Subsidy
The IRS allows an exclusion of up to $250,000 of the gain on the sale of your main home ($500,000 if you are married and file a joint return. Most taxpayers can take advantage of the exclusion and will not have to pay any tax on the sale of a main home as long as they meet the IRS ownership and use tests (see below).
If you do have a loss from the sale, it is a personal loss. You cannot deduct the loss.
If you don’t qualify for the exclusion, your gain exceeds the exclusion, or you used part of the property in business or for rent, you have a taxable gain and must report the sale of your main home on your tax return on IRS Form 8949, Sales and Other Dispositions of Capital Assets and Schedule D, Capital Gains and Losse.
Usually, the home you live in most of the time is your main home. In addition to a standard dwelling unit, your home can also be a houseboat, mobile home, cooperative apartment, or condominium.
Example 1: You own and live in a house in town. You also own beach property, which you use in the summer months. The town property is your main home; the beach property is not.
Example 2: You own a house, but you live in another house that you rent. The rented home is your main home.
Where a second residence has soared in value and you want to sell, some tax advisors have suggested moving to the second residence for the required period to qualify for exclusion on its sale. If this is your situation, please consult with a tax professional.
Key information for determining gain or loss is the selling price, the amount realized, and the adjusted basis.
The selling price is the total amount you receive for your home. It includes money, all notes, mortgages, or other debts assumed by the buyer as part of the sale, and the fair market value of any other property or any services you receive. Next, you deduct the selling expenses such as commissions, advertising, legal fees, and loan charges paid by the seller from the selling price.
The difference is the “amount realized.” If the amount realized is more than your home’s “adjusted basis,” discussed later, the difference is your gain. If the amount realized is less than the adjusted basis, the difference is your loss.
However, it does not include amounts you received for personal property sold with your home. Personal property is property that is not a permanent part of the home, such as furniture, draperies, and lawn equipment.
The following discussion covers how to determine your gain or loss if you trade one home for another, if your home is foreclosed on or repossessed or if you transfer a jointly owned home.
Jointly owned home. If you and your spouse sell your jointly owned home and file a joint return, you figure and report your gain or loss as one taxpayer. If you file separate returns, each of you must figure and report your own gain or loss according to your ownership interest in the home. Your ownership interest is determined by state law.
If you and a joint owner other than your spouse sell your jointly owned home, each of you must figure and report your own gain or loss according to your ownership interest in the home. Each of you applies the exclusion rules individual basis.
Trading homes. If you trade your old home for another home, treat the trade as a sale and a purchase.
Foreclosure or repossession. If your home was foreclosed on or repossessed, you have what the IRS calls a disposition and will need to determine if you have ordinary income, gain, or loss. The amount of your gain or loss depends on whether you were personally liable for repaying the debt secured by the home and whether the outstanding loan balance is more than the fair market value (FMV) of the property.
If you were not personally liable for repaying the debt secured by the home, the amount you realize includes the full amount of the outstanding debt immediately before the transfer. This is true even if the FMV of the property is less than the outstanding debt immediately before the transfer.
If you were personally liable for repaying the debt secured by the home and the debt is canceled, the amount realized on the foreclosure or repossession includes the smaller of the outstanding debt immediately before the transfer reduced by any amount for which you remain personally liable immediately after the transfer, or the Fair Market Value (FMV) of the transferred property.
In addition to any gain or loss, if you were personally liable for the debt you may have ordinary income. If the canceled debt is more than the home’s fair market value, you have ordinary income equal to the difference. However, the income from the cancellation of debt is not taxed to you if the cancellation is intended as a gift, or if you are insolvent or bankrupt.
You owned and lived in a home with an adjusted basis of $41,000. A real estate dealer accepted your old home as a trade-in and allowed you $50,000 toward a new house priced at $80,000 (its fair market value). You are considered to have sold your old home for $50,000 and to have had a gain of $9,000 ($50,000 minus $41,000). If the dealer had allowed you $27,000 and assumed your unpaid mortgage of $23,000 on your old home, $50,000 would still be considered the sales price of the old home (the trade-in allowed plus the mortgage assumed).
Transfer to spouse. If you transfer your home to your spouse, or to your former spouse incident to your divorce, you generally have no gain or loss, even if you receive cash or other consideration for the home. Therefore, the rules explained in this Guide do not apply.
If you owned your home jointly with your spouse and transfer your interest in the home to your spouse, or to your former spouse incident to your divorce, the same rule applies. You have no gain or loss.
If you buy or build a new home, its basis will not be affected by the transfer of your old home to your spouse, or to your former spouse incident to divorce. The basis of the home you transferred will not affect the basis of your new home.
You will need to know your basis in your home as a starting point for determining any gain or loss when you sell it. Your basis in your home is determined by how you got the home. Your basis is its cost if you bought it or built it. If you acquired it in some other way, its basis is either its fair market value when you received it or the adjusted basis of the person you received it from.
While you owned your home, you may have made adjustments (increases or decreases) to the basis. This adjusted basis is used to figure gain or loss on the sale of your home.
Cost as Basis
The cost of property is the amount you pay for it in cash or other property.
Purchase. If you buy your home, your basis is its cost to you. This includes the purchase price and certain settlement or closing costs. Your cost includes your down payment and any debt, such as a first or second mortgage or notes you gave the seller in payment for the home.
Seller-paid points. If you bought your home after April 3, 1994, you must reduce the basis of your home by any points the seller paid, whether or not you deducted them. If you bought your home after 1990 but before April 4, 1994, you must reduce your basis by the amount of seller-paid points only if you chose to deduct them as home mortgage interest in the year paid.
Settlement fees or closing costs. When buying your home, you may have to pay settlement fees or closing costs in addition to the contract price of the property. You can include in your basis the settlement fees and closing costs that are for buying the home. You cannot include in your basis the fees and costs that are for getting a mortgage loan. A fee is for buying the home if you would have had to pay it even if you paid cash for the home.
Settlement fees do not include amounts placed in escrow for the future payment of items such as taxes and insurance.
Some of the settlement fees or closing costs that you can include in the basis of your property are:
- Abstract fees (sometimes called abstract of title fees),
- Charges for installing utility services,
- Legal fees (including fees for the title search and preparing the sales contract and deed),
- Recording fees,
- Transfer taxes,
- Owner’s title insurance, and
- Any amounts the seller owes that you agree to pay, such as back taxes or interest, recording or mortgage fees, charges for improvements or repairs, and sales commissions.
Some settlement fees and closing costs not included in your basis are:
- Fire insurance premiums.
- Rent for occupancy of the house before closing.
- Charges for utilities or other services relating to occupancy of the house before closing.
- Any item that you deducted as a moving expense (settlement fees and closing costs incurred after 1993 cannot be deducted as moving expenses).
- Fees for refinancing a mortgage.
- Charges connected with getting a mortgage loan, such as mortgage insurance premiums (including VA funding fees), loan assumption fees, cost of a credit report, and fee for an appraisal required by a lender.
Real estate taxes. Real estate taxes for the year you bought your home may affect your basis, as follows:
If you pay taxes that the seller owed on the home up to the date of sale and the seller does not reimburse you, then the taxes are added to the basis of your home.
If you pay taxes that the seller owed on the home up to the date of sale and the seller does reimburse you, then the taxes do not affect the basis of your home.
If the seller pays taxes for you (taxes owed beginning on the date of sale) and you do not reimburse the seller, then the taxes are subtracted from the basis of your home.
If the seller pays taxes for you (taxes owed beginning on the date of sale) and you reimburse the seller, then the taxes do not affect the basis of your home.
Construction. If you contracted to have your house built on land you own; your basis is the cost of the land plus the amount it cost you to complete the house. This amount includes the cost of labor and materials, or the amounts paid to the contractor, and any architect’s fees, building permit charges, utility meter, and connection charges, and legal fees directly connected with building your home. Your cost includes your down payment and any debt, such as a first or second mortgage or notes you gave the seller or builder. It also includes certain settlement or closing costs. You may have to reduce the basis by points the seller paid for you. If you built all or part of your house yourself, its basis is the total amount it cost you to complete it. Do not include the value of your own labor or any other labor you did not pay for, in the cost of the house.
Cooperative apartment. Your basis in the apartment is usually the cost of your stock in the co-op housing corporation, which may include your share of a mortgage on the apartment building.
Condominium. Your basis is generally its cost to you. The same rules apply as for any other home.
If your home was acquired in a transaction other than a traditional purchase (such as gift, inheritance, trade, or from a spouse), you may have to use a basis other than cost, such as fair market value.
Fair market value is the price at which the property would change hands between a willing buyer and a willing seller, neither having to buy or sell and both having reasonable knowledge of the relevant facts. Sales of similar property, on or about the same date, may be helpful in figuring the fair market value of the property.
Home received as gift. If your home was a gift, its basis to you is the same as the donor’s adjusted basis when the gift was made. However, if the donor’s adjusted basis was more than the fair market value of the home when it was given to you, you must use that fair market value as your basis for measuring any loss on its sale.
If you use the donor’s adjusted basis to figure a gain and get a loss, and then use the fair market value to figure a loss and get a gain, you have neither a gain nor a loss on the sale or disposition.
If you received your home as a gift and its fair market value was more than the donor’s adjusted basis at the time of the gift, you may be able to add to your basis any federal gift tax paid on the gift. If the gift was before 1977, the basis cannot be increased to more than the fair market value of the home when it was given to you. On the other hand, if you received your home as a gift after 1976, you would add to your basis the part of the federal gift tax paid that is due to the home’s “net increase” in value (value less donor’s adjusted basis).
Home received from spouse. You may have received your home from your spouse or from your former spouse incident to your divorce.
- If you received the home after July 18, 1984, you had no gain or loss on the transfer. Your basis in this home is generally the same as your spouse’s (or former spouse’s) adjusted basis just before you received it. This rule applies even if you received the home in exchange for cash, the release of marital rights, the assumption of liabilities, or other consideration.
- If you owned a home jointly with your spouse and your spouse transferred his or her interest in the home to you, your basis in the half interest received from your spouse is generally the same as your spouse’s adjusted basis just before the transfer. This rule also applies if your former spouse transferred his or her interest in the home to you incident to your divorce. Your basis in the half interest you already owned does not change. Your new basis in the home is the total of these two amounts.
- If you received your home before July 19, 1984, in exchange for your release of marital rights, your basis in the home is generally its fair market value at the time you received it.
- Home acquired from a decedent who died before or after 2010. If you inherited your home from a decedent who died before or after 2010, your basis is the fair market value of the property on the date of the decedent’s death (or the later alternate valuation date chosen by the personal representative of the estate). If an estate tax return was filed or required to be filed, the value of the property listed on the estate tax return is your basis. If a federal estate tax return did not have to be filed, your basis in the home is the same as its appraised value at the date of death, for purposes of state inheritance or transmission taxes.
- Surviving spouse. If you are a surviving spouse and you owned your home jointly, your basis in the home will change. The new basis for the interest your spouse owned will be its fair market value on the date of death (or alternate valuation date). The basis of your interest will remain the same. Your new basis in the home is the total of these two amounts.
Your jointly owned home had an adjusted basis of $50,000 on the date of your spouse’s death, and the fair market value on that date was $100,000. Your new basis in the home is $75,000 ($25,000 for one-half of the adjusted basis plus $50,000 for one-half of the fair market value).
In community property states (Arizona, California, Idaho, Louisiana, Nevada, New Mexico, Texas, Washington, and Wisconsin), each spouse is usually considered to own half of the community property. When either spouse dies, the fair market value of the community property becomes the basis of the entire property, including the portion belonging to the surviving spouse. For this to apply, at least, half of the community interest must be included in the decedent’s gross estate, whether or not the estate must file a return.
Home received in trade. If you acquired your home in a trade for other property, the basis of your home is generally its fair market value at the time of the trade. If you traded one home for another, you have made a sale and purchase. In that case, you may have realized a capital gain.
Adjusted basis is your cost or other basis increased or decreased by certain amounts.
Increases to basis include:
- Additions and other improvements that have a useful life of more than 1 year.
- Special assessments for local improvements.
- Amounts spent after a casualty to restore damaged property.
Decreases to basis include:
- Discharge of qualified principal residence indebtedness that was excluded from income (but not below zero).
- Gain from the sale of your old home before May 7, 1997 on which tax was postponed.
- Insurance payments for casualty losses.
- Deductible casualty losses not covered by insurance.
- Payments received for granting an easement or right-of-way.
- Depreciation allowed or allowable if you used your home for business or rental purposes.
- Residential energy credit (generally allowed from 1977 through 1987) claimed for the cost of energy improvements that you added to the basis of your home.
- Adoption credit you claimed for improvements that you added to the basis of your home.
- Nontaxable payments from an employer’s adoption assistance program that you used for improvements you added to the basis of your home.
- Nonbusiness energy property credit (allowed beginning in 2006 but not for 2008) claimed for making certain energy-saving improvements you added to the basis of your home.
- Residential energy efficient property credit (allowed beginning in 2006) claimed for making certain energy-saving improvements you added to the basis of your home.
- First-time home buyer’s credit (allowed to certain first-time buyers in the District of Columbia–beginning on August 5, 1997).
- Energy conservation subsidy excluded from your gross income because you received it (directly or indirectly) from a public utility after December 31, 1992, to buy or install any energy conservation measure. An energy conservation measure includes an installation or modification that is primarily designed either to reduce consumption of electricity or natural gas or to improve the management of energy demand for a home.
Discharges of qualified principal residence indebtedness. You may be able to exclude from gross income a discharge of qualified principal residence indebtedness. This exclusion applies to discharges made after 2006 through the end of 2025 (Consolidated Appropriations Act, 2021) and also applies to debts forgiven as the result of a written agreement entered into before January 1, 2026, even if the actual discharge happens later. If you choose to exclude this income, you must reduce (but not below zero) the basis of your principal residence by the amount excluded from gross income.
Amount eligible for the exclusion. The exclusion applies only to debt discharged after 2006 and before 2025. The maximum amount you can treat as qualified principal residence indebtedness is $750,000 ($375,000 if married and filing separately). Prior to December 31, 2020, this amount was $2 million ($1 million if married filing separately). You cannot exclude from gross income discharge of qualified principal residence indebtedness if the discharge was for services performed for the lender or on account of any other factor not directly related to a decline in the value of your residence or to your financial condition.
Improvements. These add to the value of your home, prolong its useful life, or adapt it to new uses. You add the cost of improvements to the basis of your property.
Putting a recreation room in your unfinished basement, adding another bathroom or bedroom, putting up a fence, putting in new plumbing or wiring, installing a new roof, or paving your driveway are improvements.
Here are some other examples:
- Additions: Bedroom, bathroom, deck, garage, porch, patio
- Lawn and grounds: Landscaping, driveway, walkway, fence, retaining wall, sprinkler system, swimming pool
- Miscellaneous: Storm windows or doors, new roof, central vacuum, wiring upgrades, satellite dish, security system
- Heating and air conditioning: Heating system, central air, furnace, duct work, central humidifier, filtration system
- Plumbing: Septic system, water heater, soft water system, filtration system
- Interior: Built-in appliances, kitchen modernization, flooring, wall-to-wall carpet
- Insulation: attic, walls, floor, pipes, duct work
- Improvements no longer part of home. Your home’s adjusted basis does not include the cost of any improvements that are no longer part of the home.
You put wall-to-wall carpeting in your home 15 years ago. Later, you replaced that carpeting with new wall-to-wall carpeting. The cost of the old carpeting you replaced is no longer part of your home’s adjusted basis.
Repairs. These maintain the good condition of your home. They do not add to its value or prolong its life, and you do not add their costs to the basis of your property.
Repainting your house inside or outside, fixing your gutters or floors, repairing leaks or plastering, and replacing broken window panes are examples of repairs.
The entire job is considered an improvement, however, if items that would otherwise be considered repairs are done as part of an extensive remodeling or restoration of your home.
Recordkeeping. You should keep records of your home’s purchase price and purchase expenses. Furthermore, you should also save receipts and other records for all improvements, additions, and other items that affect the basis of your home.
You must keep records for 3 years after the due date for filing your return for the tax year in which you sold, or otherwise disposed of, your home. But if the basis of your old home affects the basis of your new one, such as when you sold your old home before May 7, 1997, and postponed tax on any gain, you should keep those records forever.
The records you should keep include:
- Proof of the home’s purchase price and purchase expenses;
- Receipts and other records for all improvements, additions, and other items that affect the home’s adjusted basis;
- Any worksheets or other computations you used to figure the adjusted basis of the home you sold, the gain or loss on the sale, the exclusion, and the taxable gain;
- Any Form 982 you filed to exclude any discharge of qualified principal residence indebtedness;
- Any Form 2119, Sale of Your Home, you filed to postpone gain from the sale of a previous home before May 7, 1997;
- Any worksheets you used to prepare Form 2119
If you sell your main home after May 6, 1997, you may qualify to exclude up to $250,000 of the gain ($500,000 if married filing jointly) on the sale of your main home; however, to claim the exclusion, you must meet the ownership and use tests. This means that during the 5-year period ending on the date of the sale, you must have:
- Owned the home for at least 2 years (the ownership test)
- Lived in the home as your main home for at least 2 years (the use test)
- During the 2-year period ending on the date of the sale, you did not exclude gain from the sale of another home.
- You become physically or mentally unable to care for yourself, and
- You owned and lived in your home as a main home for a total of at least one year during the 5-year period before the sale of your home.
Buying a Home: What To Do and How To Do It
Buying a Home: Frequently Asked Questions
Homeowner’s Insurance: How To Get The Best Coverage and Value
Homeowner’s Insurance: Frequently Asked Questions
Mortgage Alternatives: How To Choose The Right One
Mortgages: Frequently Asked Questions
Home Mortgage Interest Deductions
The Deductibility of Points
Refinancing Your Mortgage: When and How
Selling Your Home: How To Do It Effectively
Selling Your Home: Frequently Asked Questions
Which Moving Expenses Are Deductible?
Planning Your Move: Frequently Asked Questions
The Deduction For Real Estate Taxes
Should I Refinance My Mortgage?
Comparing Mortgage Terms (i.e. 15, 20, 30 year)