Carl
Level 15

Get your taxes done using TurboTax

If I move back in right after the 3 year mark for a couple months until the sale can I exclude all capital gains or is it prorated?

Depends. If you the owner are the last to move out of the property as your primary residence prior to the sale, then your exclusion is prorated based on "unqualified use" .

Many individuals abused the tax-benefit provisions by converting their rental or investment properties into principal residences and then selling them after meeting the use requirements. By doing so they were excluding the entire gain amount up to $250,000 (or $500,000 for married individuals filing joint returns).
To stop this practice, Congress added a new rule on non-qualified use of principal residence when it passed the “Housing and Economic Recovery Act of 2008.”6 Now, an individual cannot exclude the portion of gain which belongs to non-qualified use of principal residence from his/her gross income.