Capital Gains Tax on Home Sale: Complete Guide
Capital Gains Tax on Home Sale: A Complete Guide for Homeowners
Selling a home can generate a significant profit, and understanding how capital gains tax on home sale applies to your situation is essential before you list. This guide explains the rules, exclusions, calculations, and reporting obligations that determine whether you owe tax—and how much—when you sell your primary residence or an investment property.
What Is Capital Gains Tax on a Home Sale?
A capital gain is the difference between what you paid for a property (your "basis") and what you sell it for, minus certain adjustments. When that difference is positive, it may be subject to capital gains tax. For a primary residence, many homeowners pay no federal capital gains tax at all, thanks to a long-standing exclusion in the U.S. tax code. For second homes, rental properties, or homes that do not qualify for the exclusion, the tax can be substantial.
The Internal Revenue Service treats real estate as a capital asset. Gains on capital assets are taxed at short-term or long-term rates depending on how long you held the property. A home owned for more than one year generally qualifies for the preferential long-term capital gains rates, which are 0 percent, 15 percent, or 20 percent depending on your taxable income, plus a possible 3.8 percent Net Investment Income Tax for higher earners.
The Section 121 Exclusion: The Core Rule for U.S. Homeowners
Internal Revenue Code Section 121 allows a single filer to exclude up to $250,000 of gain on the sale of a primary residence, and a married couple filing jointly to exclude up to $500,000. To qualify, you must meet two tests during the five-year period ending on the date of sale:
- Ownership test: You owned the home for at least two years.
- Use test: You lived in the home as your primary residence for at least two years.
The two years do not need to be continuous, and the periods of ownership and use do not need to overlap perfectly. A homeowner who rented the property for a year but lived in it for two of the previous five years can still claim the exclusion.
Partial Exclusions for Special Circumstances
The IRS permits a reduced exclusion if you sell before meeting the two-year threshold due to a qualifying reason. These include a change in place of employment, a health-related move, or other "unforeseen circumstances" such as divorce, natural disaster, or multiple births from the same pregnancy. The reduced exclusion is calculated proportionally based on the time you met the ownership and use tests.
How to Calculate Your Gain
The gain calculation follows a straightforward formula:
Realized gain = Sale price − Selling expenses − Adjusted basis
The adjusted basis starts with the purchase price and increases with the cost of substantial improvements—such as a new roof, addition, or kitchen remodel—and certain closing costs. Routine repairs and maintenance do not increase basis. Selling expenses include real estate agent commissions, title insurance, legal fees, and transfer taxes.
Consider a concrete example. A homeowner buys a house for $400,000, spends $60,000 on a second-story addition, and pays $30,000 in selling costs. The home sells for $700,000. The adjusted basis is $460,000, and the realized gain is $210,000. For a married couple filing jointly, this gain falls entirely under the $500,000 exclusion, so no federal capital gains tax is owed.
When the Exclusion Does Not Apply
Several situations can trigger capital gains tax on a home sale even for a primary residence:
- Gain exceeds the exclusion limit. A single filer with a $400,000 gain on a home bought for $100,000 would owe tax on $150,000 of gain.
- You claimed depreciation. If you used part of your home as a home office or rental, you must recapture that depreciation at a 25 percent rate, which is not eligible for the Section 121 exclusion.
- You previously excluded gain on another home sale. You generally cannot claim the exclusion again within two years.
- The property was not your primary residence. Vacation homes and pure investment properties do not qualify.
Reporting Requirements
You must report the sale on IRS Form 8949 and Schedule D of your federal tax return if you receive a Form 1099-S from the closing agent or if the gain exceeds your exclusion. Even when no tax is owed, filing protects your right to claim the exclusion and creates a record in case of an audit. Many closing agents issue Form 1099-S whenever a home sells, regardless of gain.
State Taxes and International Variations
State treatment varies widely. Some states, such as Florida and Texas, impose no state income tax. California taxes capital gains as ordinary income at rates that can exceed 13 percent. New York and New Jersey also levy their own capital gains taxes. Homeowners should consult their state revenue department for precise rules.
Outside the United States, the rules differ. In the United Kingdom, Private Residence Relief generally eliminates capital gains tax on a main home, though HMRC applies conditions around ownership and use. Canada