If a job transfer, a health crisis, a divorce, or a disaster is forcing a sale before you have owned and lived in the house for two full years, you may still qualify for a partial capital gains exclusion when you sell before two years instead of losing the tax break entirely. The IRS prorates it by how much of the required 24 months you actually met, and for most moderately priced homes it still covers the entire gain. A partial capital gains exclusion when you sell before two years is available under IRC §121(c) and IRS Publication 523 if the main reason for the sale is a qualifying job change, health issue, or unforeseeable circumstance — the normal $250,000/$500,000 exclusion gets prorated by the fraction of the required 24 months you actually owned and used the home. The proration formula is simple, the eligibility test is the part worth checking with a CPA, and the math below shows exactly how much it can shelter.

Step 1 of 5
If speed matters because of the circumstance forcing the sale, we can give a written cash offer within 24 hours — talk to a CPA about the tax side first.
You’ll talk to Trevor McAmis, Owner & Acquisitions Lead
(313) 710-6129
Takes about two minutes. Or call (313) 710-6129 — we answer.
Educational only. This explains how these situations generally work. It is not legal, tax or financial advice, and the rules differ by state — talk to an attorney or CPA about your own situation before you act on any of it.
This is educational information, not tax advice. Whether your specific circumstance qualifies as a “primary reason” for the sale is a facts-and-circumstances determination the IRS makes on a case-by-case basis. Talk to a CPA or tax attorney before you rely on any figure here for your own return.
The standard Section 121 exclusion — covered in full in our guide to capital gains tax when you sell your house — lets a seller exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) from federal tax, per IRS Topic 701, provided they owned and used the home as a main residence for at least 24 months out of the five years before the sale. Miss that 2-of-5-year test and the naive assumption is that the exclusion disappears entirely.
It doesn't, automatically. Per IRS Publication 523, a seller who sells early because of a qualifying reason can still take a reduced maximum exclusion — prorated to the portion of the ownership-and-use test actually satisfied. The 2025-returns edition of Publication 523 still measures that test the same way it always has: 24 months of ownership and use out of the 60 months before the sale, with no year-specific change to that threshold.
Publication 523 recognizes three categories of qualifying reason, and the IRS requires that the reason be the primary reason for the sale, based on facts and circumstances — not just present somewhere in the picture. Factors that support “primary reason” include: the situation arose while you owned and used the home; you sold not long after it arose; you couldn't have reasonably anticipated it when you bought the home; and it created significant financial difficulty or made the home significantly less suitable for your household.
Work-related move: you (or a spouse, co-owner, or resident household member) were transferred to, or took, a new job at least 50 miles farther from the home than the old job location — the same 50-mile safe harbor covered in our guide to selling a house for a job relocation. Health-related move: you moved to obtain or provide diagnosis, treatment, or care for a disease, illness, or injury, or a doctor recommended a change of residence for health reasons. Unforeseeable circumstances: the home was destroyed or condemned; a casualty loss from a natural or man-made disaster or act of terrorism; death of a household member; divorce or legal separation; the birth of two or more children from the same pregnancy; becoming eligible for unemployment compensation; or a change in employment status that leaves you unable to pay basic living expenses.
Not every hardship on that list automatically qualifies just because it happened — the IRS test is whether it was the primary driver of the sale. That determination is exactly the piece to run past a CPA before you count on any number below.
Per Publication 523's Worksheet 1, Section B, the reduced exclusion is calculated by taking the shortest of: the number of days you owned the home, the number of days you used it as a main residence, or the number of days since you last used the exclusion on a different home — then dividing that number by 730 (days) or 24 (months), and multiplying the result by $250,000 (single filer) or $500,000 (married filing jointly, provided both spouses meet the residence test and at least one meets the ownership test).
Worked example 1, single filer, 12 of the required 24 months: a single filer buys a house, is transferred to a new office 75 miles away exactly 12 months later — a qualifying work-related move — and sells. Time owned and used: 12 months of 24. Fraction: 12 ÷ 24 = 0.5. Prorated exclusion: 0.5 × $250,000 = $125,000. Sale gain: $150,000. Gain excluded: $125,000. Gain taxed: $150,000 − $125,000 = $25,000. That $25,000 is what's left exposed to federal long-term capital gains tax (plus any state tax), not the full $150,000 — the difference between assuming the exclusion is void and actually running the proration.
Worked example 2, married filing jointly, 18 of the required 24 months: a married couple filing jointly has to sell after 18 months because of a documented health-related move for one spouse. Time owned and used: 18 months of 24. Fraction: 18 ÷ 24 = 0.75. Prorated exclusion: 0.75 × $500,000 = $375,000. Sale gain: $310,000. Gain excluded: $310,000, the full gain, since it's under the $375,000 prorated cap. Gain taxed: $0. Even at 18 of 24 months, the prorated MFJ exclusion is large enough to absorb a $310,000 gain entirely — the partial exclusion often covers the whole gain on a moderately priced home even well short of the two-year mark.
The tax side is only half the decision. If the “unforeseeable circumstance” itself is time-pressured — a job start date, a health crisis, a safety concern from a divorce — the speed of the sale can matter as much as the tax bill. But speed and net proceeds pull in opposite directions, and both belong in the same decision, not just the tax angle. Our guide to cash offer vs. listing net proceeds walks through this math in more depth; here's the shape of it on a single house.
Take a house worth $220,000 prepped and listed, needing $12,000 of repairs and cosmetic work to be market-ready. Repair-then-list-retail: sale price $220,000, minus repairs $12,000, minus agent commission (5.5%) $12,100, minus seller closing costs (1.5%) $3,300, minus about 4 months of holding costs $4,400 — net proceeds $188,200. Sell as-is for cash: sale price $165,000, no repairs, no commission, minus about 3 weeks of holding costs $770 — net proceeds $164,230.
Listing nets roughly $23,970 more in this example, but it takes about four months longer to reach a closing table, plus the time and disruption of repairs and showings. A cash sale trades that difference for speed and certainty — no repair list, no financing contingency, no reopened negotiations after inspection. Whether that trade is worth it depends entirely on how much the underlying circumstance actually penalizes delay. Neither route changes the tax math above; the prorated exclusion applies whether the buyer is a retail buyer or a cash buyer, since the exclusion is based on your gain, not on who bought the house.
Wait until the two-year mark, if circumstances allow. If you can reasonably delay the sale until you cross 24 months of ownership and use, the proration issue disappears entirely and you get the full $250,000/$500,000 exclusion. This isn't always possible — a job start date or a safety situation doesn't wait — but it's the first thing to check.
Confirm with a CPA that your specific circumstance actually qualifies. Not every hardship meets the IRS's “primary reason” facts-and-circumstances test. A CPA or tax attorney can tell you whether your job change, health situation, or life event is likely to hold up, and can help you document it in case the return is ever questioned.
A 1031 exchange doesn't apply here. A 1031 exchange defers gain on investment or business property, not a primary residence — it's not a relevant alternative unless the home was a rental at some point rather than the place you lived. If it was ever rented out, that raises a separate depreciation-recapture question that the exclusion does not cover.
If the circumstance behind the sale is itself time-pressured, we can give a written cash offer within 24 hours and close on a timeline you set — no repairs, no commissions, no financing contingency to fall through. That's a tradeoff on speed against the higher net proceeds a prepped retail listing can bring, not a tax strategy and not tax advice.
All guides · Capital gains tax when you sell your house · Selling a house for a job relocation · Cash offer vs listing net proceeds
Step 1 of 5
No obligation, no fees, no repairs. We respond the same day.
You’ll talk to Trevor McAmis, Owner & Acquisitions Lead
(313) 710-6129
Takes about two minutes. Or call (313) 710-6129 — we answer.