Updated October 2026. Special cases of the home sale exclusion (early sales, surviving spouses, divorce, military, rentals and home offices), based on IRS Publication 523 and Tax Topic 701, read October 29, 2026. General information, not tax advice.
You can still avoid most or all capital gains tax on a house that doesn’t fit the usual “owned and lived there 2 of the last 5 years” rule. As of October 2026, IRS Publication 523 allows a partial exclusion after a job move of 50+ miles, a health move or an unforeseeable event, lets a surviving spouse keep the $500,000 limit for 2 years, and lets military owners pause the 5-year clock for up to 10 years.
Jump to: ⏱️ Selling early · 🤝 Spouses and divorce · 🏠 Military and service · 💲 Rentals and offices · 🪜 Reporting · ❓ FAQ
Key takeaways
- A partial exclusion is a fraction of $250,000: the months you qualify divided by 24. Twelve months gives you up to $125,000.
- A widow or widower who hasn’t remarried can use the $500,000 limit if the home sells within 2 years of the spouse’s death.
- Depreciation you took (or could have taken) after May 6, 1997 can’t be excluded; that part can be taxed at up to 25%.
- If you get a Form 1099-S, you report the sale even when the whole gain is excluded.
If you already meet the standard two-year tests, our main guide on how to avoid capital gains tax when selling a house covers the basics: the $250,000 and $500,000 limits, raising your basis and the tax rates. This page is for everyone else. The rules below come straight from the IRS website, mainly Publication 523 (Selling Your Home).
What if you sell before living there two years?
You don’t automatically lose the exclusion. Publication 523 gives a reduced exclusion when the main reason for the sale is one of three things, and the event happened while you owned and lived in the home.
- Work: you, your spouse, a co-owner or someone who lived there took a new job at least 50 miles farther from the home than the old one. The IRS example: the old office was 15 miles away, the new one 65.
- Health: you moved to get or give care for an illness or injury, for yourself or a close family member, or a doctor recommended the move.
- Unforeseeable events: the home was destroyed or condemned, a disaster damaged it, or someone in the household died, divorced or separated, had twins or more from one pregnancy, became eligible for unemployment, or could no longer pay basic living costs after a job change.
Even if your story doesn’t match the list, the IRS lets you qualify on “facts and circumstances.” It looks at whether the problem arose while you lived there, whether you sold soon after, and whether you could have foreseen it when you bought.
How do you work out the partial amount?
Worksheet 3 in Publication 523 does the math. Take the shortest of three periods: the time you owned the home, the time you lived in it, and the time since you last used the exclusion on another home. Divide by 24 months (or 730 days). Multiply by $250,000. Married couples filing jointly do it for each spouse and add the results.
| Months you qualify | Share of 24 months | Maximum exclusion (single) | Married, both qualify |
|---|---|---|---|
| 6 | 25% | $62,500 | $125,000 |
| 12 | 50% | $125,000 | $250,000 |
| 18 | 75% | $187,500 | $375,000 |
Here’s a real-life version. You buy a condo, live there 14 months, then accept a job 80 miles away and sell with a $60,000 gain. Fourteen out of 24 months is about 58%, so your cap is roughly $145,800. The whole $60,000 gain fits under it.
How do the rules work for spouses, widows and divorce?
Married couples filing jointly get up to $500,000 when either spouse meets the ownership test and both meet the two-year use test. Each spouse has to meet the residence part individually. If only one of you lived there long enough, the limit is figured separately for each.
Surviving spouses. If you haven’t remarried, you can count the time your late spouse owned and lived in the home. You can also keep the $500,000 limit if you sell within 2 years of the death and the other conditions in Publication 523 are met. That two-year window matters. Many people wait to sell after a loss, and a sale in year three can cap the exclusion at $250,000.
Divorce. Moving your share of the home to a spouse or ex-spouse as part of a divorce is generally treated as no gain and no loss. If your ex keeps living there under the divorce or separation instrument, you can still treat it as your residence while you remain an owner. That helps when the home sells years later. If the home came to you from your ex, your starting basis is generally their adjusted basis, not the market value on the day you received it.
Selling a home you inherited instead? The rules are different again. Start with Sell Your Inherited Home with Confidence and Clarity and How to Legally and Strategically Sell an Inherited House. If the house is going through probate, Sell a Probate Property Smartly With Flat Fee MLS walks through the listing side.
Can military or Foreign Service owners stop the clock?
Yes. Members of the Uniformed Services, the Foreign Service, the intelligence community and some Peace Corps workers can choose to suspend the 5-year test period for up to 10 years while on qualified official extended duty. Tax Topic 701 defines that as more than 90 days, or an indefinite period, at a duty station at least 50 miles from the home, or living in government housing under orders.
The IRS example in Publication 523: an owner lives in a home for three and a half years, then spends six years on Army duty elsewhere and sells. By suspending those six years, the owner looks back at the five years before deployment and passes both tests. You make the election simply by filing your return for the year of sale and excluding the gain.
What changes if the home was a rental or had an office?
This is where people get surprised. Two separate rules can shrink the exclusion.
Depreciation. If you were entitled to depreciation because you rented the home or used part of it for business, you can’t exclude the part of the gain equal to depreciation allowed or allowable after May 6, 1997. “Allowable” means it counts even if you never claimed it. Tax Topic 409 says unrecaptured section 1250 gain is taxed at a maximum 25% rate.
Nonqualified use. Any period after 2008 when neither you nor your spouse used the home as your main residence is “nonqualified use,” and the gain linked to it isn’t excludable. The big exception: time after you move out, within the 5-year window, doesn’t count. So renting the place for a year or two after you leave is very different from renting it for years before you move in.
Sell smarter
List your home on the MLS from $99
A flat fee instead of a percentage, and $0 to Beycome at closing. You stay in control of your sale.
Sell your home →Buy smarter
Get up to 2% back at closing
On homes listed by other agents, Beycome credits you up to 2% of the price at closing (1% kept, $1,499 minimum; not on FSBO homes or homes listed by Beycome sellers).
Buy a home →A home office inside your living space is simpler. Publication 523 says you don’t need to split the gain between business and home use for a room within the house. You still deal with the depreciation part.
Thinking of buying your next place with stock profits? That’s a separate tax question, covered in how capital gains from stocks affect home buying. For broader planning, our older piece on Tax And Legal Tips To Keep In Mind When Investing in Real Estate is still a useful checklist.
Do selling costs lower your taxable gain?
Yes. Your gain is the “amount realized” (price minus selling expenses) minus your basis, even in a family sale at a discount (see our below-market sale tax guide). Publication 523 lists sales commissions, advertising, legal fees and other costs of selling as selling expenses. Improvements like a new deck, bathroom or roof add to basis. Keep the receipts; they’re your proof if the IRS asks.
One honest note. Paying less to sell, for example listing with a flat fee instead of a percentage, slightly raises your taxable gain because there’s a smaller expense to subtract. You still keep more cash. On a home covered by the exclusion, the tax effect is usually zero.
Beycome puts your home on the major home search sites and the MLS from $99 with our flat fee MLS packages, with $0 Beycome fee at closing. We list in 17 states and DC. You keep control of price, showings and offers. Before you list, a free home value estimate helps you guess your gain, and our guide to who pays closing costs when selling a home shows the other line items.
When do you have to report the sale?
Tax Topic 701 gives two triggers. You report if you receive Form 1099-S (Proceeds From Real Estate Transactions), even when all of the gain is excluded. You also report if you can’t exclude all of it. You use Form 8949 and Schedule D (Form 1040). Depreciation recapture from full business or rental use can bring Form 4797 into it.
Selling with seller financing? Topic 701 says an installment sale can still use the exclusion. And if your sale involves a mortgage payoff, what happens to your mortgage when you sell explains the payoff letter.
Buying again soon? Beycome’s buyer program is open to every buyer on homes listed by other agents. There’s no upfront fee; Beycome keeps 1% of the price (minimum $1,499) and credits the rest of the buyer-agent commission to you at closing, with lender approval. The credit can’t apply where no buyer-agent commission is offered, like most FSBO homes, or on homes listed by Beycome sellers.
For money questions beyond taxes, like comparing a buyout offer or a loan payoff, the Consumer Financial Protection Bureau has plain-language tools. Market numbers on prices and sales come from groups like the National Association of Realtors. For your own situation, a CPA or enrolled agent is worth the fee.
Capital gains special cases: questions
Can I avoid capital gains if I sell my house after one year?
Partly, if the main reason is a qualifying job move, health reason or unforeseeable event. After 12 months you can exclude up to $125,000 single, or $250,000 if married and you both qualify.
Does a divorce count as an unforeseeable event?
Yes. Publication 523 lists divorce or legal separation of an owner or resident as a standard unforeseeable event for the partial exclusion.
How long does a widow have to sell and keep the $500,000 exclusion?
Two years from the spouse’s death, if you haven’t remarried and the other conditions are met.
Is depreciation on a rented home excluded?
No. Depreciation allowed or allowable after May 6, 1997 can’t be excluded and can be taxed at up to 25%.
Do I report the sale if all my gain is excluded?
Only if you received Form 1099-S. Otherwise, a fully excluded gain doesn’t go on your return.
Can I use the exclusion on a second home?
Only on the home that was your main residence for the required time. Years it was a vacation home after 2008 count as nonqualified use.
IRS rules from Publication 523 (2025 edition, page reviewed April 30, 2026) and Tax Topics 701 and 409, read October 29, 2026; tax law can change. General information, not tax or legal advice; ask a tax professional about your sale.
Beycome prices as of October 2026. “$0 at closing” means no Beycome fee at closing; other closing costs and taxes still apply. Buyer credit: no upfront fee; Beycome keeps 1% of the price (minimum $1,499); the rest of the buyer-agent commission offered is credited at closing with lender approval; it doesn’t apply to FSBO homes or homes listed by Beycome sellers.
Sources
- IRS, Publication 523, Selling Your Home, read October 29, 2026.
- IRS, Topic no. 701, Sale of your home, read October 29, 2026.
- IRS, Topic no. 409, Capital gains and losses, read October 29, 2026.
- Beycome, listing package features, October 2026.
Disclosure & Disclaimer
Beycome provides real estate services through affiliated licensed brokerages and has a commercial interest in the services and business models discussed on this blog. Content reflects Beycome’s perspective and may promote our services; it should not be treated as independent or neutral reporting.
Articles are provided for general informational and educational purposes only, not as financial, tax, legal, or investment advice or a recommendation for your particular situation. Reading this blog does not create a brokerage, advisory, or other professional relationship.
Information, opinions, pricing, service descriptions, and comparisons reflect the sources and information available when an article was published or last updated and may change. Although we aim for accuracy, we do not guarantee that all content is complete, current, or applicable to your circumstances. Laws, market conditions, and service availability vary by location. Examples and estimated savings are illustrative, depend on stated assumptions, and do not guarantee individual results.
Verify relevant information directly and consult qualified professionals before making decisions. Beycome services are subject to applicable agreements, eligibility requirements, and state-specific terms.
