Capital Gains Tax on Selling a House: 2026–2027 $250,000/$500,000 Exclusion, Basis Rules & Net Proceeds Calculator
Interactive 2026–2027 Home Sale Capital Gains, §121 Exclusion, §1250 & NIIT Calculator
Calculator Overview: Basic calculators subtract purchase price from sale price while ignoring selling commissions, capital improvements, 25% IRC §1250 depreciation recapture, and the 3.8% NIIT surtax. Enter filing status, §121 eligibility, sale price, basis plus improvements/fees, prior depreciation, and other taxable income to compute exact 2027 home sale taxes.
| Total Realized Gain (Incl. §1250 Basis Adjustment) | $565,000 |
| IRC §121 Primary Residence Exclusion Applied | -$500,000 |
| Taxable Gain (LTCG + §1250 Depreciation) | $65,000 |
| Federal LTCG (0%/15%/20%) + 25% §1250 Tax | $9,750 |
| 3.8% Net Investment Income Tax (Form 8960) | $494 |
| Total Federal Tax Owed on Home Sale | $10,244 |
Adjusted Basis Rule: Per IRS Pub 523, Realtor commissions, transfer taxes, title fees, and capital improvements (roof, HVAC, additions—not routine repairs) reduce realized gain before your $250k/$500k exclusion.
IRC Section 121 Home Sale Tax Exclusion & 2026–2027 Capital Gains Brackets
Congress repealed the old “replacement home rollover” rule in 1997—buying another house does not defer tax gains on a house sale when selling a personal residence. Instead, IRC Section 121 (IRS Topic No. 701) excludes up to $250,000 of real estate gains tax for Single, Head of Household, or Married Filing Separately filers and $500,000 for Married Filing Jointly couples when three rules are met within the 5 years before closing: (1) at least one spouse owned the home for 24 months (730 days), (2) both spouses occupied it as their primary residence for 24 cumulative months, and (3) neither spouse used §121 on another sale within the prior 2 years.
Un-remarried surviving spouses keep the $500,000 exclusion if selling within 2 years of a spouse's death (alongside a 50% or 100% community-property §1014 basis step-up). Any non-excluded gain is taxed under IRS Rev. Proc. 2025-32 (2026) and Rev. Proc. 2026-35 (2027).
| Rate Tier / Surtax | 2026 Single / MFJ Cutoff | 2027 Single / MFJ Cutoff | Statutory Application |
|---|---|---|---|
| 0% Long-Term Capital Gains | ≤$49,450 S / ≤$98,900 MFJ | ≤$51,050 S / ≤$102,100 MFJ | Held >12 months inside 0% band |
| 15% Long-Term Capital Gains | Up to $545,500 S / $613,700 MFJ | Up to $563,200 S / $633,600 MFJ | Standard tier for over-cap sellers |
| 20% Long-Term Capital Gains | >$545,500 S / >$613,700 MFJ | >$563,200 S / >$633,600 MFJ | Top statutory LTCG bracket |
| 3.8% Net Investment Income Tax | >$200,000 S / >$250,000 MFJ | >$200,000 S / >$250,000 MFJ | Unindexed MAGI cliff (Form 8960) |
| Unrecaptured §1250 Depreciation | Up to 25% Maximum Rate | Up to 25% Maximum Rate | Post-May 6, 1997 rental/office write-offs |
| Short-Term Gain (≤12 Months) | 10%–37% Ordinary Rates | 10%–37% Ordinary Rates | Flips failing §121 safe harbors |
Selling early due to a 50+ mile job relocation, physician-documented health need, or IRS unforeseen circumstance (divorce, death, twin births, job loss) unlocks a prorated partial exclusion under IRS Publication 523: (Months Qualified ÷ 24) × $250,000 or $500,000 (e.g., 12 months yields $125,000 Single / $250,000 Joint).
The 2026–2027 Domino Effect: How Non-Excluded Gains Trigger NIIT, IRMAA & Senior Deduction Loss
While excluded §121 profit never enters Adjusted Gross Income, every dollar of taxable house gain tax above the cap—or from rental conversions and missing improvement receipts—triggers a four-step federal tax cascade.
Step 1 Non-Qualified Rental Proration & §1250 Recapture: Under IRC §121(b)(5), moving into a former rental prorates gain between post-2008 “non-qualified” rental years (ineligible for §121) and main-home years, while recapturing prior depreciation up to 25%. Step 2 Unindexed 3.8% NIIT Cliff: Per IRS Topic No. 559, a $200,000 taxable gain atop $150,000 joint wages pushes $100,000 past the unindexed $250,000 MFJ threshold, adding $3,800 on Form 8960 (18.8%–23.8% combined federal rate). Step 3 Two-Year Medicare IRMAA Spike: For sellers age 63+, a one-time taxable gain inflates Medicare's 2-year MAGI lookback, jumping 2027 Part B + D premiums from $209.40/mo up to $808.20/mo per spouse—up to $14,371 for a couple because home sales do not qualify for Form SSA-44 relief. Step 4 Senior Deduction Phaseout: The $6,000 per-person age-65+ deduction shrinks by 6% above $75,000 Single / $150,000 Joint MAGI, erasing up to $12,000 in deductions.
| Seller Fact Pattern | Taxable Gain | LTCG + §1250 + NIIT | IRMAA / Deduction Hit |
|---|---|---|---|
| Documented $95k Remodel + $57k Closing (MFJ §121) | $0 | $0 | $0 — Excluded from MAGI |
| Missing Remodel Receipts ($57k Fees Only, MFJ §121) | $93,000 | $13,950 (15% LTCG) | -$3,974 deduction/IRMAA |
| Single Seller With Same $593k Gain ($250k Cap) | $343,000 | $62,994 (15% + $11,514 NIIT) | -$6,936 Part B/D IRMAA |
| Former Rental (3 Yrs Rent / 2 Yrs Main, $45k Dep.) | $378,800 | $67,958 (25% §1250 + LTCG + NIIT) | -$11,489 Joint IRMAA |
If you receive Form 1099-S at closing, report the sale on Form 8949 and Schedule D (code “H” in Column (f)) even if 100% of your gain is excluded.
IRS Publication 523 Cost Basis Checklist & State Capital Gains Rules
Every documented $10,000 addition to cost basis saves $1,500–$2,380 in federal tax plus up to 13.3% state tax above the §121 cap. Under IRS Publication 523, adjusted basis includes purchase price, buyer title/transfer/recording fees, seller Realtor commissions, and permanent capital improvements—minus residential clean energy credits (Form 5695, such as the 30% solar credit) or casualty write-offs.
Nine no-income-tax states (FL, TX, NV, TN, etc.) and Washington State (which exempts real estate from its 7%–9.9% capital gains excise) charge 0% state tax, whereas California (up to 13.3%), New York, New Jersey, and Oregon tax non-excluded gains at ordinary state rates.
| Expense / Tax Item | Increases Basis? | Statutory Rule | Impact per $20,000 |
|---|---|---|---|
| Addition, Roof, HVAC, Kitchen Remodel | Yes — 100% | Permanent upgrade (retain contractor invoices) | Saves $3,760–$4,760 fed |
| Realtor Commissions, Title & Transfer Tax | Yes — Cuts Gain | Subtracted from Amount Realized | Saves $3,760–$4,760 fed |
| Solar System After 30% Federal Credit | 70% Net Only | IRC §25D reduces basis by credit claimed | -$6,000 basis reduction |
| Painting, Staging, Repairs, Loan Payoff | No — Disallowed | Routine maintenance & debt never cut gain | $0 tax reduction |
| CA / NY / NJ / OR State Home Gain Tax | Ordinary Income | States generally follow federal $250k/$500k §121 | +$1,000–$2,660 state tax |
Retain purchase and sale Closing Disclosures, permits, and itemized contractor invoices for at least 3 years after filing; credit card statements without scope descriptions routinely fail IRS basis audits.
Frequently Asked Questions
How do I avoid capital gains tax on selling a house in 2026 or 2027?
Own and occupy the home as your main residence for at least 24 months within the 5 years before closing to exclude $250,000 Single or $500,000 Married Filing Jointly under IRC §121, document all Pub 523 improvements and closing commissions, or use an IRC §1031 exchange on investment rentals.
How much capital gains tax do you pay on a $300,000 house profit?
Married joint filers meeting the 2-of-5-year test owe $0 ($500,000 cap). Qualifying single filers exclude $250,000 and owe 15% federal tax ($7,500) on the remaining $50,000, plus $1,900 NIIT if MAGI exceeds $200,000.
Does paying off my mortgage or buying another house avoid capital gains tax?
No. Mortgage payoff amounts never affect taxable gain—only sale price minus selling fees and adjusted cost basis counts—and the replacement-home rollover rule ended in 1997.
At what point must I report a home sale on Form 8949 and Schedule D?
File Form 8949 and Schedule D whenever gain exceeds your $250k/$500k exclusion, whenever you owe §1250 depreciation recapture, or whenever Form 1099-S is issued at closing.
Official Statutory & Agency Sources
- IRS Topic No. 701 — Sale of Your Home ($250,000 / $500,000 Exclusion)
- IRS Publication 523 — Selling Your Home (Basis & Partial Exclusion)
- IRS Topic No. 559 — 3.8% Net Investment Income Tax (Form 8960)
- IRS Revenue Procedure 2026-35 & Rev. Proc. 2025-32 — 2027 Capital Gains Thresholds
Last verified against primary federal and state statutory schedules on .