Capital Gains on Sale of a Home

Capital Gains on Sale of a Home

Capital gains or losses are the difference between your basis in an asset and its price when you sell it. Nearly anything of value can be a capital asset – cars, jewelry, stocks and bonds, and real estate. In this article, we will be looking specifically at capital gains tax on the sale of residential real estate.

Short vs. long-term capital gains tax 

Capital gains is divided into short- and long-term capital gain for taxation purposes. A short-term capital gain is a gain made on the sale of an asset that you have owned for less than one year and is subject to one tax rate. Long-term capital gains are generally on the sale of assets that you have owned for more than a year and are subject to a lower tax rate than short-term gains. For residential real estate specifically, the amount of long-term capital gains tax paid can also be further reduced by exclusions from taxable gain under Section 121. 

Short-term capital gains tax rates are generally the same as those for ordinary income brackets. You can view a chart here. 

Long-term capital gains tax rates are generally as follows depending on your filing status and Taxable income: 

Tax-filing status


Married, filing jointly

Married, filing separately

Head of household


$0 to $40,400

$0 to $80,800

$0 to $40,400

$0 to $54,100


$40,401 to $445,850

$80,801 to $501,600

$40,401 to $250,800

$54,101 to $473,750


$445,851 or more

$501,601 or more

$250,801 or more

$473,751 or more

Determining basis and gain

In order to determine how much capital gains tax, you may owe on the sale of your property, you must first determine what your basis in the property is. The basis in the property is generally the price you paid for it and any improvements that you have made to the property during your ownership. Basis improvements include major property improvements such as room additions, new heating or cooling systems, a new roof, or swimming pool installation. Your basis in the property becomes your original purchase price plus the cost of any improvements. Please note that repairs and upkeep do not count as additions to taxable basis. For example, if you had to replace one faulty electrical outlet in a room, that would not be an addition to basis. But if you had to modernize all the wiring in the room or the house, that would be an addition to basis and the cost of replacing the faulty outlet would be included in the basis calculation.

Complications to basis might include if you inherited the property, received it in a divorce settlement, or if it was a trade or gift. In these circumstances you would not have the purchase price as a basis and an alternative calculation would have to be used. The generally accepted calculation is the fair market value of the home at the time of the death, divorce, gift, or trade. 

Once you have calculated your basis, you can then calculate the gain from the sale price. The basic formula is to calculate your total amount realized on the sale of the home, less the total basis cost associated with the home. For a more detailed breakdown of basis calculations, see Worksheet 2 of IRS Publication 523, Selling Your Home.

Losses not deductible

If after calculating your realized amount and your basis, you discover that you have a capital loss rather than a capital gain, this is not deductible. While capital losses are deductible and excess losses can be carried forward on securities and real estate investment property, losses are not deductible if they occur on the sale of personal real property, including homes.

How much gain is excludable?

Up until now, the information discussed here could be applicable to any buyer or seller of residential real property, including house flippers and house hackers. The capital gain tax exclusion, however, is available only to persons who have used the property as their primary residence. 

Individuals are able to exclude up to $250,000, and married couples filing jointly up to $500,000 from taxable capital gain on the sale of their primary residence if they pass the eligibility test. In order to be eligible, the taxpayer(s) must first own the home, reside in the United States (ex. not expatriates), and not have acquired the home through a 1031 (like-kind) exchange. Second, the taxpayer, or at least one person in a married couple, must have owned the home for at least two of the preceding five years. Third, the individual or couple must have lived in the home for at least two years in the last five. The two-year block does not need to be all in one piece – it can be any total of days as long as it was at least 730 days within the 5-year period. Note that for married couples, both individuals must meet the residence requirement even though the ownership requirement can be limited to one. Fourth, the capital gain tax exclusion is limited to one sale every two years. If the individual or couple has not taken this tax exclusion on the sale of a second residence within the last two years, they are eligible to claim it again.

If the taxpayer or couple can pass all four of these requirements, they are eligible to claim the full amount of the exclusion. If they have unusual life circumstances that prevented them from meeting the use or ownership requirements, they may still be eligible to claim a reduced exclusion amount. 

Special considerations for house hackers

House hacking, or combining a personal residence with an income property, has become increasingly popular. And in the event that someone who has been house hacking chooses to sell the property, capital gains tax will apply. These calculations can get complicated, as you must determine what percentage of the property you used as a personal residence, and how much is treated as a rental income property. Only the portion of the value of the property that you used as a personal residence is eligible for the gains exclusion described above. The remaining percentage gets treated as investment property and is subject to capital gains tax with no exclusion, as well as other tax liabilities such as depreciation recapture. To accurately determine capital gains calculations on a property that was “house hacked”, Consult with your CPA.

Shah CPA is available for initial consultations, expert tax guidance, and a full list of business advisory services. Contact us at or call 646-328-1326