Do I Pay Taxes When I Sell My House? Exclusions, Rates, and Exceptions

In most cases, no — you do not pay federal taxes when you sell your house. Federal law lets you exclude up to $250,000 of profit from the sale of your main home if you file as single, or up to $500,000 if you’re married filing jointly, provided you’ve owned and lived in the home for at least two of the last five years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Only the profit above those amounts is taxed, and for most sellers the entire gain fits inside the limit. The answer changes if you claimed depreciation, sold too soon, inherited the house, or fit one of a few special categories.

Who Qualifies to Exclude the Profit

The exclusion comes from Section 121 of the tax code. To use it, you have to pass two tests:

  • Ownership test: You owned the home for at least two of the five years before the sale.
  • Use test: You lived in it as your primary residence for at least two of those same five years.

The 24 months don’t have to be back-to-back. If you moved out for work and returned before selling, the separate stretches can be added together as long as they fall inside the five-year window.2Internal Revenue Service. Topic No. 701, Sale of Your Home For married couples filing jointly to claim the full $500,000, both spouses must meet the use test, but only one has to meet the ownership test.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

One more limit: you cannot use the exclusion if you already used it on another home sale in the previous two years.2Internal Revenue Service. Topic No. 701, Sale of Your Home And it only covers your main home. Vacation houses, rental properties, and investment real estate don’t qualify.

How to Figure Your Actual Profit

Before you compare anything to the exclusion, you need to know your real gain, and that isn’t just sale price minus purchase price. Start with your cost basis, which is generally what you paid for the home. Then add the cost of permanent improvements you made while you owned it: a new roof, an added bathroom, a kitchen remodel, a replaced HVAC system. Routine repairs and cosmetic touch-ups don’t count.

Subtract your selling costs from the sale price — agent commissions, title insurance, legal fees, and transfer taxes. The result minus your adjusted basis is your gain. If that number is at or below $250,000 (or $500,000 for joint filers), you owe no federal tax on the sale.

If you claimed depreciation on the home at any point, usually because of a home office or a rented-out portion, you have to reduce your basis by the total depreciation. The rule is strict: you reduce basis by the greater of the depreciation you actually deducted or the amount you were allowed to deduct, even if you never claimed it.3Internal Revenue Service. Depreciation Recapture 3 Skipping the deduction during the years you owned the property doesn’t spare you at sale time.

Tax Rates on Profit Above the Exclusion

When your gain runs past $250,000 or $500,000, the tax rate on the excess depends on how long you owned the home. Own it more than a year and you get long-term capital gains rates, which are lower than ordinary income rates.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses For 2026:

  • 0% for single filers with taxable income up to $49,450 and joint filers up to $98,900.
  • 15% for single filers from $49,451 to $545,500 and joint filers from $98,901 to $613,700.
  • 20% for single filers above $545,500 and joint filers above $613,700.

Most sellers with a taxable gain land in the 15% bracket. If you owned the home a year or less, the profit above the exclusion is taxed as short-term capital gain at ordinary income rates, which run higher.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses

The Extra 3.8% for High Earners

The Net Investment Income Tax adds 3.8% on top of capital gains for taxpayers whose modified adjusted gross income passes $200,000 (single) or $250,000 (married filing jointly).5Internal Revenue Service. Net Investment Income Tax A taxable home-sale gain counts as investment income for this purpose, so a big gain in a high-income year can trigger the surtax on top of the regular capital gains rate.

Depreciation Recapture

Depreciation gets its own treatment, and the exclusion does not shield it. Any part of your gain attributable to depreciation you claimed after May 6, 1997 is carved out and taxed at up to 25%, regardless of how long you owned the home.6Internal Revenue Service. Publication 523, Selling Your Home7Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed If you deducted $30,000 in depreciation over the years for a home office, that $30,000 is taxable even if the rest of your profit falls under the $250,000 ceiling.

Selling Before You’ve Hit Two Years

Selling before the two-year mark doesn’t automatically kill the exclusion. If the sale happened primarily because of a job move, a health issue, or certain unforeseen circumstances, you can claim a partial exclusion.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

A qualifying job move requires the new workplace to be at least 50 miles farther from the home than your old workplace was. A qualifying health move requires a doctor’s recommendation for diagnosis, treatment, or care. The IRS also automatically accepts a set of unforeseen events: involuntary destruction or condemnation of the home, divorce, death of an owner or spouse, job loss that qualifies for unemployment benefits, and multiple births from the same pregnancy.6Internal Revenue Service. Publication 523, Selling Your Home

The partial exclusion is prorated. Divide the number of months you owned and lived in the home by 24, and apply that fraction to the full $250,000 or $500,000 limit. Fifteen months of ownership and use as a single filer produces an exclusion of about $156,250 (15 ÷ 24 × $250,000).

Recently Widowed Sellers

A surviving spouse can still claim the full $500,000 exclusion if the home sells within two years of the other spouse’s death.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The couple must have met the ownership and use tests right before the death, and the survivor must still be unmarried when the sale closes. After two years the survivor drops back to the $250,000 single-filer limit. On a long-held home that has appreciated significantly, that deadline can be worth hundreds of thousands of dollars.

Inherited and Gifted Homes

The tax picture on an inherited house is often better than owners expect. Your basis resets to the home’s fair market value on the date of death, not what the original owner paid.8Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent A parent who bought a home for $120,000 in 1985 and left it to you worth $450,000 gives you a $450,000 starting basis. Sell it for $460,000 and only $10,000 is taxable gain. If you later move in and satisfy the two-year tests, you can stack the Section 121 exclusion on top.

Gifts work the opposite way. If someone gives you their home while alive, you generally inherit their original basis for measuring gain.9Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Parents who bought a house for $150,000 and gift it to you when it’s worth $400,000 leave you with a $150,000 basis. Sell soon and the taxable gain can be large. If the fair market value at the time of the gift was lower than the donor’s basis, you use that lower value when calculating a loss. The Section 121 exclusion still applies if you move in and meet the residency requirements.

Military and Foreign Service Members

Uniformed service members, Foreign Service officers, and certain intelligence employees can suspend the five-year test window for up to 10 years while on qualified official extended duty.2Internal Revenue Service. Topic No. 701, Sale of Your Home Qualified duty means being stationed at least 50 miles from the home, or in government housing under orders, for more than 90 days. That effectively stretches the window to 15 years, so repeated deployments don’t erase the residency you built up before leaving.

If You’re Selling as a Foreign Person

A foreign seller of U.S. real estate is subject to FIRPTA withholding: the buyer typically has to withhold 15% of the sale price and send it to the IRS.10Internal Revenue Service. FIRPTA Withholding This is a prepayment, not an extra tax. When you file your U.S. return, any overpayment is refunded.

Withholding is not required when the buyer is an individual purchasing the property as their own residence and the price is $300,000 or less, provided the buyer plans to live in it at least half of the time it’s in use during each of the first two years after purchase.11Internal Revenue Service. Exceptions From FIRPTA Withholding For larger sales, foreign sellers can apply to the IRS for a reduced withholding certificate before closing if the actual tax owed will be much less than 15%.

When You Still Have to Report the Sale

Even a fully tax-free sale sometimes has to be reported. You can skip reporting only when all three of these are true: your gain is within the exclusion, the closing agent did not issue you a Form 1099-S, and you don’t want to voluntarily treat any of the gain as taxable.6Internal Revenue Service. Publication 523, Selling Your Home

Form 1099-S is the usual trigger. Title companies and settlement agents send it to both you and the IRS to report the gross proceeds. Once you get one, you must report the sale on Form 8949 and Schedule D even if the entire gain is excluded.12Internal Revenue Service. Instructions for Schedule D (Form 1040) You show your purchase and sale dates, the sale price, and your adjusted basis, and enter the excluded amount as a negative adjustment. Keep your closing statement, improvement receipts, and any depreciation records for at least three years after filing that return, which is the standard IRS audit window.13Internal Revenue Service. How Long Should I Keep Records

Don’t Forget State Taxes

Federal rules are only half the answer. Most states tax capital gains as ordinary income, and most don’t offer an exclusion that matches the federal one. A handful — including Texas, Florida, Nevada, and Wyoming — have no state income tax at all. Anywhere else, a gain that exceeds the federal exclusion is likely to face state tax too, at rates that vary widely. Check how your state handles it before you count on a specific after-tax number, because the combined federal-plus-state hit can be considerably larger than the federal rate alone.