Deductions & credits

So I took another look at the rules.  <a rel="nofollow" target="_blank" href="https://www.irs.gov/publications/p523/ar02.html#en_US_2016_publink1000200611">https://www.irs.gov/pu...>

House #1 will never qualify since you have not lived there in the past 5 years.  The fact that the ultimate motivation for selling is a change in circumstances at your main residence does not allow you to avoid capital gains on rental property.  The exclusion rule was put in place to ease the tax burdens on people who own and occupy their personal main residence.  It simply doesn't apply to rental property outside of the 5 year rule.

You might qualify on house #2 because the rule does not specifically mention selling, it only mentions moving.  This is a more complicated issue.  But I can't tell from your various comments, when you moved into house #2 and when you bought house #2.  Because if you owned it prior, and moved into it with your larger family, you can qualify for an exclusion but you also have to deal with the "non-qualified period" rule (which is complicated and not well-explained in the current documents.)  So when did you buy house 2 and when did you move into house 2, and when do you plan to move out?