turbotax icon
Showing results for 
Search instead for 
Did you mean: 
Close icon
Do you have a TurboTax Online account?

We'll help you get started or pick up where you left off.

Selling primary residence after moving to a new state

I have lived in the property as primary residence for 1.5 years before moving to another state due to job change. I have been renting the property out in the past two years. Can I still claim the free capital gain credit if I sell the property now? Can I rent it out for another year before selling and get to the capital gain credit?  (The estimated gain is under $150K.)


Thanks very much.

2 Replies
Expert Alumni

Selling primary residence after moving to a new state

Thank you for reaching out with this excellent question!

Your gain will be determined by the amount you sold the home for, minus any fees and expenses related to the sale, minus your basis in the home (what you originally paid for the home and any improvements).

When you make a home improvement, such as installing central air conditioning or replacing the roof, you can't deduct the cost in the year you spend the money. But, if you keep track of those expenses, they may help you reduce your taxes in the year you sell your house.

This article addresses all these items and is a good reference to keep around:

After that, depending on your circumstances, you may be able to exclude $250,000 to $500,000 of any potential gain from income tax.

Do I have to pay taxes on the profit I made selling my home?

It depends on how long you owned and lived in the home before the sale and how much profit you made.

  • If you owned and lived in the place for two of the five years before the sale, then up to $250,000 of profit is tax-free.
  • If you are married and file a joint return, the tax-free amount doubles to $500,000.

The law lets you "exclude" this profit from your taxable income. (If you sold for a loss, though, you can't take a deduction for that loss.)

  • You can use this exclusion every time you sell a primary residence, as long as you owned and lived in it for two of the five years leading up to the sale, and haven't claimed the exclusion on another home in the last two years.
  • If your profit exceeds the $250,000 or $500,000 limit, the excess is reported as a capital gain on Schedule D.


How do I qualify for this tax break?

There are three tests you must meet in order to treat the gain from the sale of your main home as tax-free:

  • Ownership: You must have owned the home for at least two years (730 days or 24 full months) during the five years prior to the date of your sale. It doesn't have to be continuous, nor does it have to be the two years immediately preceding the sale. If you lived in a house for a decade as your primary residence, then rented it out for two years prior to the sale, for example, you would still qualify under this test.
  • Use: You must have used the home you are selling as your principal residence for at least two of the five years prior to the date of sale.
  • Timing: You have not excluded the gain on the sale of another home within two years prior to this sale.

If you're married and want to use the $500,000 exclusion:

  • You must file a joint return.
  • At least one spouse must meet the ownership requirement (owned the home for at least two years during the five years prior to the sale date).
  • Both you and your spouse must have lived in the house for two of the five years leading up to the sale.
This is covered in more depth here.

Even if you kept the home but only used it as a rental property, you would then have met the ownership test but the use test. If you are unable to meet the use test, I hope the information on calculating your basis and accounting for improvements and expenses helps lower your capital gain!

I hope this helps!

**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"
Expert Alumni

Selling primary residence after moving to a new state

Hi guxin1985,


To tag onto this thread, you can absolutely shelter some of the capital gain with the 121 (primary home) exclusion since that was initially your home before you began renting it.


One other factor to consider is that for the time it was rented, you would have claimed the rental income, as well as rental expenses and depreciation on the home.  When selling a rental property, depreciation is recaptured (at ordinary income rates, up to a ceiling of 25%) and this is treated separately from the rest of the capital gain. 


For example: you bought the house for $300k and sold for $450k.  You also took $10k of deprecation during the 2 years of rental.  Your basis would be reduced to $290k, thus a gain of $160k.  $150k of this gain may be excludable from the exclusion mentioned above, but the $10k attributable to depreciation is treated totally separately and not excludable. 


By selecting Sign in, you agree to our Terms and acknowledge our Privacy Statement.
message box icon

Get more help

Ask questions and learn more about your taxes and finances.

Post your Question
message box icon

Ready to start your taxes?

Hand off your taxes, get expert help, or do it yourself.

See Pricing
Manage cookies