They Sold the Family Home for a $700,000 Gain. The IRS Only Ever Saw $200,000 of It

The IRS built a massive tax shelter directly into the home sale rules, and most homeowners walk past it without a second glance. Knowing exactly how it works, and where it breaks down, can mean the difference between a five-figure…

Published July 29, 2026, 8:34pm ET · 4 min read

This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.

A family of four, seen from behind, stands in a lush green lawn on a bright, sunny day, looking towards a modern house. A man and woman embrace two children—a boy standing next to the man and a small girl being held by the woman. To the right, a red and yellow 'HOUSE FOR SALE SOLD' sign is prominently displayed in the foreground.
A family embraces in front of their recently sold home, symbolizing the financial opportunities available through property transactions. The Section 121 exclusion can offer significant tax-free gains for homeowners. © Mikolette / E+ via Getty Images

If you own a home you’ve lived in for a few years, the IRS is quietly offering you one of the biggest tax-free windfalls in the entire tax code. When a married couple sells the family house for a $700,000 gain, they can legally erase $500,000 of it before the IRS ever sees a dollar. Only $200,000 shows up as taxable income. This is the Section 121 home sale exclusion, and it applies to your primary residence. Not a rental, not a flip.

With the S&P Cotality Case-Shiller National Home Price Index sitting at 335.10 in May 2026 and the median existing-home sale price reaching $440,600 in June 2026 (up 1.8% year-over-year, marking the 36th consecutive month of price increases), gains this size are no longer a coastal fantasy. They are landing on kitchen tables across the country.

The Buried Rule in Plain English

When you sell your primary residence, Section 121 lets you exclude up to $250,000 of capital gain if you’re single, and up to $500,000 if you’re married filing jointly. The gain is your sale price minus your cost basis (what you paid, plus qualifying improvements, minus selling costs). Everything under the cap is invisible to the IRS. Everything above it gets taxed at long-term capital gains rates, typically 0%, 15%, or 20% depending on your income.

So a married couple with a $700,000 gain reports the sale, subtracts the $500,000 exclusion, and arrives at $200,000 of taxable long-term gain. That is the whole trick.

The Statute That Makes It Real

The authority is 26 U.S. Code §121, enacted by the Taxpayer Relief Act of 1997. IRS Publication 523 (Selling Your Home) walks through the mechanics. Congress set the $250,000 and $500,000 thresholds in 1997 and never indexed them for inflation. With the Consumer Price Index up 3.5% year-over-year as of June 2026, the real purchasing power of those caps has eroded considerably since the rule first took effect, which is exactly why more sellers each year bump into the ceiling.

The gap between frozen thresholds and rising prices has drawn attention on Capitol Hill. The More Homes on the Market Act (H.R. 1340), introduced by Rep. Jimmy Panetta in February 2025, would double the exclusion limits to $500,000 for single filers and $1 million for married couples, then index both to inflation going forward. A separate measure, the No Tax on Home Sales Act (H.R. 4327), introduced by Rep. Marjorie Taylor Greene in July 2025, would eliminate the dollar caps entirely for qualifying homeowners. Neither bill has been enacted as of this writing, so the 1997 limits remain in force.

Who Qualifies, and Who Doesn’t

To claim the full exclusion, you must pass two tests during the five-year period ending on the sale date:

  • Ownership test: You owned the home for at least 24 months.
  • Use test: You lived in it as your main home for at least 24 months (the months don’t have to be consecutive).

For the $500,000 married cap, either spouse can satisfy the ownership test, but both must meet the use test, and neither can have claimed the exclusion on another sale in the prior two years. Vacation homes, pure investment properties, and houses you’ve owned less than two years generally don’t qualify. Time the property spent as a rental after 2008 can also reduce the exclusion under the “non-qualified use” rules.

How to Actually Use It

  1. Rebuild your basis. Start with your purchase price. Add closing costs you paid, plus every capital improvement: new roof, kitchen remodel, addition, HVAC replacement. Routine repairs don’t count. A higher basis means a smaller taxable gain.
  2. Confirm the 2-of-5 clock. Pull your prior tax returns and utility records if needed. The months you lived in the home as your main residence are what matter, and they don’t have to be consecutive.
  3. Run the math before you list. If your projected gain is $520,000 and you’re married, waiting a few months to cross the 24-month use test can save five figures in tax. The arithmetic is worth doing early.
  4. Report it on Form 8949 and Schedule D only if the gain exceeds the exclusion or you received a Form 1099-S. If neither applies, you generally don’t have to report the sale at all.
  5. Apply the exclusion, then tax the rest at long-term capital gains rates (0%, 15%, or 20%), plus the 3.8% Net Investment Income Tax if your modified AGI crosses the relevant threshold.

The Catch Most Sellers Miss

You can only claim the full Section 121 exclusion once every two years. Sell two homes inside a 24-month window and the second sale gets no exclusion, unless the move was forced by a job change of at least 50 miles, a health reason, or an unforeseen circumstance defined in the regulations. In those cases, a prorated exclusion may apply.

The other trap is the frozen cap. The $250,000 and $500,000 limits are not inflation-adjusted, and they haven’t moved a dollar since 1997. With existing home sales running at a 4.09 million annualized pace in June 2026 and the median price setting a record at $440,600, more sellers are clearing the ceiling every quarter. If your projected gain is anywhere near the cap, document every improvement you made to the property. Each qualifying dollar added to your basis is a dollar the IRS never touches.

Editor’s note: This update adds the June 2026 median existing-home price of $440,600 and the 36th consecutive month of year-over-year price increases, replaces the specific CPI index figure with the confirmed year-over-year rate of 3.5% from the Bureau of Labor Statistics, and adds context on two pending bills in the 119th Congress that would raise or eliminate the Section 121 exclusion caps.

Contact [email protected] for any questions or corrections.

Michael Williams

I am a long time investor and student of business, and believe finding good companies that can become great investments is the best game on earth. After 20 years of writing and researching the public markets it is clear that individuals have never had more tools and information to take control of their financial lives. From ETFs and $0 commissions to cryptos and prediction markets there has never been a greater democratization of access to investing. 

I write to help people understand the investments available to them so they can make the best choice for their portfolio, whether they're starting out or looking for income in retirement. 

All articles →