Will I lose money if I sell my house after 2 years?

Bought my house in spring 2023 and I'm thinking about listing it this summer which would put me right at the 2-year mark. My coworker told me I'd get hit with a huge tax bill if I sell before I hit two years, but someone else said two years is actually the magic number and I'd be fine. I'm confused about which is right. I paid $310,000 for it, put in a new HVAC and some flooring, and I'm expecting to sell around $390,000. I've lived in it the whole time as my primary residence. No rental history. I've never sold a house before so I don't know what to look for on my tax return. Will I sell my house after 2 years and actually come out ahead on taxes, or is my coworker right that I'm going to owe a chunk?

37 comments

Your coworker is half right but mixed up the timing. The two-year rule is actually what saves you, not what hurts you. It's called the Section 121 exclusion. If you owned the home and used it as your main home for at least two of the five years before the sale, a big chunk of any gain is excluded from income entirely. The key is meeting both the ownership and use tests at the time you close.

Omar B.

Author

So the two years is about how long I've lived there, not just how long I've owned it? I've been there the whole time so I think I'm good on both counts.

Exactly. Ownership and use both have to be met, and they don't have to be the same two years, but in your case living there the whole time covers both at once. The issue is hitting that date before you close.

I sold in a similar spot last year — just cleared the two-year mark by a few weeks. I had Taxr at taxr.ai look at my closing disclosure and the purchase contract side by side. It flagged that my ownership start date was the closing date on the purchase, not when I moved in, and that the use period started the day I moved in. Those were different by about a week in my case, which still worked out, but it was worth confirming. The Section 121 exclusion limits depend on your filing status — check the Form 1040 instructions or Publication 523 for the exact figures.

Omar B.

Author

That's a detail I wouldn't have caught. My closing and move-in were the same day so I think I'm fine, but good to know those can differ.

The gain calculation matters too, not just whether you qualify for the exclusion. Your gain isn't just sale price minus what you paid. You add your improvement costs to your basis — the HVAC and flooring you mentioned count if you have receipts showing they were capital improvements, not repairs. Higher basis means lower gain, so keep all those records.

Omar B.

Author

I have receipts for both. The HVAC was definitely a full replacement, not a repair. Does the flooring count the same way?

New flooring throughout counts as a capital improvement. Patching a spot or refinishing would be a repair. If yours was a full replacement you're in good shape — just document it clearly.

Selling costs also reduce what you owe tax on. Agent commissions, transfer taxes, title fees — those come off your amount realized before you even calculate the gain. People forget that and think their gain is bigger than it is.

wait so if i qualify for the exclusion do i even have to report the sale on my return at all? i sold last year and didn't report anything and now i'm second guessing myself

You generally don't have to report it if the entire gain is excluded and you didn't receive a Form 1099-S. But if you got a 1099-S, you're supposed to report the sale even if no tax is owed. Worth double-checking Publication 523 on irs.gov for the exact rules on when reporting is required.

i didn't get a 1099-S so hopefully i'm ok. thanks for the heads up though

My situation was a little complicated because I had used part of my house as a home office for two years before selling. I wasn't sure if that changed the exclusion. I gave Taxr my Schedule E history and the sale details and it put together a worksheet showing that, because the office was inside the house, none of the gain had to be allocated to the office use, and what the depreciation recapture piece was. The depreciation I had claimed came back as taxable even with the exclusion covering the rest. If you've ever taken a home office deduction, factor that in.

Omar B.

Author

I've never taken a home office deduction so I think I'm in the clear on that one, but useful to know for anyone who has.

This is an important point. Depreciation recapture on any portion you depreciated doesn't go away just because you qualify for Section 121. It's taxed separately and doesn't get excluded.

Two years to the day, or just within the same calendar year? I'm asking because my two-year mark falls in late December and I'm not sure if I need to close before that date or just list before it.

It's the actual date, not the calendar year. You need to have met the two-year ownership and use tests on the date you close the sale — not the date you list or accept an offer. Close before your two-year mark and you won't qualify, so plan your closing date carefully.

That's cutting it close for me. I'll need to push my closing into January to be safe.

One thing worth knowing: if you sell at a loss on your primary residence, you can't deduct that loss. The Section 121 exclusion only matters when you have a gain. If prices have dropped and you're underwater, the tax question goes away but you don't get to write off the loss either.

Omar B.

Author

Not my situation thankfully, but good to know. I'm expecting a gain so the exclusion is what I need to focus on.

What counts as the two years exactly? Like does it have to be continuous or can it be two years total out of five?

Two years total out of the five-year period ending on the sale date. It doesn't have to be continuous. So if you lived there for 14 months, moved out, rented it, then moved back for 10 months before selling, that's 24 months and you'd meet the use test — assuming the total rental period doesn't create other complications.

I'm in a slightly different spot — I need to sell at the 18-month mark because of a job relocation. I know I won't get the full exclusion. Is there any partial exclusion available?

Yes, there's a partial exclusion for certain circumstances including a change in employment location. The amount you can exclude is prorated based on how long you met the use test compared to two years. Publication 523 on irs.gov lays out the qualifying reasons and how the proration works.

That's a relief. I'll read through 523 and see where I land. At least it's not all or nothing.

I had Taxr go through my 2024 settlement statement and basis worksheet before I filed. It caught that I had forgotten to add the cost of a deck I built in year one to my adjusted basis, which lowered my gain by several thousand dollars. It also listed out what documentation I should keep in case of a later audit — contracts, permits, the HUD statement from purchase. For a sale like yours where the numbers are close to the exclusion limit depending on filing status, getting the basis right is worth the time.

Omar B.

Author

I hadn't thought about the deck situation — I do have some improvement costs I might be forgetting. I'll pull together all my receipts and go line by line.

Does the exclusion cover state taxes too or just federal?

Section 121 is a federal rule. States handle it differently — most conform but not all. You'd need to check your specific state's rules for the sale year. Some states have their own exclusion that mirrors federal, others don't.

Worth mentioning that if you're married and file jointly, the exclusion amount is higher than for a single filer. Both spouses generally need to meet the use test, though only one needs to meet the ownership test. Filing status on the year of sale is what controls it.

Omar B.

Author

I'm single so just the one limit applies to me. My expected gain is well under it so I should be fine as long as I clear the two-year mark.

The other side of your coworker's warning might have been about short-term capital gains rates. If you sell before the two-year mark AND the gain exceeds the exclusion or you don't qualify, any gain held less than a year is taxed at ordinary income rates. After a year it's long-term rates. So there are actually two separate cliffs: one at one year for the capital gains rate, and one at two years for the exclusion.

Omar B.

Author

That actually makes sense of what he was saying. He might have been thinking of the one-year cliff, not the two-year exclusion. Either way I'm past both since I'm at the two-year mark.

Right, and at your expected numbers you'd probably be looking at long-term rates on any gain that slips outside the exclusion — but if your gain is under the limit for a single filer you may owe nothing at all federally.

Don't forget selling costs in your gain calculation. If you paid a 5% or 6% commission on a $390,000 sale that alone is roughly $20,000 off your amount realized before you calculate anything. Stack that with your adjusted basis from improvements and your actual taxable gain could be very small even before the exclusion.

How do you actually report this on the return if you do have a small gain over the exclusion? Just want to know what form to expect.

The sale goes on Form 8949 and then flows to Schedule D. You'd enter the full proceeds, your adjusted basis, then show the excluded amount as a negative adjustment in column (g) using code H. Schedule D then carries the remaining gain to Form 1040. If the whole gain is excluded and no 1099-S was issued, you may not need to file those forms at all, but when in doubt reporting it and showing the exclusion is the safer move.