Money · 9 min read
Do you pay taxes when you sell your house? Capital gains and the $250k/$500k exclusion
The short answer
When you sell your main home, you are taxed on the gain, not the sale price, and a long-standing IRS rule lets most sellers exclude a large chunk of that gain entirely. A single owner can exclude up to $250,000 of gain and a married couple filing jointly up to $500,000, as long as they owned and lived in the home for at least two of the last five years. This guide walks through who qualifies, how to compute gain from your cost basis, the rates that apply to anything above the exclusion, and the special cases for rentals, partial moves, and reporting at closing.
Selling your home raises one question almost every owner asks late at night: how much of this will the IRS take? For most sellers the answer is reassuring. You are not taxed on what the house sells for. You are taxed on the gain, and a long-standing rule lets the typical owner shield a large amount of that gain, often all of it, from federal tax.
This guide explains the rule, called the Section 121 exclusion, who qualifies, how to figure the gain that matters, what happens to anything above the exclusion, and the special cases that trip people up. It also covers the proposals floating around Congress in 2026 to change these rules, clearly labeled as proposals and not current law.
General information, not tax advice. This page explains the federal rules in plain terms. It is not tax or legal advice, every situation differs, and the dollar limits and rates can change. Confirm your specific case with a tax professional or directly with the IRS before you file.
The short version: most sellers owe nothing
If the home was your main residence and you owned and lived in it for at least two of the last five years, you can exclude up to $250,000 of gain if you file single, or up to $500,000 if you are married filing jointly, from your federal income. Most home sales fall under those limits, so most sellers owe no federal capital gains tax at all.
Two things to hold onto before the detail:
- It is gain, not sale price. A $600,000 sale does not mean $600,000 of taxable income. The gain is what is left after you subtract what you paid and what you spent.
- The exclusion is generous and per-sale, but it has tests. You generally have to pass an ownership test and a use test, and you can only use the full exclusion once every two years.
How gain is actually figured
This is the part people skip, and it is where the tax often disappears. The IRS computes gain in two steps.
Step 1, the amount realized:
Selling price − Selling expenses = Amount realized
Selling expenses include the costs of the sale itself, such as any agent commissions you paid, title and escrow fees, transfer taxes, and similar closing costs. Selling without an agent can reduce these, which is one reason to look at your full cost to sell a house without an agent and to run the numbers in our net proceeds tool. To estimate the taxable gain after the exclusion on your own figures, use the capital gains calculator.
Step 2, the gain:
Amount realized − Adjusted basis = Gain or loss
Your adjusted basis is what you paid for the home plus the cost of capital improvements that are still part of it at the time of sale. A new roof, a finished basement, an addition, a replaced HVAC system, and similar lasting improvements raise your basis and therefore shrink your gain. Routine repairs and maintenance do not count. Keeping receipts for improvements over the years is the single most valuable tax habit a homeowner has, because every dollar of legitimate basis is a dollar of gain you do not have to explain.
A worked example, married couple filing jointly:
| Line | Amount |
|---|---|
| Selling price | $700,000 |
| Less selling expenses (commissions, title, transfer tax) | −$40,000 |
| Amount realized | $660,000 |
| Less adjusted basis (purchase price $300,000 + $80,000 improvements) | −$380,000 |
| Gain | $280,000 |
| Section 121 exclusion (married filing jointly) | up to $500,000 |
| Taxable gain | $0 |
The $280,000 gain is fully under the $500,000 ceiling, so this couple owes no federal capital gains tax. Change the numbers, a long-held home in an expensive market, and the math can shift, which is what the rest of this guide is for.
The ownership and use tests
To claim the full exclusion you generally must meet two tests during the five-year period ending on the sale date:
- Ownership test: you owned the home for at least 24 months (two years) out of the last 60 months.
- Use test: you lived in it as your main home for at least 24 months out of the last 60 months.
The 24 months do not have to be continuous, and the ownership period and the use period do not have to be the same 24 months, as long as each falls within the five years before the sale. For a married couple filing jointly, only one spouse needs to meet the ownership test, but both must meet the use test, and neither can have used the exclusion on another sale in the two years before this one.
If you flunk the tests, you may not owe tax anyway if your gain is small, but you cannot use the exclusion to wipe out a large gain. That is when the partial exclusion below, or careful timing, matters.
What if you owe? The rates
Any gain above your exclusion is a capital gain, and the rate depends on how long you owned the home.
- More than one year (long-term): taxed at 0, 15, or 20 percent, depending on your taxable income for the year. Many sellers land in the 0 or 15 percent band.
- One year or less (short-term): taxed at your ordinary income tax rate, the same as wages. Selling a main home this fast is unusual, but flips and quick relocations can land here.
Two add-ons to know about:
- Net investment income tax (NIIT): an extra 3.8 percent can apply to the taxable portion of your gain if your modified adjusted gross income is over $200,000 (single) or $250,000 (married filing jointly). Importantly, gain that the Section 121 exclusion covers is not counted as investment income, so the exclusion shields you from NIIT too.
- Depreciation recapture: covered in the rentals section below, taxed at up to 25 percent.
Because the long-term rate brackets and the income that pushes you into them change each year, check the current figures on the IRS pages cited at the bottom rather than relying on a number you saw last year.
Special cases that change the answer
Moving before two years: the partial exclusion
If you sell before meeting the two-year tests because of a change in your place of employment, a health reason, or an unforeseeable event as the IRS defines those, you can claim a reduced exclusion. It is prorated: take the shorter of how long you owned or used the home, in months, divide by 24, and multiply by the normal limit. An owner who qualifies and lived there 12 months, for example, could exclude up to half of $250,000, or $125,000. A move for an unrelated reason, such as simply wanting a change of scenery, does not qualify for the partial exclusion.
Rentals, second homes, and depreciation recapture
The exclusion is for your main home. A pure rental property or a second home that was never your principal residence generally does not qualify, and gain there is fully taxable. Two wrinkles catch people:
- Depreciation recapture. If you ever rented the home or claimed home-office depreciation, you cannot exclude the part of your gain equal to depreciation allowed or allowable after May 6, 1997. That amount is recaptured and taxed at a maximum 25 percent rate, even if the exclusion covers the rest of your gain. This applies whether or not you actually deducted the depreciation, which surprises many former landlords and home-office filers.
- A home that was both. If you lived in a property and also rented it at times, the math splits into qualified and non-qualified use, and it gets complicated quickly. This is the clearest case for paying a tax professional, and it can interact with your seller disclosures and documents if the property’s history matters to a buyer.
Inherited homes and surviving spouses
Inherited property usually gets a “stepped-up basis” to its value at the date of death, which often erases most of the gain. A surviving spouse who sells within two years of a spouse’s death can sometimes still claim the full $500,000 exclusion. These rules are favorable but specific, so confirm them before you assume them.
Reporting at closing: Form 1099-S and the certification
At closing, the settlement agent may issue Form 1099-S, Proceeds From Real Estate Transactions, which reports your sale proceeds to the IRS.
- If you receive a 1099-S, you must report the sale on your return (using Schedule D and Form 8949), even if all the gain is excludable.
- The agent can skip the 1099-S if you give a written certification at closing stating that the home was your principal residence and that the full gain is excludable under Section 121, within the $250,000 (or $500,000 if you certify you are married) limit. Title companies routinely hand sellers this form to sign.
- If you do not get a 1099-S and your entire gain is excluded, you generally do not have to report the sale at all.
This certification is a normal, expected piece of paper, not a red flag. It is worth understanding before you sit down at the table, alongside the rest of what happens in closing and costs. If your sale is large or complicated, having a real estate attorney review the closing documents can be money well spent.
What’s being debated in 2026
This section describes proposals, not current law. As of June 2026, the exclusion limits remain $250,000 and $500,000 and have not changed. There is active discussion in Congress about raising or removing them, driven partly by the fact that the dollar limits, set in 1997, have never been indexed to inflation, so more long-time owners in high-cost markets now exceed them.
Two named bills illustrate the range:
- The No Tax on Home Sales Act (H.R. 4327, 119th Congress) was introduced on July 10, 2025 and would eliminate the dollar caps on the exclusion entirely for a principal residence. It was referred to the House Ways and Means Committee and, as of this writing, has not advanced out of committee or become law.
- The More Homes on the Market Act is a separate proposal that would double the existing exclusion and index it to inflation going forward, rather than removing it.
The National Association of Realtors has publicly advocated for raising the exclusion and is tracking these efforts. None of this is law yet, and bills introduced in committee frequently change or stall. Do not plan a sale around a proposal. Decide based on the rules as they actually stand the year you sell, and watch the cited IRS and Congress pages for any change.
A quick self-check before you sell
- Was this your main home for at least 2 of the last 5 years? If yes, the full exclusion is likely available.
- Estimate your gain, not your sale price: selling price, minus selling costs, minus purchase price, minus improvements.
- Is that gain under $250,000 (single) or $500,000 (married)? If yes, you likely owe no federal capital gains tax.
- Did you ever rent it or take home-office depreciation? If yes, expect some recapture and get advice.
- Gather your records now: purchase settlement statement, improvement receipts, and prior-year depreciation if any.
Selling without an agent does not change any of these tax rules, but it does change your selling costs, which feeds straight into the gain calculation. See whether the savings make sense for you in is FSBO worth it, and remember the standing caution above: this is general information, not tax advice, so confirm your numbers with a tax professional or the IRS before you file.
Sources used on this page
Every legal, tax, and process claim on this page traces to one of these. We re-check them on a schedule and date the page when anything changes.
- Topic no. 701, Sale of your home (exclusion amounts, ownership and use tests, reporting)Internal Revenue Service · irs.gov
- Publication 523, Selling Your Home (figuring gain, basis, partial exclusion, depreciation recapture)Internal Revenue Service · irs.gov
- Topic no. 409, Capital gains and losses (0/15/20 percent rates, more-than-one-year holding, 25 percent unrecaptured section 1250 rate)Internal Revenue Service · irs.gov
- Net Investment Income Tax (3.8 percent rate, MAGI thresholds, excluded home-sale gain not counted)Internal Revenue Service · irs.gov
- Instructions for Form 1099-S (principal residence certification exception, $250,000/$500,000 thresholds)Internal Revenue Service · irs.gov
- H.R.4327, No Tax on Home Sales Act (119th Congress, introduced July 10 2025, referred to Ways and Means)Congress.gov, Library of Congress · congress.gov
- Capital Gains (advocacy on raising the exclusion; More Homes on the Market Act and related bills)National Association of Realtors · nar.realtor
Common questions
Do I have to pay capital gains tax when I sell my house?
Usually not. If the home was your main residence and you owned and lived in it for at least two of the last five years, the Section 121 exclusion lets a single filer exclude up to $250,000 of gain and a married couple filing jointly up to $500,000. Most sellers fall under those limits and owe no federal capital gains tax. You are taxed only on the gain above the exclusion, if any.
How do I calculate the gain on my home?
Start with the selling price, subtract your selling expenses such as agent commissions, title fees, and transfer taxes, to get the amount realized. Then subtract your adjusted basis, which is what you paid for the home plus the cost of capital improvements that are still part of it. The result is your gain. The gain, not the sale price, is what the tax rules look at, and the exclusion is applied to that gain.
What is the ownership and use test?
To claim the full exclusion you generally must pass two tests within the five years before the sale. The ownership test asks whether you owned the home for at least 24 months out of those 60 months. The use test asks whether you lived in it as your main home for at least 24 months out of those 60 months. The two periods do not have to be the same 24 months, and for married couples only one spouse needs to meet the ownership test while both must meet the use test.
What tax rate applies if my gain is above the exclusion?
Gain above the exclusion on a home you owned more than one year is a long-term capital gain, taxed at 0, 15, or 20 percent depending on your taxable income for the year. High-income sellers may also owe the 3.8 percent net investment income tax on the taxable portion. Gain that the exclusion covers is not counted toward that tax. If you owned the home a year or less, the gain is short-term and taxed at your ordinary income rate.
Can I still get part of the exclusion if I move before two years?
Sometimes. If you sell early because of a change in your place of employment, a health reason, or an unforeseeable event as the IRS defines it, you may qualify for a partial exclusion. It is prorated by the shorter of how long you owned or used the home, divided by 24 months, so a qualifying owner who lived there 12 months could exclude up to half of the normal limit. A sale early for an unrelated reason, such as simply wanting to move, does not qualify.
Do I owe tax if the house was a rental or I claimed home-office depreciation?
Possibly. The exclusion does not cover gain equal to depreciation you claimed or could have claimed after May 6, 1997, for business or rental use. That depreciation is recaptured and taxed at a maximum 25 percent rate even if the rest of your gain is excluded. A property that was a rental or second home rather than your main residence may not qualify for the exclusion at all. This is the area where a tax professional is most worth the fee.
Will I get a tax form, and do I have to report the sale?
You may receive Form 1099-S from the closing agent reporting the sale proceeds. If you get one, you must report the sale on your return even if all the gain is excludable. The closing agent can skip the form if you sign a written certification at closing that the home was your principal residence and the full gain is excludable under Section 121, within the $250,000 or $500,000 limits. If you do not get the form and your whole gain is excluded, you generally do not have to report the sale.