Real estate
Capital gains tax on the sale of a home
Most homeowners owe no capital gains tax when they sell their home. The calculator shows whether you do, and how much your state adds.
When you sell your main home, you can exclude up to $250,000 of gain from federal income tax, or $500,000 for a married couple filing jointly, under section 121 of the tax code. Two conditions must both be met: you owned the home and lived in it as your main residence for at least 2 of the 5 years before the sale, and you did not exclude the gain on another home in the previous 2 years. Gain above the exclusion is taxed as a long-term capital gain at 0%, 15% or 20% depending on your income (in 2026 the 20% rate starts at $613,700 of taxable income for couples), plus the 3.8% net investment income tax for high earners and your state's income tax. A couple selling for $900,000 a home bought for $350,000, after $50,000 of selling costs, has a gain of $500,000 and owes nothing. Sell before two years for a job, health or an unforeseen event and a prorated exclusion still applies.
Advanced: partial exclusion, depreciation, state rate
Home office or rental use; taxed up to 25%, never excluded.
Nonqualified use: that share of the gain is not excluded.
Top rate shown; lower if your income stays in a lower bracket.
Tax on the sale of your home
$0
$500,000 of the $500,000 gain excluded · you keep $850,000 before paying off any mortgage
| Gain (price − selling costs − basis) | $500,000 |
| Section 121 exclusion | −$500,000 |
| Taxable gain | $0 |
| Federal capital gains tax (0% / 15% / 20%) | $0 |
| Net investment income tax (3.8%) | $0 |
| California income tax on the gain | $0 |
Checked by Radif Partners · Editorial policy · How we calculate
The gain is smaller than the price difference
Tax is due on the gain, not on the sale price, and the gain is not simply what you sold for minus what you paid. Start from the amount realized: the price minus selling expenses such as the agent's commission, transfer taxes you paid as seller, title and escrow fees, and legal costs. Subtract your adjusted basis: the purchase price, plus the closing costs you paid when you bought (title insurance, recording fees, transfer tax paid as buyer), plus every capital improvement since. A new roof, a kitchen remodel, an addition, central air or a fence raise the basis; painting and repairs do not. Keep the receipts for as long as you own the home and three years after the return that reports the sale. Casualty losses you deducted and certain energy credits reduce the basis.
The 2-out-of-5-year test, read closely
The 24 months of ownership and the 24 months of use do not have to be continuous, and they do not have to be the same months. You can rent the house out for three years, move in for two, and sell. Short absences, such as vacations, count as use. For the $500,000 figure, either spouse may meet the ownership test, but both must meet the use test, and neither may have excluded a gain in the past two years; otherwise each spouse's own $250,000 is figured separately. Members of the uniformed services, the Foreign Service and the intelligence community on qualified extended duty can suspend the five-year window for up to 10 years. A surviving spouse who has not remarried keeps the $500,000 limit for a sale within 2 years of the death.
Selling early: the partial exclusion
If the main reason for the sale is a change of place of employment, health, or an unforeseen event (a divorce, a death, multiple births from the same pregnancy, a disaster, losing a job and qualifying for unemployment), you can exclude a prorated amount. Take the shortest of the time you owned the home, the time you lived in it, and the time since your last exclusion, divide by 24 months (or 730 days), and multiply by $250,000 or $500,000. A single owner who moves for a new job after 12 months can exclude up to $125,000: on a $110,000 gain, nothing is taxable. The prorated limit is a ceiling, not a share of the gain, which is why short holds with small gains often owe nothing either.
Partial exclusion if you sell before 2 years
Gain you can exclude
$120,000
| Reduced maximum exclusion | $291,667 |
| Gain left to tax | $0 |
| Full exclusion reached at | 24 months |
Only when the main reason for the sale is a job change, health or an unforeseen event (Publication 523).
What stays taxable even with the exclusion
Two parts of the gain cannot be excluded. The first is depreciation claimed after May 6, 1997 for a home office or a rental period: it is taxed as unrecaptured section 1250 gain at your ordinary rate, with a ceiling of 25%. The second is gain allocated to nonqualified use after 2008, typically years when the house was a rental or vacation home before you moved in. The allocation is by time: a house owned ten years and rented for the first four leaves 40% of the gain (after depreciation) outside the exclusion. Renting after you move out does not count as nonqualified use if it falls within the five-year window, which is how many landlords sell an old home tax-free within three years of leaving it.
Federal capital gains tax rates on the rest in 2026
Gain above the exclusion is a long-term capital gain if you owned the home more than a year. It is taxed on top of your other taxable income: the part that fits under $98,900 of taxable income for a couple ($49,450 single, $66,200 head of household) is taxed at 0%, the part up to $613,700 ($545,500 single) at 15%, and the rest at 20%. The net investment income tax adds 3.8% on the taxable gain when modified adjusted gross income exceeds $250,000 for couples or $200,000 for single filers; the excluded part is not investment income. A couple with $150,000 of other taxable income who sell for $1,400,000 after fifteen years, with a $350,000 basis and $70,000 of costs, has $480,000 of taxable gain and owes about $87,255 in federal tax, plus about $59,040 to California at its top rate.
Your state's share
States that tax income almost all start from federal adjusted gross income, so the federal exclusion carries over and only the taxable gain reaches the state return. Alaska, Florida, Missouri, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington and Wyoming do not tax the gain at all. Elsewhere, most states tax capital gains as ordinary income, and a few give them a break, such as excluding a share of long-term gains. The table lists the top rate and any special treatment, read on each revenue department's site; the calculator starts from that top rate, which is an upper bound for a household whose income stays in lower brackets. The highest top rate is California's 12.3%.
| State | Top rate on the gain | Special treatment | Source |
|---|---|---|---|
| Alabama | 5% | graduated rates, gain taxed as income | revenue.alabama.gov |
| Alaska | none | no personal income tax | tax.alaska.gov |
| Arizona | 2.5% | 25% of a long-term gain subtracted | azleg.gov |
| Arkansas | 3.9% | half of a long-term gain taxed | dfa.arkansas.gov |
| California | 12.3% | 1% more on income above $1,000,000 | ftb.ca.gov |
| Colorado | 4.4% | flat rate | tax.colorado.gov |
| Connecticut | 6.99% | graduated rates, gain taxed as income | cga.ct.gov |
| Delaware | 6.6% | graduated rates, gain taxed as income | delcode.delaware.gov |
| District of Columbia | 10.75% | graduated rates, gain taxed as income | otr.cfo.dc.gov |
| Florida | none | no personal income tax | leg.state.fl.us |
| Georgia | 4.99% | flat rate | dor.georgia.gov |
| Hawaii | 7.25% | long-term gain taxed at 7.25% at most | files.hawaii.gov |
| Idaho | 5.3% | 60% of the gain on Idaho real estate held 12 months deducted | web.archive.org |
| Illinois | 4.95% | flat rate | tax.illinois.gov |
| Indiana | 2.95% | flat rate | in.gov |
| Iowa | 3.8% | flat rate | revenue.iowa.gov |
| Kansas | 5.58% | graduated rates, gain taxed as income | ksrevisor.org |
| Kentucky | 3.5% | flat rate | apps.legislature.ky.gov |
| Louisiana | 3% | flat rate | revenue.louisiana.gov |
| Maine | 7.15% | 2% surcharge on income above $1,000,000 single, $1,500,000 joint | maine.gov |
| Maryland | 6.5% | county income tax on top; extra 2% above $350,000 of income, not on a main home sold under $1.5M | mgaleg.maryland.gov |
| Massachusetts | 5% | 4% surtax on income above $1,107,750 | mass.gov |
| Michigan | 4.25% | flat rate | michigan.gov |
| Minnesota | 9.85% | 1% on investment income above $1,000,000 | revenue.state.mn.us |
| Mississippi | 4% | flat rate | dor.ms.gov |
| Missouri | none | 100% of capital gains subtracted since 2025 | revisor.mo.gov |
| Montana | 4.1% | separate 3% and 4.1% rates on long-term gains | mca.legmt.gov |
| Nebraska | 4.55% | graduated rates, gain taxed as income | revenue.nebraska.gov |
| Nevada | none | no personal income tax | web.archive.org |
| New Hampshire | none | no tax on wages or capital gains | revenue.nh.gov |
| New Jersey | 10.75% | graduated rates, gain taxed as income | nj.gov |
| New Mexico | 5.9% | home sale gain deduction limited to $2,500 | realfile.tax.newmexico.gov |
| New York | 10.9% | graduated rates, gain taxed as income | tax.ny.gov |
| North Carolina | 3.99% | flat rate | ncdor.gov |
| North Dakota | 2.5% | 40% of a long-term gain excluded | tax.nd.gov |
| Ohio | 3.125% | graduated rates, gain taxed as income | tax.ohio.gov |
| Oklahoma | 4.5% | gain on Oklahoma real estate held 5 years or more is deductible | oklegislature.gov |
| Oregon | 9.9% | graduated rates, gain taxed as income | oregon.gov |
| Pennsylvania | 3.07% | own home sale exclusion (2 of 5 years), no dollar cap | pa.gov |
| Rhode Island | 5.99% | graduated rates, gain taxed as income | web.archive.org |
| South Carolina | 5.21% | 44% of a long-term gain deducted | dor.sc.gov |
| South Dakota | none | no personal income tax | dor.sd.gov |
| Tennessee | none | no tax on wages or capital gains | web.archive.org |
| Texas | none | no personal income tax | tlc.texas.gov |
| Utah | 4.45% | flat rate | le.utah.gov |
| Vermont | 8.75% | only the $5,000 exclusion applies to a home | tax.vermont.gov |
| Virginia | 5.75% | graduated rates, gain taxed as income | law.lis.virginia.gov |
| Washington | none | capital gains excise tax exempts real estate | dor.wa.gov |
| West Virginia | 4.58% | graduated rates, gain taxed as income | code.wvlegislature.gov |
| Wisconsin | 7.65% | 30% of a long-term gain excluded | revenue.wi.gov |
| Wyoming | none | no personal income tax | no income tax |
Reporting the sale
If the whole gain is excluded and you did not receive a Form 1099-S from the closing agent, you do not report the sale on your return. If you received a 1099-S, or part of the gain is taxable, report it on Form 8949 and Schedule D. A loss on the sale of a personal residence is not deductible. When the home was also a rental or an office, you split the sale between the personal part, which can use the exclusion, and the business part, reported on Form 4797. For a property that was only ever a rental, the exclusion does not apply at all, and the tool to look at is the 1031 exchange, which defers the tax instead of excusing it.