Key Takeaways
- You pay capital gains tax on your profit, not the sale price; many sellers owe $0 thanks to the home sale exclusion: up to $250,000 (single) or $500,000 (married filing jointly).
- To qualify, meet the 2-out-of-5 year ownership and use tests and the “once every 2 years” rule; a partial exclusion may apply for job moves, health, or unforeseen events.
- Maximize your adjusted basis to reduce gain by documenting capital improvements, eligible closing costs, and selling expenses; exclude routine repairs.
- Gains above the exclusion are taxed at capital gains rates (generally 0%, 15%, or 20%); high earners may also owe the 3.8% NIIT if MAGI exceeds $200,000 single/$250,000 MFJ.
- Special cases can trigger tax: rentals/second homes, prior depreciation (up to 25% recapture), mixed use, recent exclusions, and 1031 rules for investments; state taxes vary by state.
- Reporting basics: expect Form 1099-S; file Form 8949 and Schedule D if you have taxable gain (plus Form 4797 for business use and Form 8960 if NIIT applies).
Selling a house feels exciting and a bit scary. One big question pops up fast Do I pay taxes when I sell. I had the same worry and I dug in so you do not have to.
The short answer is maybe. It depends on your profit called capital gains and your situation. Many sellers do not owe tax thanks to an exclusion that can cover up to 250k for single filers or 500k for married filing jointly. Your time in the home your filing status and your state all play a role. In this guide I will break down the basics show simple ways to estimate and flag easy mistakes to avoid.
Do You Pay Taxes When You Sell A House?
I pay tax on the gain, not on the sale price. I exclude up to $250,000 of gain, if I file single. I exclude up to $500,000 of gain, if I file married filing jointly. I meet the ownership and use tests, if I lived in the home for 24 months during the 5 years before the sale. I skip the exclusion, if I claimed it on another home in the 2 years before the sale. I confirm details in IRS Publication 523 and Topic No. 701 (irs.gov).
Key numbers and rules
| Item | Figure | Source |
|---|---|---|
| Home sale exclusion single | $250,000 | IRS Pub 523 |
| Home sale exclusion MFJ | $500,000 | IRS Pub 523 |
| Ownership test | 2 of past 5 years | IRS Pub 523 |
| Use test | 2 of past 5 years | IRS Pub 523 |
| Lookback rule | No exclusion in prior 2 years | IRS Pub 523 |
| Long-term capital gain rates | 0%, 15%, 20% | IRS Topic 409 |
| NIIT on high income | 3.8% | IRC §1411, Form 8960 |
| Depreciation recapture cap | 25% | IRS Pub 544 |
| State taxes | Varies by state | State DOR sites |
When I owe tax
- Owe: I sell a second home or rental property, if the exclusion does not apply to non‑primary homes.
- Owe: I converted a rental to a home, if prior depreciation creates recapture at up to 25%.
- Owe: I exceed the exclusion with a large gain, if the net gain passes $250,000 or $500,000.
- Owe: I cross NIIT thresholds, if my modified AGI triggers the 3.8% surtax.
- Owe: I fail the 2‑in‑5 tests, if I did not both own and use the home long enough.
- Owe: I sell after a recent exclusion, if the lookback rule blocks another claim.
When I often owe nothing
- Avoid tax: I pass ownership and use tests, if my gain falls under the exclusion.
- Avoid tax: I add basis adjustments, if I include capital improvements like a roof, windows, or HVAC.
- Avoid tax: I claim a reduced exclusion, if I sell due to work, health, or unforeseen events per IRS safe harbors.
How I estimate the taxable gain
- Compute: I start with the sale price minus selling costs like commissions and transfer taxes.
- Compute: I subtract adjusted basis, if I include purchase price plus capital improvements minus any depreciation.
- Compute: I apply the exclusion, if the home meets the primary residence rules.
- Compute: I apply long‑term rates, if I owned the home for more than 1 year.
Reporting and forms
- Report: I expect Form 1099‑S from the closing agent, if they report proceeds to the IRS.
- Report: I file Form 8949 and Schedule D, if I have a taxable gain after the exclusion.
- Report: I file Form 4797, if the property had business use or depreciation.
- Report: I file Form 8960, if NIIT applies to my net investment income.
Edge scenarios, with examples
- Mixed use: I prorate the exclusion, if I used part as a home and part as a rental or office, for example a duplex or a home office.
- Nonqualified use: I reduce the exclusion, if I had rental periods after 2008 before I moved in.
- Divorce transfers: I tack on a former spouse’s ownership, if I received the home in a divorce.
- Like‑kind exchanges: I use section 1031 for investments, if I swap a rental or land, not a primary home.
- IRS Publication 523, Selling Your Home, irs.gov
- IRS Topic No. 701, Sale of Your Home, irs.gov
- IRS Publication 544, Sales and Other Dispositions of Assets, irs.gov
- Instructions for Form 8949 and Schedule D, irs.gov
- Form 8960, Net Investment Income Tax, irs.gov
How Capital Gains Tax Works On Home Sales
I pay tax on the gain when I sell a house, after subtracting selling costs and adjusted basis, and after applying any Section 121 exclusion. I compute the rate based on my holding period and my income level, then I apply any NIIT if my modified AGI crosses its threshold. IRS Pub 523, Topic No. 409, IRC §121, NIIT FAQs
Short-Term Vs. Long-Term Gains
I classify the gain by my holding period, which starts the day after purchase and ends on the sale date. I treat gains as short term if held 1 year or less, and as long term if held more than 1 year. Short-term gains get taxed at ordinary income rates, long-term gains get the capital gains rates. Topic No. 409, Pub 544
Capital gains rates by filing status, 2024
| Filing status | 0% up to | 15% over | 15% up to | 20% over |
|---|---|---|---|---|
| Single | $47,025 | $47,025 | $518,900 | $518,900 |
| Married filing jointly | $94,050 | $94,050 | $583,750 | $583,750 |
| Head of household | $63,000 | $63,000 | $551,350 | $551,350 |
| Married filing separately | $47,025 | $47,025 | $291,850 | $291,850 |
I apply Section 121 first, then I apply the rate to any remaining long-term gain. I add 3.8% NIIT to net investment income if my modified AGI crosses the threshold. Rev. Proc. 2023-34, NIIT FAQs
NIIT thresholds, unchanged since 2013
| Filing status | MAGI threshold |
|---|---|
| Single | $200,000 |
| Married filing jointly | $250,000 |
| Head of household | $200,000 |
| Married filing separately | $125,000 |
What Counts As A Capital Improvement
I increase my basis with capital improvements that add value, prolong useful life, or adapt the home to new use. I exclude routine repairs that keep the home in good condition. IRS Pub 523
- Add living space, for example a bedroom, bathroom, finished basement
- Replace major systems, for example roof, HVAC, plumbing, electrical
- Upgrade kitchens and baths, for example cabinets, countertops, fixtures
- Install energy features, for example windows, insulation, solar panels
- Build permanent structures, for example decks, porches, garages, driveways
- Restore after casualty, for example structural repairs after a fire
- Exclude painting, for example interior repaint
- Exclude minor fixes, for example patching drywall, fixing leaks, replacing broken panes
- Exclude maintenance, for example gutter cleaning, servicing HVAC
The Home Sale Exclusion (Section 121)
I use Section 121 to exclude gain on a primary home sale, if I meet the tests in the last 5 years. I follow IRS Publication 523 and IRC Section 121 for the rules.
Eligibility Tests: Ownership And Use
- Meet ownership, own the home for at least 24 months during the 5-year period ending on the sale date per IRS Pub 523.
- Meet use, use the home as my main home for at least 24 months during the same 5-year period per IRS Pub 523.
- Meet frequency, claim the exclusion once every 2 years per IRC Section 121.
- Meet joint rules, claim the $500,000 amount only if either spouse meets ownership and both spouses meet use and neither spouse claimed the exclusion in the prior 2 years per IRS Pub 523.
- Meet service member relief, suspend the 5-year clock for up to 10 years during qualified official extended duty per IRC Section 121(d)(9) and Pub 523.
I count nonconsecutive months for ownership and use, if the total reaches 24 months. I meet the main home test with facts like where I spend most nights, where I vote, and where my mail goes per IRS Pub 523.
Limits For Single Vs. Married Filers
I apply the exclusion limits to gain after subtracting selling costs and adjusted basis, if I qualify under Section 121.
| Filing status | Maximum exclusion | Key conditions |
|---|---|---|
| Single | $250,000 | Own for 24 months, use for 24 months, no exclusion in prior 2 years |
| Married filing jointly | $500,000 | Either spouse owns, both spouses use, neither spouse used exclusion in prior 2 years |
| Married filing separately | $250,000 | Spouse meets own ownership, use, frequency tests |
| Head of household | $250,000 | Own for 24 months, use for 24 months, no exclusion in prior 2 years |
Source: IRC Section 121, IRS Publication 523.
Partial Exclusion For Unforeseen Circumstances
I claim a prorated exclusion when I sell before meeting 24 months, if the primary reason fits IRS safe harbors per Treas. Reg. §1.121-3 and Pub 523.
- Qualify health, move to obtain, provide, or facilitate care for a disease, illness, or injury.
- Qualify employment, move due to a change in place of employment that increases the distance by at least 50 miles.
- Qualify unforeseen circumstances, include events like divorce or legal separation, death, casualty, natural disaster, multiple births from the same pregnancy, involuntary conversion, job loss with eligibility for unemployment compensation.
I compute the partial exclusion as Maximum exclusion × (qualifying months ÷ 24), if I meet a safe harbor or the facts and circumstances test.
Example:
- Facts, I owned and used the home for 12 months, I moved for a job 60 miles away.
- Math, $250,000 × 12 ÷ 24 = $125,000 exclusion for Single, $500,000 × 12 ÷ 24 = $250,000 for Married filing jointly.
Source: Treas. Reg. §1.121-3, IRS Publication 523.
Calculating Your Gain
I calculate home sale gain in three steps. I find amount realized, subtract selling costs, then subtract adjusted basis.
Adjusted Cost Basis And Selling Costs
I build adjusted basis from documented costs. I start with purchase price from the closing disclosure. I add buyer closing costs that increase basis like title insurance owner policy, recording fees, and transfer taxes, per IRS Pub 523. I add capital improvements that add value or extend life like a new roof, room addition, HVAC replacement, window upgrades, solar panels, and foundation work, per IRS Pub 523. I subtract depreciation taken for a prior rental period or a home office area, per IRS Pub 523 and Pub 527. I track casualty loss adjustments, energy credits, and insurance payouts if any.
I compute amount realized from the contract. I start with gross sales price. I subtract seller selling costs like real estate commissions, escrow fees, title charges, transfer taxes, recording fees, attorney fees, staging, advertising, and seller paid buyer credits, per IRS Pub 523. I exclude routine repairs like paint and lawn care since those do not increase basis, per IRS Pub 523.
I apply the Section 121 exclusion after I compute gain. I exclude up to $250,000 if single or up to $500,000 if married filing jointly when I meet the ownership and use tests, per IRC §121 and IRS Pub 523.
Example numbers for one home sale
| Item | Amount |
|---|---|
| Purchase price | $300,000 |
| Basis increases capital improvements | $40,000 |
| Basis increases eligible closing costs | $3,000 |
| Basis decreases depreciation recapture | $0 |
| Adjusted basis subtotal | $343,000 |
| Gross sales price | $500,000 |
| Selling costs commissions plus fees | $30,000 |
| Amount realized subtotal | $470,000 |
| Realized gain before exclusion | $127,000 |
| Section 121 exclusion applied | $127,000 |
| Taxable gain after exclusion | $0 |
I keep receipts, permits, and contracts as proof, per IRS Pub 523.
Sources IRS Publication 523 Selling Your Home IRS Publication 527 Residential Rental Property
Net Investment Income Tax And Income Thresholds
I check the 3.8% Net Investment Income Tax on home sale gain. I apply NIIT to the lesser of net investment income or the excess of modified adjusted gross income over the filing threshold, per IRC §1411 and Form 8960 instructions. I treat taxable home sale gain as net investment income after I apply any Section 121 exclusion, per Form 8960 instructions. I exclude any gain that I exclude under Section 121 from both AGI and NIIT, per IRS Pub 523 and Form 8960 instructions.
2024 NIIT thresholds and rate
| Filing status | MAGI threshold | NIIT rate |
|---|---|---|
| Single | $200,000 | 3.8% |
| Head of household | $200,000 | 3.8% |
| Married filing jointly | $250,000 | 3.8% |
| Married filing separately | $125,000 | 3.8% |
I run a quick NIIT screen with an example. I assume married filing jointly MAGI of $290,000 after the sale. I assume $60,000 of taxable home sale gain after exclusion. I compute excess MAGI of $40,000 over the $250,000 threshold. I apply NIIT to the lesser amount of $40,000 or $60,000 so $40,000. I compute NIIT of $1,520.
Special Situations
I apply different tax rules when I sell a house in special cases. I check basis, timelines, and exclusions before I report the sale.
Selling An Inherited Or Gifted Home
I start with basis and holding period for inherited or gifted homes.
- Basis rules
- Inherit: I use fair market value at date of death for basis if I inherit the home. I get long term treatment regardless of how long I hold it if I inherit per IRC 1014 and IRS Pub 523.
- Gift: I use carryover basis from the donor if I receive a gift. I adjust for gift tax on net appreciation if any per IRC 1015 and IRS Pub 551.
- Dual basis: I use special loss rules if fair market value at gift date is below donor basis. I use FMV for loss and donor basis for gain per IRS Pub 551.
- Exclusion coordination
- Live: I claim the Section 121 exclusion if I own and use the inherited or gifted home as my main home for 24 months in the past 5 years per IRS Pub 523.
- Estate sale: I report no personal gain if the estate sells before I receive title. The estate reports any tax per IRS Pub 559.
- Reporting
- File: I use Form 8949 and Schedule D if I report gain. I keep probate documents, appraisals, and gift tax returns as records.
Numbers and thresholds
| Topic | Key figure | Source |
|---|---|---|
| Inherited basis | FMV at death | IRC 1014, IRS Pub 523 |
| Gifted basis | Carryover basis | IRC 1015, IRS Pub 551 |
| Gift tax add to basis | Portion on net appreciation | IRS Pub 551 |
| Inherited holding period | Always long term | IRS Pub 523 |
Example
I inherit a home with FMV 500,000 and sell for 520,000 with 20,000 selling costs. My gain equals 0 because 520,000 minus 20,000 minus 500,000 equals 0.
Divorce, Military, And Work-Related Moves
I align the home sale exclusion with divorce decrees, military orders, and job changes.
- Divorce rules
- Transfer: I recognize no gain on transfers to a spouse or former spouse incident to divorce per IRC 1041 and IRS Pub 523.
- Tacking: I count my former spouse use for the use test if my former spouse lives in the home under a divorce decree. I count my ownership through a trust or entity if applicable per IRS Pub 523.
- Filing status: I claim up to 500,000 if I file jointly. I claim up to 250,000 if I file single per Section 121.
- Military and certain federal service
- Suspend: I suspend the 5 year lookback for up to 10 years if I serve on qualified official extended duty per IRC 121 and IRS Pub 523.
- Duty area: I meet the rule if my duty location is at least 50 miles from the home or I live in government quarters per IRS Pub 523.
- Work related and other partial exclusions
- Claim: I claim a partial exclusion for unforeseen circumstances if a change in employment, health, or other IRS safe harbor applies. I show a new job location at least 50 miles farther as a work change example per IRS Pub 523.
- Compute: I multiply the maximum exclusion by the fraction of 24 months I met the tests.
Key figures
| Situation | Figure | Source |
|---|---|---|
| Joint exclusion | 500,000 | IRC 121, IRS Pub 523 |
| Single exclusion | 250,000 | IRC 121, IRS Pub 523 |
| Military suspension | Up to 10 years | IRC 121(d)(9), IRS Pub 523 |
| Work move distance | 50 miles | IRS Pub 523 |
Example
I meet 12 months of the 24 month tests and I move for a job 80 miles farther. I exclude up to 125,000 if single because 12 divided by 24 times 250,000 equals 125,000.
Investment Property And The 1031 Exchange
I treat rentals and second homes as investments for capital gains and depreciation recapture. I use like kind exchanges under Section 1031 for investment real property.
- Depreciation recapture
- Recapture: I pay up to 25 percent on unrecaptured Section 1250 gain when I sell a depreciated rental per IRC 1250 and IRS Pub 544.
- Basis: I reduce basis by depreciation allowed or allowable. I track Form 4562 and Schedule E records.
- 1031 exchange mechanics
- Qualify: I exchange real property held for investment or business use for like kind real property. I exclude a main home from 1031 per IRC 1031 and IRS Pub 544.
- Intermediary: I use a qualified intermediary to hold proceeds. I avoid constructive receipt.
- Timelines: I identify replacement properties in 45 days and I close within 180 days or by the return due date if earlier per IRS Pub 544.
- Boot: I recognize gain to the extent of cash or debt relief I receive as boot.
- Mixed use and Section 121 combo
- Split: I allocate price and basis between personal and rental parts for a duplex or home with an accessory unit. I apply Section 121 to the residence part and 1031 or capital gain rules to the rental part.
- Convert: I combine Section 121 with 1031 for a former main home later used as a rental if I meet Rev Proc 2005-14 coordination.
1031 timelines and rates
| Topic | Figure | Source |
|---|---|---|
| Identify window | 45 days | IRS Pub 544 |
| Exchange window | 180 days | IRS Pub 544 |
| Unrecaptured 1250 rate cap | 25 percent | IRC 1250, IRS Pub 544 |
Example
I sell a rental for 600,000 with 200,000 gain and 60,000 unrecaptured 1250 gain. I exchange into a 650,000 replacement within 45 and 180 day limits. I defer 140,000 of capital gain and I carry over basis. I still owe tax on any boot if I receive cash.
State And Local Taxes To Consider
I watch state and local rules because they change the bottom line when I sell a house. I track transfer taxes, property tax credits, and state capital gains rules.
Transfer Taxes And Property Tax Proration
I confirm deed transfer taxes and recording taxes at the city or county level. I match the rate to the contract price and the local statute.
- Confirm transfer tax rate and payer by jurisdiction and contract
- Confirm property class and any surcharges for high value sales
- Confirm documentary stamp or deed tax based on consideration
- Confirm recording fees and mortgage tax if a lien payoff triggers it
I use these reference points for common markets.
| Jurisdiction | Tax Type | Rate or Rule | Source |
|---|---|---|---|
| District of Columbia | Deed transfer tax | 1.1% under $400,000 and 1.45% at $400,000 or more for Class 1 residential | DC Office of Tax and Revenue |
| Florida | Documentary stamp tax on deeds | $0.70 per $100 of consideration. Miami-Dade uses $0.60 per $100 for single-family and a surtax for others | Florida Dept. of Revenue |
| New York State | Mansion tax | 1% at $1,000,000 or more statewide. Higher tiers up to 3.9% for NYC high-value sales | NY Dept. of Taxation and Finance |
| California | Documentary transfer tax | $1.10 per $1,000 at county level. Cities may add local rates | California Rev and Tax Code §11911 |
| New Jersey | Realty transfer fee | Progressive schedule by price and property type | NJ Division of Taxation |
Sources: otr.cfo.dc.gov, floridarevenue.com, tax.ny.gov, leginfo.legislature.ca.gov, nj.gov/treasury/taxation
I also factor property tax proration. I credit or debit the buyer based on the closing date and the local billing cycle.
- Check if taxes bill in arrears for the prior calendar year
- Check the fiscal year dates and installment due dates
- Check exemptions like homestead and any clawback rules
- Check special assessments that pass with the property
Examples:
- California uses a July 1 to June 30 fiscal year with installments due in December and April. Source: California State Board of Equalization.
- Texas posts the annual bill in October and the payment deadline is January 31 of the following year. Source: Texas Comptroller of Public Accounts.
State Capital Gains Rules
I align state income tax with the federal home sale exclusion because most states conform to IRC §121.
- Verify conformity to the two-out-of-five exclusion by state statute
- Verify state filing thresholds and residency rules for part-year movers
- Verify depreciation recapture for prior rental use on the state return
- Verify 1031 exchange conformity for any replacement property plan
Key differences by state.
| State or Jurisdiction | Capital Gains Treatment on Home Sale | Notes | Source |
|---|---|---|---|
| California | Taxed as ordinary income after federal exclusion | State follows §121. No special rate | California FTB |
| New York | Taxed as ordinary income after federal exclusion | Mansion tax is separate at closing | NY Dept. of Taxation and Finance |
| Massachusetts | Taxed as income after federal exclusion | State conforms to §121 | Mass. Dept. of Revenue |
| Pennsylvania | Taxed as income after federal exclusion | State does not recognize 1031 exchanges for PIT | PA Dept. of Revenue |
| Washington | No state income tax on real estate gains | State capital gains tax excludes real estate | WA Dept. of Revenue |
| Florida | No state income tax | Only documentary stamp tax at deed | Florida Dept. of Revenue |
| Texas | No state income tax | Property taxes still prorate | Texas Comptroller |
Sources: ftb.ca.gov, tax.ny.gov, mass.gov/dor, revenue.pa.gov, dor.wa.gov, floridarevenue.com, comptroller.texas.gov
I model state tax by applying the federal exclusion first and then using the state rules. I add NIIT only if my federal MAGI crosses the federal thresholds. I then add any local transfer tax from the closing statement.
Reporting, Deadlines, And Records
I report a home sale accurately, then I track dates and keep records that support my basis and any exclusion. I match my forms to how I sell a house, then I keep proof in case the IRS asks.
IRS Forms You May Need
- Use Form 8949 and Schedule D to report capital gain or loss from a home sale, then I apply the Section 121 exclusion if I qualify, per IRS Pub 523 and Pub 544.
- Use Form 1099-S as the information return for gross proceeds, then I confirm the figures match my Closing Disclosure or HUD-1, per Form 1099-S Instructions.
- Use Form 8960 to compute Net Investment Income Tax when my modified AGI exceeds the NIIT threshold and I have taxable home sale gain, per Form 8960 Instructions.
- Use Form 4797 to report the business or rental portion of a mixed-use property and any depreciation recapture, per Pub 544.
- Use Form 6252 to report an installment sale when I receive payments over time and interest, per Pub 537.
- Use Form 4868 to request an automatic filing extension to Oct 15, then I pay any expected tax by Apr 15 to avoid penalties, per Form 4868 Instructions.
- Use Pub 523’s worksheet to document adjusted basis, selling costs, and exclusion, then I retain it with my return, per Pub 523.
- Use the Form 1040 instructions to see where Schedule D totals flow, then I align entries with my e-file or paper return, per 1040 Instructions.
How Long To Keep Documentation
I keep documents that prove what I paid, what I improved, and what I excluded when I pay taxes after I sell a house. I retain basis records for as long as I own the home and for 3 years after I file the return that reports the sale, per IRS Pub 523 and Pub 552.
Key dates and retention periods
| Item | Date or Period | Source |
|---|---|---|
| Individual tax return due date | Apr 15 | Form 1040 Instructions |
| Filing extension deadline | Oct 15 | Form 4868 Instructions |
| Estimated tax due dates | Apr 15, Jun 15, Sep 15, Jan 15 | Pub 505 |
| Form 1099-S furnished to seller | Feb 15 | Form 1099-S Instructions |
| General record retention after filing | 3 years | Pub 552 |
| Basis records for home improvements and purchase | Ownership period + 3 years after sale return | Pub 523 |
| Records if income omission exceeds 25% | 6 years | Pub 552 |
I keep these records for a home sale, with examples in parentheses:
- Keep closing documents, including the Closing Disclosure or HUD-1, payoff letter, and Form 1099-S.
- Keep basis proof, including purchase contract, wire confirmations, title and recording fees, and transfer taxes.
- Keep capital improvement receipts, including invoices, permits, and before-and-after photos for roofs, additions, windows, HVAC.
- Keep depreciation schedules for any rental or home office use, including Form 4562 and prior-year returns.
- Keep real estate broker agreements and invoices, including commission statements and staging or photography bills.
- Keep property tax and assessment records, including special assessments tied to improvements.
- Keep worksheets from Pub 523 and spreadsheets that show adjusted basis, selling costs, and the Section 121 exclusion.
I align records with the taxes I report on capital gains, then I archive them for the full period of limitations, per Pub 523, Pub 544, Pub 552, and related form instructions.
Strategies To Reduce Or Defer Taxes
I use timing, loss offsets, and basis management to reduce or defer taxes when I sell a house. I match these moves to the Section 121 exclusion and my broader income picture.
Timing The Sale And Harvesting Losses
- Align the closing date with a low income year to stay under NIIT thresholds or lower capital gain brackets, if my other income drops or I control bonus timing (IRC §1411, IRS Pub 505).
- Hold the property for more than 1 year to get long-term capital gain rates, if my facts allow a later sale date (IRS Topic No. 409).
- Stack deductible items like charitable gifts or prepay state taxes in the same year to keep taxable income in a lower capital gain bracket, if state deduction limits and AMT do not negate the benefit.
- Offset the taxable piece of my home gain with capital losses from investments like ETFs, mutual funds, or stocks, if my loss harvesting does not trigger wash sale rules on those securities (IRS Pub 550).
- Split large transactions across tax years by selling investments in a different year than the house, if my timing control creates separate reporting periods.
| Rule or window | Amount or period | Source |
|---|---|---|
| Ownership and use tests | 24 months in 5 years | IRS Pub 523 |
| NIIT income thresholds | $200,000 single, $250,000 MFJ, $125,000 MFS | IRC §1411 |
| Long-term rate holding period | > 1 year | IRS Topic No. 409 |
| Annual capital loss ordinary offset | Up to $3,000 | IRS Pub 550 |
Maximizing Basis With Improvements
- Add capital improvements that add value, prolong life, or adapt the home for new uses like roof replacement, HVAC systems, room additions, kitchen remodels, solar panels, if the work is not routine maintenance (IRS Pub 523, IRS Pub 551).
- Include acquisition and selling costs in basis like title insurance, transfer taxes, recording fees, commissions, if those costs are directly tied to the purchase or sale (IRS Pub 523).
- Track assessments that improve property like new sidewalks or sewer lines, if the city assessment creates a lasting improvement (IRS Pub 523).
- Reduce basis by any energy credits or rebates tied to improvements like residential clean energy credits, if I claimed those credits on my return (IRC §25D).
- Preserve receipts, contracts, permits, photos for each project like invoices, canceled checks, change orders, if I want substantiation during an IRS review.
- Reconcile depreciation on prior rental or home office use, if I claimed depreciation that now reduces basis and triggers possible Section 1250 recapture up to 25% on that portion (IRS Pub 527, IRS Topic No. 409).
Conclusion
Selling a home can feel like a maze. My best advice is to slow down. map your numbers. and plan your timing. A little prep can make a big difference.
I always start by gathering every record I can find. Then I sketch a simple worksheet for costs. improvements. and the likely gain. That keeps me honest and calm when I get to filing time.
If your situation is unique. do not guess. A quick chat with a tax pro can save you stress and money. And if you are still exploring. bookmark this guide. Use it as your playbook so you can sell with clarity and confidence.
Frequently Asked Questions
Do I owe taxes when I sell my house?
Maybe. Many sellers owe no federal tax due to the home sale exclusion (Section 121): up to $250,000 of gain if single or $500,000 if married filing jointly, if you meet the ownership and use tests. If your gain exceeds the exclusion, you may owe capital gains tax and possibly the NIIT. State taxes may also apply.
What is the home sale exclusion (Section 121)?
It lets qualifying homeowners exclude up to $250,000 (single) or $500,000 (married filing jointly) of gain. You generally must own and use the home as your primary residence for at least 24 months within the 5 years before the sale and haven’t used the exclusion in the past two years.
How do I calculate taxable gain on a home sale?
Start with the sale price. Subtract selling costs (agent commissions, transfer taxes, legal fees). Then subtract your adjusted basis (purchase price + closing costs + capital improvements − depreciation). The result is your gain. Apply the Section 121 exclusion if eligible. Any remaining gain may be taxed.
What counts as a capital improvement to increase basis?
Improvements that add value, extend life, or adapt the home (e.g., new roof, room addition, HVAC, kitchen remodel, windows, permanent landscaping). Routine repairs and maintenance (paint, minor fixes) don’t increase basis unless part of a larger improvement project. Keep invoices, contracts, and proof of payment.
What’s the difference between short-term and long-term capital gains?
Short-term gains apply if you owned the property for one year or less and are taxed at ordinary income rates. Long-term gains apply if you owned it more than one year and are taxed at favorable capital gains rates. Most home sales qualify as long-term if held over a year.
Can I claim a partial exclusion?
Yes. If you sell due to unforeseen circumstances—like a job move, health issues, or certain hardships—you may get a prorated exclusion based on how long you met the tests. Documentation is key. The IRS defines qualifying reasons in Publication 523.
Do second homes or rental properties qualify for the exclusion?
No, the Section 121 exclusion applies only to a primary residence. Rental or vacation homes don’t qualify unless you convert them to your primary home and meet the ownership and use tests. Expect depreciation recapture and capital gains on rentals.
What is the Net Investment Income Tax (NIIT)?
It’s a 3.8% surtax on net investment income (including taxable home sale gains) for high earners. It applies if your modified AGI exceeds thresholds (e.g., $200,000 single, $250,000 married filing jointly). It applies only to the portion of gain that isn’t excluded by Section 121.
How are inherited and gifted homes taxed?
Inherited homes generally get a step-up in basis to fair market value at the date of death, which can reduce taxable gain on sale. Gifted homes use the donor’s carryover basis (with some adjustments). The Section 121 exclusion applies only if the home is your primary residence.
How do divorce or military service affect the exclusion?
Divorce: Ex-spouses may count prior use for the exclusion; special rules apply if one spouse remains in the home per a divorce decree. Military/Foreign Service: You may suspend the 5-year use period for up to 10 years while on qualified extended duty, easing the ownership/use tests.
What forms do I need to report a home sale?
You may receive Form 1099-S at closing. Report the sale on Form 8949 and Schedule D if you have a taxable gain, a non-qualifying sale, or you received 1099-S. Keep closing statements (HUD-1/CD), proof of basis, and improvement records. Some fully excluded sales may not need reporting.
How do state and local taxes impact a home sale?
States may tax capital gains after applying federal rules, though rates and conformity vary. You might owe transfer taxes, local conveyance fees, and prorated property taxes at closing. Always check your state’s residency rules, exclusion conformity, and filing requirements.
Can I defer taxes with a 1031 exchange?
Yes, but only for investment or business property, not a primary residence. A properly structured like-kind exchange defers capital gains and depreciation recapture. Strict timelines and qualified intermediaries are required. You cannot use 1031 on your main home’s gain.
What records should I keep, and for how long?
Keep purchase documents, closing statements, Form 1099-S, proof of selling costs, improvement receipts, permits, contracts, and depreciation records (if rented). Retain at least three years after filing the return for the sale year; keep basis and improvement records for as long as you own the home plus that period.
Are there strategies to reduce or defer home sale taxes?
Yes: time the sale for a low-income year, maximize basis with documented capital improvements, meet the 24-month ownership/use tests, harvest capital losses, and manage income to stay within favorable capital gains brackets. Consider NIIT thresholds and state taxes. Plan early to optimize eligibility and documentation.
