How to Flip a House While Living in It: The 2-Year Rule and What It Means
Numbers reviewed by a Massachusetts investor · 200+ deals analyzed, 15 bought · MBA
How do you flip a house while living in it? You buy a house that needs work, make it your main home, fix it up over time, and sell after you have owned it and lived in it for at least 2 of the last 5 years. If you meet the IRS tests, up to $250,000 of the gain ($500,000 for most married couples filing jointly) may be left out of your income.

What is a live-in flip?
A live-in flip is a fixer-upper you buy as your own home. You live in it while you fix it, then sell it and move to the next one. Some people call it a "live-in flip" or a "slow flip."
It is a trade. You give up speed and comfort, and in return the home-sale tax rule may cover the profit.
Our own 10 flips were not live-in flips, so we've never used this rule on a flip. This post explains the IRS rule and the trade-offs, not our results.
How does the 2-year rule work?
IRS Publication 523 sets three tests for the home sale exclusion: ownership, residence and a look-back. You need all three for the full exclusion.
- Ownership test. You owned the home for at least 24 months in the 5 years before the closing date.
- Residence test. You used it as your home for at least 24 months in those same 5 years. For a married couple filing jointly, each spouse has to meet this test for the full $500,000.
- Look-back test. You didn't exclude gain on another home you sold in the 2 years before this sale.
The 24 months don't have to be in a row; Pub 523 asks for a total of 730 days. Pub 523 also allows a smaller, partial exclusion if you have to sell early because of a job change, a health problem or certain other events it lists.

What happens if you sell before 2 years?
Then the full exclusion is off the table, unless a partial one applies. The gain is taxed like any other sale, and how long you held the house matters.
| When you sell | How the gain is generally treated |
|---|---|
| Held 1 year or less | Short-term gain, taxed as ordinary income (Topic 409) |
| Held more than 1 year, under 2 years lived in | Long-term gain, which may get a lower rate (Topic 409) |
| Owned and lived in 2 of the last 5 years, no exclusion in the prior 2 years | Up to $250,000 ($500,000 joint) may be excluded (Pub 523) |
Two limits apply. Gain tied to depreciation you claimed after May 6, 1997 (for example, if you rented part of the house) can't be excluded, and some time you didn't live there can also reduce the exclusion. Our guide to house hacking taxes covers the rented-unit case.
Which costs lower your taxable gain?
Your gain is the sale price, minus selling costs, minus your basis. Pub 523 says you add the cost of improvements to your basis. Routine repairs that only keep the house in good shape don't count, unless they are part of a larger remodeling job.
Keep every receipt
Improvements raise your basis and lower your gain. Save receipts, contracts and permits from day one, even if you expect the full exclusion.
Repairs alone don't add to basis
A small repair on its own doesn't raise your basis. Done as part of a bigger remodel, the IRS may treat the whole job as an improvement.
Selling costs count too
Selling expenses, such as agent commissions, come off the sale price when you figure the amount you realized.
Is a live-in flip worth it?
It depends on what you value. On our flips, time was the biggest cost: we work on a rule of about $6,500 of profit per month held. A live-in flip holds for 2 years or more on purpose, so it only makes sense if the tax savings and the free housing beat what that money could earn on faster flips.
It is also a hard way to live. You may have no kitchen for weeks, dust in every room, and contractors at the door. On a house built before 1978, lead-safe work rules can apply to paid work that disturbs paint, so check with your contractor before work starts.
If you hire help, the same process we use on our flips still applies. Get 2+ quotes per trade, pay for completed work, and have the contractor pull the permits.
Our contractor walk and bids step shows how. When you're ready to sell, the after-the-flip review helps you compare budget against actual.
Enter your purchase, rehab and a 24-month hold to see the profit before tax. Free, no sign-up needed.
FAQ
Can you flip a house while living in it?
Yes. You buy it as your main home, fix it over time and sell it later. The tax treatment depends on how long you owned it and lived in it.
How long do you have to live in a flip to avoid capital gains tax?
Under IRS Pub 523, you generally need to own it and live in it for at least 24 months in the 5 years before the sale, and not have used the exclusion on another home in the prior 2 years.
How much gain can you exclude on a live-in flip?
Up to $250,000 for a single filer, or up to $500,000 for most married couples filing jointly, if you meet all the tests.
What if I sell a live-in flip after 1 year?
You generally can't take the full exclusion. A gain on a home held 1 year or less is short-term and taxed as ordinary income, unless a partial exclusion applies.
Do renovation costs reduce my gain?
Improvements add to your basis, which lowers your gain. Routine repairs on their own don't, unless they are part of a larger remodel.
Scope: the tax rules come from IRS Pub 523 and IRS Topic 409, fetched 11/27/2026; state income tax rules can differ and are not covered here. Our flip numbers come from our own 10 completed flips in Massachusetts, none of which were live-in flips. Education, not tax advice; confirm your situation with a CPA.
Sources
- IRS Pub 523, Selling Your Home: $250,000 / $500,000 joint exclusion; ownership, residence and look-back tests of 24 months in 5 years; improvements added to basis, repairs not; depreciation after May 6, 1997 can’t be excluded; selling expenses reduce the amount realized; fetched 11/27/2026
- IRS Topic 409: held one year or less is short-term; net short-term gains taxed as ordinary income; fetched 11/27/2026
- Our own deal records: 10 completed flips, average 6.6 months held, contractor process
How we make money: everything here is free. We may earn from ads, clearly labeled sponsors and affiliate links, which never change our numbers. Details. Estimates, not financial or legal advice. Terms · Disclaimer · Privacy