Capital gains on home sale if rented before buying, owned under 2 years — do I qualify for any exclusion?

Bought my house in March 2024, but here's the twist: I had rented it from the same landlord for about 14 months before the purchase closed. Sold it in November 2025 — so I owned it under 2 years total. I know the standard exclusion requires 24 months of ownership AND use as your main home in the 5 years before sale, and I clearly don't hit the ownership side. But I was living there the whole time, renting then owning, so my residence period is well over 2 years even if ownership isn't. I filed jointly with my spouse. The gain is real and not trivial. I tried reading Publication 523 and it seems like I might qualify for a partial exclusion if there's a qualifying reason (job change, health, unforeseen event) but I'm not sure how that calculation works or whether my rental period counts toward anything. Does the pre-purchase rental time help me at all here?

35 comments

The rental period before you owned the home doesn't count toward the ownership test at all. Ownership and use are two separate tests under Publication 523. You needed 24 months of ownership within the 5 years before sale — your clock started at closing in March 2024, so you're short on that side regardless of how long you lived there. The use test is a different story. Both your rental and ownership periods count toward the 24-month use requirement, since you were using it as your main home the whole time. So you likely pass the use test easily. But you need BOTH tests for the full exclusion.

Marcus R.

Author

So I clear the use test but fail ownership — that's what I suspected. Does failing ownership automatically kill any exclusion, or does the partial exclusion calculation still apply?

When I sold my place last year I had a similar situation — owned it about 20 months. I uploaded my closing disclosures and the sale settlement statement to taxr.ai and it walked through the ownership and use day counts line by line and flagged that I needed to check whether I had a qualifying reason for the partial exclusion. Super useful before I sat down with my CPA. For you: the partial exclusion under Publication 523 is based on the fraction of 24 months you actually owned (and used) the home, multiplied by the full exclusion amount. But it only applies if your sale was primarily due to a job location change, a health reason, or an unforeseen event. Do any of those fit your situation?

Marcus R.

Author

My employer did relocate my office during that period, which pushed the sale. That feels like it could qualify as a job location change. How strict is the IRS about that?

The job location change test is more specific than people expect. Publication 523 says the new workplace has to be at least 50 miles farther from your home than your old workplace was. So if your office moved from 10 miles away to 65 miles away, you'd clear it. If it moved from 30 miles to 60 miles, you're short. If you do qualify on that basis, you get a partial exclusion — the fraction is the number of months you owned AND used the home divided by 24, applied to the full joint exclusion ceiling. The result can still be substantial depending on your gain.

Marcus R.

Author

The old office was about 8 miles from my home, the new one is around 60. That's a 52-mile increase so it looks like I'd clear the 50-mile threshold.

Worth double-checking the exact addresses and measuring the distances carefully before you rely on that. The IRS measures from the same home address to each workplace, not workplace to workplace.

Does your gain also have a depreciation recapture component? You mentioned it was a rental before you bought — but actually you weren't the owner during the rental period so you couldn't have claimed depreciation on it. Once you bought it, did you ever claim it as a rental on a Schedule E, or was it your main home the entire time you owned it?

Marcus R.

Author

No, I never claimed it as a rental once I owned it. I moved in at closing and it was my primary residence until I sold. So no depreciation on my end.

Good — that simplifies things considerably. No depreciation means no recapture to worry about, and your basis is just your purchase price plus any capital improvements you made.

How did you determine your cost basis? Closing costs, title fees, and certain settlement charges can be added to your basis under Publication 551. A lot of people just use the purchase price and leave money on the table, especially on a short hold where every dollar of basis matters.

Marcus R.

Author

I pulled the closing disclosure and added title insurance and recording fees, but left out the loan origination fees since those are costs of getting the mortgage, not of buying the house. I think I have a reasonable basis figure but I'll double-check Publication 551 on eligible items.

Are you planning to report this yourself or through a preparer? A partial exclusion situation with a job relocation trigger and a short ownership period is exactly the kind of thing where a small error — wrong fraction, wrong qualifying reason code — can mean a big difference. If the gain is substantial, an enrolled agent or CPA who handles real estate sales regularly is worth it here.

The sale has to be reported on Form 8949 regardless because even with a partial exclusion the gain isn't fully excluded. You'd use Part II (long-term box, since inherited property rules don't apply here — but wait, is your holding period even long-term? March 2024 purchase, November 2025 sale...)

Holding period for securities uses trade date but for real property you count from the day after acquisition to the day of disposition. March 2024 to November 2025 is well over 12 months so yes, long-term.

Right, I second-guessed myself. Long-term confirmed. So Part II of Form 8949, and you'd enter code H in column (f) with the excluded portion as a negative number in column (g), then carry the taxable remainder to Schedule D.

I had a partial exclusion situation two years ago — different reason (health) but same form mechanics. I loaded my Form 1099-S and the worksheet from Publication 523 into Taxr and it filled out the fraction, applied it to the exclusion ceiling, and showed me exactly what number went into column (g) on Form 8949 as the negative excluded amount. Saved me a lot of back-and-forth with the instructions. One thing to flag: you said you filed jointly. For a married couple filing jointly, Publication 523 says only one spouse needs to meet the ownership test for the full (not partial) exclusion, but both must meet the use test. For the partial exclusion, the fraction still applies to the joint ceiling. The exact ceiling is in Publication 523 — I won't guess the number.

Marcus R.

Author

That's helpful on the joint filing point. My spouse has never owned the property either so we're both short on ownership, but we both lived there well over 24 months counting the rental period.

Curious — did you receive a Form 1099-S from the closing? Publication 523 is clear that if you got one, you must report the sale on Form 8949 even if no tax is owed after the exclusion. If you didn't receive one and your gain is fully excluded, you may not need to report it at all, but a partial exclusion means there's taxable gain, so you'd be reporting it either way.

Marcus R.

Author

Yes, the title company issued a Form 1099-S. So I'm reporting it regardless. Good to know that's the right call even if the partial exclusion wipes out most of the gain.

What about state taxes? Some states don't conform to the federal home sale exclusion or calculate it differently. Depending on where you are, the state return could look very different from the federal even after the partial exclusion is applied.

Before my own home sale I ran the Publication 523 eligibility test and the partial exclusion worksheet through Taxr — it read through both documents together and listed each step in order: ownership months, use months, qualifying reason, fraction, excluded amount. Really helped me see where I stood before I touched Form 8949. For your situation specifically: once you confirm the job relocation clears the 50-mile rule, your partial exclusion fraction is the number of months you owned AND used the home as your main home divided by 24. Apply that to the joint exclusion maximum from Publication 523. The taxable gain is what's left after subtracting the excluded amount from your total gain (proceeds minus adjusted basis).

Marcus R.

Author

That fraction approach makes it concrete. I owned it from March 2024 to November 2025 — roughly 20 months of ownership. So the fraction would be 20/24 applied to the joint ceiling. Then taxable gain is whatever is left over that after subtracting from total gain.

Roughly right on the month count, though count carefully from the actual closing date to the actual sale date. And remember your adjusted basis includes eligible closing costs, so compute total gain from adjusted basis, not raw purchase price.

Does the section 1031 exchange restriction apply here? I know Publication 523 says a home acquired through a like-kind exchange in the past 5 years isn't eligible for the exclusion. Your purchase was a straight purchase from a landlord, right, not any kind of exchange?

Marcus R.

Author

Straight purchase, no 1031 involved. I just bought it outright from the person I had been renting from.

Worth noting — the gain you report ends up on Schedule D after flowing through Form 8949. Since it's long-term, it goes on Part II of Schedule D. The tax rate on whatever is taxable depends on your income, so the instructions for Schedule D or your preparer can walk you through that piece.

Has anyone here dealt with the situation where the qualifying reason documentation is thin? Like the employer relocated but there's nothing formal in writing — just a changed office address. Would the IRS ask for proof if the return is selected?

Generally you'd want something contemporaneous — an email from HR, an updated employee address form, anything that shows the change and when it happened. It doesn't have to be a formal letter but having nothing makes it harder to defend if examined.

Marcus R.

Author

I do have emails from HR about the office relocation with dates. I'll save those with my tax records even though I'm not attaching them to the return.

One correction to something earlier in the thread: someone implied the rental period DOES count toward use. That's actually correct per Publication 523 — time you used the home as your main home counts toward the use test whether you owned it or not. But I want to make sure nobody read that as meaning rental-before-purchase counts toward OWNERSHIP. It absolutely does not. Ownership begins at closing.

Correct addition. The two tests are independent. Use = main home use regardless of ownership. Ownership = title in your name. The confusion between them is probably the most common mistake on this form.

If your taxable gain ends up being significant even after the partial exclusion, it might be worth reviewing whether any capital improvements you made during ownership can increase your basis further. Roof replacement, HVAC, additions — those add to basis under Publication 551. Routine repairs don't.

Marcus R.

Author

I did replace a water heater and repaint — I think the water heater might qualify as a capital improvement but the paint probably doesn't. I'll go back through my records for anything that improved the property rather than just maintained it.

To pull this together: you likely pass the use test, fail the ownership test outright, may qualify for a partial exclusion if the job relocation clears the 50-mile rule, and would compute the exclusion as a fraction of months owned-and-used divided by 24 times the joint ceiling. Report the sale on Form 8949 Part II with code H and the excluded amount as a negative in column (g). Taxable gain flows to Schedule D Part II. The 1099-S means you must file Form 8949 regardless.