Sale of home IRS publication — which one covers the exclusion and how do you actually use it?

Sold my primary residence this past spring after living in it for just over two years. Got a decent gain and my realtor mentioned something about an exclusion but I don't know where to start. I looked around the IRS website and kept seeing references to "sale of home IRS publication" but couldn't figure out which publication that actually is or whether it even applies to my situation. I'm filing jointly. The home was only used as our personal residence, no rental period, no home office. I tried reading Form 1040 instructions but they just point somewhere else. Can someone tell me which publication to read and how the exclusion actually works? Do I even report the sale if the whole gain is excluded?

31 comments

The publication you want is Publication 523, Selling Your Home. That's the main IRS document for the Section 121 exclusion. It walks through ownership and use tests, how to calculate adjusted basis, and when and whether you need to report the sale at all. If your gain is fully excluded and you don't have any depreciation recapture or business-use portion, you may not be required to report the sale on your return. But you have to confirm that the gain actually falls under the exclusion limit — Publication 523 lays that out.

Darius F.

Author

Thank you — I had no idea it was 523. I was searching all over and kept finding general pages. Will pull that up now.

I sold my home two years ago and was in almost the same spot. I uploaded my closing disclosure and HUD statement to taxr.ai and it walked me through the adjusted basis calculation line by line — flagged that I had an addition I'd forgotten to add back in. That bumped my basis up and lowered my gain. Worth doing before you assume the whole thing is excluded. Publication 523 is the right starting point, but the basis math can get complicated fast.

Darius F.

Author

I hadn't thought about the basis side of it. We did put a new roof on about three years ago — does that get added to basis?

Yes, capital improvements like a roof add to your adjusted basis. Repairs generally don't. Publication 523 has a list of what qualifies.

Ownership test and use test are the two gates. For the full exclusion you generally need to have owned the home AND used it as your main home for at least two of the five years before the sale. You said just over two years, so you should clear it — but double-check the exact dates because the two-year clock matters.

Darius F.

Author

We closed on the purchase almost exactly 26 months before we sold, so I think we're fine, but I'll count the actual days to be safe.

Yes, counting actual dates is the right move. Publication 523 explains how the two-year period is measured and what days count.

I want to make sure you know the exclusion isn't automatic — there's a worksheet in Publication 523 to figure your gain, and then you compare it to the exclusion limit. The limit for married filing jointly is higher than for single filers. The exact number is in Publication 523; I won't guess at it here. If your gain is below the limit and fully excluded, Form 8949 and Schedule D may not be required, but read the reporting rules in the publication carefully because there are exceptions.

Went through this last year with a home that had a short rental period earlier in ownership. I pasted the relevant pages of my closing statement into Taxr and had it cross-check my basis worksheet against the Schedule D instructions — it caught that I'd pulled the wrong line for selling expenses. For a straightforward personal-use-only sale like yours the reporting question is the main thing to nail down. If the gain is fully excluded and you received a 1099-S, you still report the sale. If you didn't receive a 1099-S and the gain is fully excluded, you generally don't have to report it, per Publication 523.

Darius F.

Author

I did get a 1099-S from the title company. So I do have to report it even if everything is excluded?

Yes, if you got a 1099-S you need to report the sale on Form 8949 and Schedule D and show the exclusion amount there. Publication 523 confirms this.

Correct. The IRS receives that 1099-S copy and will expect to see the transaction on your return. You show the exclusion so the gain nets to zero.

My situation was messier because I had used part of the house as a home office for a couple of years. That created a depreciation recapture issue even though the rest of the gain was excluded. If your use was entirely personal the whole time you owned it, you shouldn't have that problem. But wanted to flag it in case anyone else reading this has a home office in their history.

Good point. Depreciation recapture on Section 1250 property is taxed as ordinary income up to a cap and doesn't get sheltered by the Section 121 exclusion. That part of the gain is reported separately.

I pulled Publication 523 from irs.gov last time I sold and what helped me most was the flowchart at the beginning. It basically asks: did you meet ownership test, use test, and is this the first time you've used the exclusion in the past two years. Walk through that before you do anything else.

Darius F.

Author

Yes, we haven't sold a home in well over two years, so the once-every-two-years rule isn't an issue.

Don't overlook your adjusted basis calculation. A lot of people assume basis equals what they paid, but you add capital improvements and subtract any depreciation you took (or were allowed to take). If you made improvements over the years, dig up those receipts. It affects how big your gain actually is before you apply the exclusion.

I had a partial-use situation — rented the house out for about eight months before moving in. That split things into a period of nonqualified use, which limits the exclusion. If your home was purely personal the whole time, you don't have that complication. Just pointing it out because "nonqualified use" tripped me up and I didn't find it until I was deep in Publication 523.

Darius F.

Author

Ours was personal use from day one, so I think we're clear on that. But good to know the term in case I see it in the publication.

If the gain turns out to be above the exclusion limit, the excess goes on Form 8949 as a long-term capital gain (assuming you owned more than a year), then flows to Schedule D. The rate on that gain depends on your income — the instructions for Schedule D point to the Qualified Dividends and Capital Gain Tax Worksheet for the actual calculation.

I'll add that if you converted the home to a rental at any point, the analysis changes significantly. Depreciation during the rental period has to be recaptured, and the nonqualified use period shrinks the excludable portion. Since you said pure personal use, you're in the cleaner scenario.

Sold last year and the part that caught me off guard was figuring out the selling expenses. Commissions, title fees, transfer taxes you paid as the seller — those reduce your amount realized, which reduces your gain. Make sure you're pulling the right column on your closing disclosure for seller-side costs.

Darius F.

Author

We paid the realtor commission and some title fees. Those come off the sale price when calculating gain?

Yes, they reduce your amount realized. Publication 523 lists what counts. Keep that closing disclosure handy.

Since you're filing jointly, make sure you're applying the married filing jointly exclusion limit, not the single filer limit. The joint limit is larger. Publication 523 spells both out. Each spouse technically needs to meet their own ownership and use test, though there are special rules if one spouse meets ownership and both meet use.

One procedural thing: even if you end up not needing to file Form 8949 (because no 1099-S and gain fully excluded), keep all your documentation — purchase settlement statement, records of improvements, sale closing disclosure. The IRS has time to audit and you'll want proof of basis and exclusion eligibility.

Darius F.

Author

Good reminder. I've been keeping the folders but wasn't sure how long to hold onto them.

Generally hold real estate records at least three years after you file, though some suggest longer given basis issues that can stretch back years. The IRS instructions and Publication 523 address the recordkeeping side.

Publication 523 is at irs.gov if you want to read it directly. Search "Publication 523" in the search bar and it comes right up. It's updated each tax year so make sure you're reading the version for the year you sold.

Darius F.

Author

Got it downloaded now. The flowchart at the front that someone mentioned is genuinely helpful.