Table of Contents
This section explains the term “main home.” Usually, the home you live in most of the time is your main home and can be a:
To exclude gain under the rules in this publication, you generally must have owned and lived in the property as your main home for at least 2 years during the 5-year period ending on the date of sale.
-
The vacant land is adjacent to land containing your home,
-
You owned and used the vacant land as part of your main home,
-
The sale of your home satisfies the requirements for exclusion and occurs within 2 years before or 2 years after the date of the sale of the vacant land, and
-
The other requirements for excluding gain from the sale of the vacant land have been satisfied.

-
Your place of employment.
-
The location of your family members' main home.
-
Your mailing address for bills and correspondence.
-
The address listed on your:
-
Federal and state tax returns,
-
Driver's license,
-
Car registration, and
-
Voter registration card.
-
-
The location of the banks you use.
-
The location of recreational clubs and religious organizations in which you are a member.
To figure the gain or loss on the sale of your main home, you must know the selling price, the amount realized, and the adjusted basis. Subtract the adjusted basis from the amount realized to get your gain or loss.
| Selling price | |||
| - | Selling expenses | ||
| Amount realized | |||
| Amount realized | |||
| - | Adjusted basis | ||
| Gain or loss |
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.
While you owned your home, you may have made adjustments (increases or decreases) to the basis. This adjusted basis must be determined before you can figure gain or loss on the sale of your home. For information on how to figure your home's adjusted basis, see Determining Basis, later.
To figure the amount of gain or loss, compare the amount realized to the adjusted basis.
The following rules apply to foreclosures and repossessions, abandonments, trades, transfers to a spouse, and involuntary conversions (such as when your home is destroyed or condemned).
| IF you were... | THEN your selling price includes... |
| not personally liable for the debt | the full amount of debt canceled by the foreclosure or repossession. |
| personally liable for the debt | the amount of canceled debt up to the home's fair market value. You may also have ordinary income, as explained next. |
Example.
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 home priced at $80,000. This is treated as a sale of your old home for $50,000 with a gain of $9,000 ($50,000 - $41,000).
If the dealer had allowed you $27,000 and assumed your unpaid mortgage of $23,000 on your old home, your sales price would still be $50,000 (the $27,000 trade-in allowed plus the $23,000 mortgage assumed).
You need to know your basis in your home to determine 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 got it in some other way (inheritance, gift, etc.), its basis is either its fair market value when you got it or the adjusted basis of the person you got it from.
While you owned your home, you may have made adjustments (increases or decreases) to your home's basis. The result of these adjustments is your home's adjusted basis, which is used to figure gain or loss on the sale of your home.
To figure your adjusted basis, you can use Worksheet 1, shown later. Filled-in examples of that worksheet are included in the Comprehensive Examples, later.
The cost of property is the amount you pay for it in cash, debt obligations, other property, or services.
| IF you bought your home... | THEN reduce your home's basis by the seller-paid points... |
| after 1990 but before April 4, 1994 | only if you deducted them as home mortgage interest in the year paid. |
| after April 3, 1994 | even if you did not deduct them. |
-
Abstract fees (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,
-
Survey fees,
-
Transfer or stamp taxes,
-
Owner's title insurance, and
-
Any amounts the seller owes that you agree to pay, such as:
-
Fire insurance premiums,
-
Rent for occupancy of the house before closing,
-
Charges for utilities or other services related to occupancy of the house before closing,
-
Any fee or cost that you deducted as a moving expense (allowed for certain fees and costs before 1994),
-
Charges connected with getting a mortgage loan, such as:
-
Fees for refinancing a mortgage.
| IF... | AND... | THEN the taxes... |
| you pay taxes that the seller owed on the home (the taxes up to the date of sale) | the seller does not reimburse you | are added to the basis of your home. |
| the seller reimburses you | do not affect the basis of your home. | |
| the seller paid taxes for you (the taxes beginning on the date of sale) | you do not reimburse the seller | are subtracted from the basis of your home. |
| you reimburse the seller | do not affect the basis of your home. |
-
The cost of the land, plus
-
The amount it cost you to complete the house, including:
-
The value of your own labor, or
-
The value of any other labor you did not pay for.
You must use a basis other than cost, such as fair market value, if you got your home as a gift, from your spouse, as an inheritance, or in a trade. If you got your home in any of these ways, see the following discussion that applies to you. If you want to figure your adjusted basis using Worksheet 1, see the Worksheet 1 Instructions, later, for help.
| IF the donor's adjusted basis at the time of the gift was... | THEN your basis is... |
| more than the fair market value of the home at that time |
the same as the donor's adjusted basis at the time of the gift.
Exception: If using the donor's adjusted basis results in a loss when you sell the home, you must use the fair market value of the home at the time of the gift as your basis. If using the fair market value results in a gain, you have neither gain nor loss. |
| equal to or less than the fair market value at that time, and you received the gift before 1977 |
the smaller of the:
• donor's adjusted basis, plus any federal gift tax paid on the gift, or • the home's fair market value at the time of the gift. |
| equal to or less than the fair market value at that time, and you received the gift after 1976 | the same as the donor's adjusted basis, plus the part of any federal gift tax paid that is due to the net increase in value of the home (explained next). |
-
Publication 547, Casualties, Disasters, and Thefts, in the case of a home that was destroyed, or
-
Chapter 1 of Publication 544, in the case of a home that was condemned.
Example.
A fire destroyed your home that you owned and used for only 6 months. The home had an adjusted basis of $80,000 and the insurance company paid you $130,000 for the loss. You realized a gain of $50,000 ($130,000 - $80,000). You bought a replacement home for $100,000. You recognize a gain of $30,000 ($130,000 - $100,000), the unspent part of the payment from the insurance company. Your gain not recognized is $20,000, the difference between the $50,000 realized gain and the $30,000 recognized gain. The basis of the new home is figured as follows:
| Cost of replacement home | $100,000 |
| Minus: Gain not recognized | 20,000 |
| Basis of the replacement home | $80,000 |
Adjusted basis is your basis increased or decreased by certain amounts.
To figure your adjusted basis, you can use Worksheet 1, shown later. Filled-in examples of that worksheet are included in Comprehensive Examples, later.
-
Gain you postponed from the sale of a previous home before May 7, 1997,
-
Insurance payments you received or expect to receive for casualty losses,
-
Payments you 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,
-
Nonbusiness energy property credit (allowed beginning in 2006) claimed for making certain energy saving improvements that you added to the basis of your home,
-
Residential energy efficient property credit (allowed beginning in 2006) claimed for making certain energy saving improvements that you added to the basis of your home,
-
Adoption credit you claimed for improvements added to the basis of your home,
-
Nontaxable payments from an adoption assistance program of your employer that you used for improvements you added to the basis of your home,
-
Energy conservation subsidy excluded from your gross income because you received it (directly or indirectly) from a public utility after 1992 to buy or install any energy conservation measure. An energy conservation measure is 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, and
-
District of Columbia first-time homebuyer credit (allowed on the purchase of a principal residence in the District of Columbia beginning on August 5, 1997).
-
General sales taxes claimed as an itemized deduction on Schedule A (Form 1040) that were imposed on the purchase of personal property, such as a houseboat used as your home or a mobile home.
Examples.
Putting a recreation room or another bathroom in your unfinished basement, putting up a new fence, putting in new plumbing or wiring, putting on a new roof, or paving your unpaved driveway are improvements. An addition to your house, such as a new deck, a sunroom, or a new garage, is also an improvement.
| Additions Bedroom Bathroom Deck Garage Porch Patio |
Heating & Air Conditioning Heating system Central air conditioning Furnace Duct work Central humidifier Filtration system |
| Lawn & Grounds Landscaping Driveway Walkway Fence Retaining wall Sprinkler system Swimming pool Miscellaneous Storm windows, doors New roof Central vacuum Wiring upgrades Satellite dish Security system |
Plumbing Septic system Water heater Soft water system Filtration system Interior Improvements Built-in appliances Kitchen modernization Flooring Wall-to-wall carpeting Insulation Attic Walls Floors Pipes and duct work |

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 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 2119, Sale of Your Home, that you filed to postpone gain from the sale of a previous home before May 7, 1997, and
-
Any worksheets you used to prepare Form 2119, such as the Adjusted Basis of Home Sold Worksheet or the Capital Improvements Worksheet from the Form 2119 instructions.
You may qualify to exclude from your income all or part of any gain from the sale of your main home. This means that, if you qualify, you will not have to pay tax on the gain up to the limit described under Maximum Exclusion, next. To qualify, you must meet the ownership and use tests described later.
You can choose not to take the exclusion by including the gain from the sale in your gross income on your tax return for the year of the sale. This choice can be made (or revoked) at any time before the expiration of a 3-year period beginning on the due date of your return (not including extensions) for the year of the sale.
You can use Worksheet 2, shown later, to figure the amount of your exclusion and your taxable gain, if any.

You can exclude up to $250,000 of the gain on the sale of your main home if all of the following are true.
-
You meet the ownership test.
-
You meet 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.
If you and another person owned the home jointly but file separate returns, each of you can exclude up to $250,000 of gain from the sale of your interest in the home if each of you meets the three conditions just listed.
You may be able to exclude up to $500,000 of the gain on the sale of your main home if you are married and file a joint return and meet the requirements listed in the discussion of the special rules for joint returns, later, under Married Persons.
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), and
-
Lived in the home as your main home for at least 2 years (the use test).
Example 1—home owned and occupied for 3 years.
Amanda bought and moved into her main home in September 2004. She sold the home at a gain on September 15, 2007. During the 5-year period ending on the date of sale (September 16, 2002 - September 15, 2007), she owned and lived in the home for 3 years. She meets the ownership and use tests.
Example 2—ownership test met but use test not met.
Dan bought a home in 2001. After living in it for 6 months, he moved out. He never lived in the home again and sold it at a gain on June 28, 2007. He owned the home during the entire 5-year period ending on the date of sale (June 29, 2002 - June 28, 2007). However, he did not live in it for the required 2 years. He meets the ownership test but not the use test. He cannot exclude any part of his gain on the sale, unless he qualified for a reduced maximum exclusion (explained later).
The required 2 years of ownership and use during the 5-year period ending on the date of the sale do not have to be continuous.
You meet the tests if you can show that you owned and lived in the property as your main home for either 24 full months or 730 days (365 × 2) during the 5-year period ending on the date of sale.
Worksheet 1 Instructions.
If you use Worksheet 1 to figure the adjusted basis of your home, follow these instructions.
| IF... | THEN... | |
| you inherited your home | 1 | skip lines 1-4 of the worksheet. |
| 2 | find your basis using the rules under Home received as inheritance. Enter this amount on line 5 of the worksheet. | |
| 3 | fill out the rest of the worksheet. | |
| you received your home as a gift | 1 | read Home received as gift and enter on lines 1 and 3 of the worksheet either the donor's adjusted basis or the home's fair market value at the time of the gift, whichever is appropriate. |
| 2 | if you can add any federal gift tax to your basis, enter that amount on line 5 of the worksheet. | |
| 3 | fill out the rest of the worksheet. | |
| you received your home as a trade for other property | 1 | enter on line 1 of the worksheet the fair market value of the other property. (But if you received your home as a trade for your previous home before May 7, 1997, and had a gain on the trade that you postponed using Form 2119, enter on line 1 of the worksheet the adjusted basis of the new home from that Form 2119.) |
| 2 | fill out the rest of the worksheet. | |
| you built your home | 1 | add the purchase price of the land and the cost of building the home. See Construction. Enter that total on line 1 of the worksheet. (However, if you filed a Form 2119 to postpone gain on the sale of a previous home before May 7, 1997, enter on line 1 of the worksheet the adjusted basis of the new home from that Form 2119.) |
| 2 | fill out the rest of the worksheet. |







