Blog Details

Capital Gains on a Home Sale: Your 2026 Tax Guide

Most homeowners who sell their primary residence owe nothing in federal capital gains tax. Under Section 121 of the tax code, you can exclude up to $250,000 of gain if you file single, or up to $500,000 if you’re married filing jointly, provided you meet two straightforward tests. The key word is gain, not sale price. If your home sold for $400,000 and your adjusted basis is $200,000, your gain is $200,000, which a single filer can exclude entirely.

Run this quick self-check before reading further:

  1. Ownership test: Did you own the home for at least 24 months during the past 5 years?
  2. Use test: Did you live in it as your main home for at least 24 months during the past 5 years?
  3. Gain size: Is your estimated gain (sale price minus selling costs minus your adjusted basis) likely to exceed $250,000 single / $500,000 married?

If you pass the first two and your gain stays under the threshold, you likely owe no federal tax and may not even need to report the sale. If you fail any test, or your gain is large, keep reading. Gather your closing documents, check whether Form 1099-S was issued, and pull together records of every capital improvement you made. When the numbers are borderline, a CPA conversation before closing is worth the cost.


Key Takeaways

Most sellers who meet the 2-of-5-year ownership and use tests can exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gain from a primary-residence sale, and owe no federal tax at all.

Point Details
Verify ownership and use tests You need 24 months of ownership and 24 months of primary use within the 5 years before the sale date.
Calculate gain, not sale price Gain equals amount realized minus adjusted basis; the exclusion applies to gain, not gross proceeds.
Document capital improvements Every improvement receipt increases your adjusted basis and directly reduces your taxable gain.
Check Form 1099-S handling If a 1099-S is issued, you must report the sale on Form 8949 and Schedule D even if no tax is owed.
State taxes still apply Federal exclusion doesn’t eliminate state capital gains tax; check your state revenue department before closing.
Decostabuyshomes Provides as-is cash purchases with full closing documentation so your CPA can verify your tax outcome.

Table of Contents

Who qualifies for the $250,000 / $500,000 home-sale exclusion?

The IRS exclusion rules come down to two tests, both applied over a rolling 5-year window that ends on the sale date.

The ownership test requires you to have owned the home for at least 24 months during that 5-year period. The months don’t need to be consecutive. If you owned the home for 18 months, moved away, and then owned it again for another 8 months before selling, you pass.

The use test requires you to have used the home as your main home for at least 24 months during the same 5-year window. Again, the months don’t need to be consecutive, but they must add up to 24. Vacations, short absences, and temporary moves generally don’t break the count.

For married couples filing jointly, the $500,000 exclusion requires that both spouses meet the use test, but only one spouse needs to satisfy the ownership test. If one spouse owned the home before the marriage, the couple can still claim the full $500,000 exclusion at sale, as long as both lived there for two of the prior five years.

What counts as your main home? The IRS applies a facts-and-circumstances test. Time spent is the primary factor, but Publication 523 also weighs your mailing address, driver’s license, voter registration, place of employment, and where your bank accounts are held. You can only have one main home at a time, so if you own a beach house and a city condo, you need to be clear about which one qualifies.

A few quick examples:

A single homeowner who bought in January 2021 and sells in March 2026 easily passes both tests. A married couple where one spouse moved in only 14 months before the sale date would fail the use test for that spouse, dropping the available exclusion to $250,000 (the qualifying spouse’s amount) rather than $500,000.

Military and government employees get an important break. Active-duty military, Foreign Service officers, and intelligence community employees can suspend the 5-year test period for up to 10 years while on qualified official extended duty. That means a service member stationed overseas for several years can still come back and sell their home while meeting the 2-of-5-year tests.


Who qualifies for the $250,000 / $500,000 home-sale exclusion? — overview diagram

How to calculate your taxable gain step by step

The math isn’t complicated, but the inputs matter. A lot of sellers leave money on the table by forgetting to add legitimate improvements to their basis. Here’s the full walkthrough, drawn from the IRS Publication 523 worksheets.

Step 1: Determine your amount realized.
Start with your gross sale price. Add any other consideration you received (personal property, services). Then subtract your selling expenses: agent commissions, legal fees, title insurance, transfer taxes, and any seller-paid closing costs. The result is your amount realized.

Step 2: Determine your adjusted basis.
Start with what you originally paid for the home (your purchase price). Add:

  • Capital improvements (a new roof, an addition, a kitchen remodel, HVAC replacement)
  • Certain closing costs from when you bought the home (title fees, recording fees, legal fees)
  • Special assessments for local improvements

Subtract any depreciation you claimed or were allowed to claim for business or rental use of the property.

Step 3: Calculate your gain.
Gain = Amount Realized minus Adjusted Basis

Step 4: Apply the exclusion.
Subtract the applicable exclusion ($250,000 or $500,000). If the result is zero or negative, you have no taxable gain. If it’s positive, that amount is subject to capital gains tax.

Worked example, single filer:

Worked example, married filing jointly with a larger gain:

Now consider the same couple if they had claimed $30,000 in depreciation during a rental period. That $30,000 reduces their adjusted basis to $400,000, pushing their gain to $493,000. That portion cannot be excluded.

What increases your basis vs. what counts as a selling expense:

Increases Adjusted Basis Selling Expenses (Reduce Amount Realized)
Room additions, new garage Real estate agent commissions
New roof or siding Attorney and title fees
HVAC system replacement Transfer and recording taxes
Kitchen or bathroom remodel Seller-paid buyer closing costs
Landscaping and driveway Advertising costs
Insulation and windows Points paid to help buyer’s loan

Pro Tip: Keep every receipt for capital improvements in a dedicated folder, physical or digital. The IRS distinguishes between a capital improvement (adds value, extends life, adapts the home to a new use) and a repair (keeps the home in ordinary condition). Only improvements increase your basis. A fresh coat of paint before listing does not.


When the exclusion is reduced or unavailable

The Section 121 exclusion is generous, but several situations can shrink or eliminate it entirely.

Prior exclusion within two years. You can’t claim the full exclusion if you already excluded gain on a different home sale within the two years before your current sale date. Sell two homes in the same 24-month window and only one gets the full exclusion.

Partial exclusion for qualifying life events. If you don’t meet the full 2-of-5-year tests, you may still qualify for a reduced exclusion when the sale is caused by a change in employment location, a health issue, or an unforeseeable event such as a divorce, natural disaster, or job loss. The IRS worksheets in Publication 523 walk through the proportional calculation. For example, if a single filer lived in the home for only 12 of the required 24 months before a qualifying job relocation, the partial exclusion is 12/24 of $250,000, or $125,000.

Rental and business use. When part of your home was used for business or rental purposes, the gain must be allocated. The portion attributable to nonresidential use is not eligible for the Section 121 exclusion. Any depreciation claimed on that portion since May 6, 1997, is subject to recapture and reported on Form 4797. This is one of the most common surprises for sellers who rented out a room or ran a home office and claimed depreciation.

Nonresident sellers. Foreign nationals selling U.S. real estate face withholding requirements under FIRPTA (Foreign Investment in Real Property Tax Act). The Section 121 exclusion may still apply if the nonresident meets the ownership and use tests, but the withholding mechanics are different and typically require a withholding certificate from the IRS before closing.

Like-kind exchanges. If you previously deferred gain on the property through a Section 1031 like-kind exchange, the deferred gain carries into your basis and can reduce the amount you can exclude. The interaction between Section 1031 and Section 121 requires careful planning, and the IRS has specific ordering rules.


How to report the sale on your federal tax return

The general rule is clean: if you meet the ownership and use tests and your entire gain is excluded, you don’t need to report the sale at all, unless you received Form 1099-S. Once a 1099-S is issued, reporting is required regardless of whether any tax is owed.

Step-by-step reporting checklist:

  • Check for Form 1099-S. Your closing agent or title company typically issues this. If you received one, you must report the sale.
  • Compute your gain using the worksheet steps above.
  • Determine if the exclusion covers the full gain. If yes and no 1099-S was issued, no further filing is needed.
  • If reporting is required, complete Form 8949 (Sales and Other Dispositions of Capital Assets) and carry the totals to Schedule D (Form 1040).
  • For installment sales, complete Form 6252 (Installment Sale Income) each year you receive payments. Publication 537 covers the full installment-sale rules.
  • For business-use portions, complete Form 4797 (Sales of Business Property) for the nonresidential allocation.

IRS forms reference:

Form / Publication Purpose
Publication 523 Official worksheets for gain calculation, exclusion, and allocation
Topic No. 701 Summary of eligibility rules and reporting triggers
Form 1099-S Reports gross proceeds from real estate transactions
Form 8949 Reports individual capital asset sales; feeds into Schedule D
Schedule D (Form 1040) Summarizes capital gains and losses on your tax return
Form 6252 Reports income from installment sales year by year
Form 4797 Reports gain from sale of business or rental-use property
Publication 537 Full rules for installment sale reporting

Filing tips worth knowing:

  • Even when you exclude all gain and don’t file, keep your improvement records for at least three years after the sale. The IRS can still audit the return for the year of sale.
  • An installment sale lets you spread the gain over multiple tax years, which can keep you in a lower bracket, but it also means filing Form 6252 every year until the note is paid off.
  • If your closing agent asks whether you want to certify that the sale qualifies for the exclusion (to avoid 1099-S issuance), you can do so in writing at closing. If you’re uncertain, let the 1099-S be issued and report accordingly.

Practical strategies to minimize or defer tax on a home sale

Most sellers have more control over their tax outcome than they realize. These are the strategies that actually move the needle, drawn from IRS guidance and Investopedia’s tax-reduction analysis.

Use the Section 121 exclusion fully. The most powerful tool available costs nothing. If your gain is close to the threshold, timing the sale to ensure you’ve met the 2-of-5-year tests can mean the difference between a zero tax bill and a five-figure one. If you’re 18 months into ownership and thinking about selling, waiting six more months can be worth tens of thousands of dollars.

Document every capital improvement. This is where most sellers leave money on the table. A $20,000 kitchen remodel, a $15,000 roof replacement, and a $10,000 HVAC upgrade add $45,000 to your adjusted basis and reduce your taxable gain by the same amount. Without receipts, those improvements are invisible to the IRS. Keep contractor invoices, permit records, and bank statements.

Consider an installment sale. If your gain exceeds the exclusion, structuring the sale so the buyer pays over time lets you recognize the gain in smaller annual chunks. This can keep each year’s recognized gain in a lower long-term capital gains bracket. The trade-off: you’re extending credit to the buyer, which carries its own risk. Form 6252 handles the annual reporting.

If you’re in a lower-income year, selling then rather than in a high-income year can drop your effective rate on any taxable gain.

Qualified Opportunity Fund (QOF) deferral. For sellers with large taxable gains, investing the gain in a Qualified Opportunity Fund within 180 days of the sale can defer and potentially reduce the federal tax. This is a complex strategy with specific eligibility rules and is worth discussing with a tax advisor before the sale closes.

Pro Tip: The IRS position on losses is unambiguous: a loss on the sale of a personal residence is not tax-deductible. If you sell for less than your adjusted basis, you cannot claim that loss on your return. There’s no workaround here.


Practical strategies to minimize or defer tax on a home sale — overview diagram

Common mistakes homeowners make with capital gains on home sales

These errors show up repeatedly at tax time, and most are preventable with a few hours of preparation before closing.

  • Confusing sale price with gain. The exclusion applies to your gain, not your gross proceeds. A $400,000 sale with a $300,000 adjusted basis produces a $100,000 gain, not a $400,000 one. What to do instead: run the gain calculation before listing, not after closing.
  • Failing to keep improvement records. Without documentation, the IRS won’t allow the basis increase. What to do instead: build a home improvement folder the day you move in and add every receipt.
  • Not reporting when Form 1099-S is issued. Some sellers assume that because the gain is excluded, no filing is needed. Once a 1099-S exists, the IRS has a record of the transaction. What to do instead: report the sale on Form 8949 and Schedule D, showing the exclusion.
  • Mishandling mixed personal/rental use. Sellers who rented a room or used a home office and claimed depreciation are often surprised to learn that portion of the gain is taxable and subject to recapture. What to do instead: pull your prior tax returns and identify any depreciation claimed before you calculate your gain.
  • Forgetting state tax rules. Federal exclusion doesn’t mean state exclusion. Several states have their own capital gains treatment. What to do instead: check your state revenue department’s rules before closing.
  • Assuming the prior exclusion clock doesn’t matter. If you sold another home and excluded gain within the past two years, you may not qualify for the full exclusion on this sale. What to do instead: check the date of your last home sale before assuming full eligibility.

Sellers with complex situations, including rental history, multiple properties, or gains above $400,000, should consult a CPA before closing, not after. Reviewing common negotiation and closing mistakes that reduce net proceeds is also worth the time.


Selling quickly to a cash buyer: tax and reporting implications

A fast, as-is sale to a cash buyer or investor follows the same federal tax rules as any other home sale. The exclusion still applies if you meet the tests. The gain calculation is identical. What changes is the closing process and the paperwork you need to collect.

Here’s a realistic scenario: you sell your home as-is for $310,000 to a cash buyer. The buyer pays all closing costs. Your adjusted basis is $195,000. Your amount realized is $310,000 (no selling expenses if the buyer covers them). Your gain is $115,000. As a single filer who has lived there for three years, you exclude the entire gain. No federal tax owed.

What you need to collect at closing for tax purposes:

  1. HUD-1 or Closing Disclosure. This is your primary document for computing amount realized. Confirm every line item, especially seller-paid costs, because they affect your gain calculation.
  2. Form 1099-S (if issued). In cash and investor transactions, the closing agent may or may not issue a 1099-S. Ask directly before closing. If one will be issued, plan to report the sale.
  3. Records of capital improvements. Bring these to closing or have them ready for your tax preparer. Even in an as-is sale, documented improvements reduce your gain.
  4. Prior refinancing documents. These don’t affect your basis directly, but your tax preparer may need them to confirm the loan payoff doesn’t create any unusual tax treatment.
  5. Prior depreciation records. If you ever rented the property or claimed a home-office deduction, pull those returns. Depreciation claimed reduces your basis and creates recapture exposure.

As the IRS notes, even in quick transactions, accurate closing statements and a 1099-S (if issued) are what your tax preparer needs to close the file cleanly. Confirm with the closing agent in writing whether a 1099-S will be issued. For more on what to expect in a fast closing, the home closing process checklist for cash sales covers the documentation sequence in detail.


State capital gains tax on a home sale

The federal exclusion is the big number, but state taxes can still produce a real bill. Most states that have an income tax treat capital gains as ordinary income, which means your taxable gain after the federal exclusion may still be taxable at the state level, depending on where you live.

A handful of states, including Florida, Texas, Nevada, Washington (for most sellers), and a few others, have no state income tax, so there’s no state capital gains exposure on a home sale. States like California, New York, and Oregon tax capital gains at their full ordinary income rates, which can reach into the double digits.

Some states offer their own homestead or primary-residence exclusions that mirror or supplement the federal rules, but the amounts and eligibility criteria vary. New York, for example, has no state-level equivalent of the federal Section 121 exclusion. Your entire gain, after the federal exclusion, is potentially subject to New York state and city income tax if you’re a resident.

The practical move: before you close, check your state’s revenue department website for its specific capital gains treatment. If you’re selling in a high-tax state and your gain exceeds the federal exclusion, the state tax bill can be significant enough to affect your net proceeds calculation and timing decisions.


How a home sale affects the alternative minimum tax (AMT)

For most primary-residence sellers, the AMT is not a major concern. The Section 121 exclusion applies for AMT purposes just as it does for regular tax, so excluded gain doesn’t create an AMT preference item.

Where AMT can become relevant is when the home sale produces a large taxable gain that pushes your total income significantly higher for the year. AMT is calculated on a parallel tax base that adds back certain deductions and preferences. A large capital gain that increases your regular taxable income can, in some cases, reduce the benefit of the AMT exemption phase-out, effectively increasing your AMT liability.

The other AMT trigger to watch: if you exercised incentive stock options (ISOs) in the same year as your home sale, the combination of the ISO spread and the capital gain can create a meaningful AMT exposure. This is a situation where a tax professional should run both calculations before you finalize the sale timing.

For the majority of homeowners selling a primary residence with a gain fully covered by the Section 121 exclusion, AMT is a non-issue. The concern rises when taxable gain is large, income is already high, or other AMT preference items are present in the same tax year.


How divorce or inheritance changes your capital gains exclusion

Divorce. When a home is transferred to a spouse as part of a divorce settlement, the receiving spouse takes over the transferring spouse’s adjusted basis. No gain is recognized at the time of transfer. For the exclusion at a future sale, the receiving spouse can count the transferring spouse’s ownership period toward the ownership test, but must independently meet the use test. If the divorce decree requires the home to be sold and proceeds split, both spouses can potentially claim the exclusion on their respective shares, provided each meets the tests.

Inheritance. Inherited property gets a stepped-up basis to the fair market value on the date of the decedent’s death (or an alternate valuation date in some estates). This is one of the most valuable tax benefits in the code. If you inherit a home worth $600,000 and sell it six months later for $615,000, your gain is only $15,000, not the difference between the original purchase price decades ago and today’s sale price.

For the Section 121 exclusion on an inherited home, the rules are more nuanced. If you inherit the home and then live in it as your primary residence for two of the five years before selling, you can claim the exclusion on any gain above the stepped-up basis. The ownership test is generally met because the IRS allows you to add the decedent’s ownership period to your own.

Selling an inherited home with multiple heirs adds another layer of complexity. Each heir’s share of the gain is calculated separately, and each must independently meet the use test to claim the exclusion. For a practical walkthrough of that process, the guide to selling inherited property with multiple owners covers the key steps.


What sellers actually ask about taxes at closing

The questions that come up most often before a closing aren’t about the worksheets. They’re about whether the tax bill is real, what paperwork matters, and what to do about that rental period years ago.

“Will I actually owe tax?” For most primary-residence sellers who’ve lived in their home for at least two years, the answer is no. Run the gain calculation using your purchase price, documented improvements, and selling costs. If the number is under $250,000 (single) or $500,000 (married), you’re covered. The IRS worksheets in Publication 523 are the authoritative tool for that math.

“What records do I actually need?” Your original purchase closing disclosure, receipts for capital improvements, and the current sale’s closing statement. If you claimed depreciation at any point, add those prior tax returns to the pile. That’s the complete set your CPA needs to confirm your basis and compute any taxable gain.

“I rented part of the house for two years. Does that change things?” Yes, it can. The portion of gain attributable to the rental period may not be excludable, and any depreciation you claimed on that portion is subject to recapture. The allocation isn’t always large, but it needs to be calculated. Pull your prior returns, identify the depreciation claimed, and let your tax preparer run the numbers before you assume the full exclusion applies.


Selling as-is? Here’s how a cash buyer handles the paperwork

If your home needs work, or you simply want to skip the listing process, selling as-is to a cash buyer can close in days rather than months. Decostabuyshomes buys homes in any condition across the United States, covers closing costs, and provides a complete closing statement so your CPA has everything needed to confirm your tax outcome.

Decostabuyshomes

The closing process with a cash buyer typically produces the same tax documents as a traditional sale: a Closing Disclosure showing your net proceeds, and a Form 1099-S if the closing agent issues one. The difference is speed and simplicity. No repair negotiations, no agent commissions eating into your amount realized, and no drawn-out contingency periods. If you’re weighing whether to fix up before selling or go as-is, the as-is vs. fixing up decision guide walks through the financial trade-offs in detail.

Ready to see what your home is worth in a cash offer? Visit Decostabuyshomes to start the process and request a closing packet your tax preparer can use.


Authoritative IRS publications and forms to review

The IRS worksheets in Publication 523 (Selling Your Home) are the calculation gold standard for any home sale. They include Worksheet 1 (maximum exclusion), Worksheet 2 (figuring gain or loss), and Worksheet 3 (taxable portion), with worked examples for common scenarios. Topic No. 701 gives a concise summary of eligibility and reporting triggers. For installment sales, Publication 537 and Form 6252 cover the annual reporting requirements. Form 4797 handles the business-use and depreciation recapture portion. Form 8949 and Schedule D are the return-level forms where any taxable gain is reported.

State tax rules vary significantly. Check your state’s department of revenue website for its specific treatment of home-sale gains, as the federal exclusion does not automatically carry over at the state level.

This article provides general information about federal tax rules and is not a substitute for professional tax advice. Consult a qualified CPA or tax attorney to confirm how current IRS rules apply to your specific situation.

Sources