Investors & landlords

Thank you for answering my question and your expertise, it was very helpful.  I wanted to add 2 more questions:  Does the IRS consider the fact that I had to move away from the primary residence for out of state work, which led me to rent out the home long-term?  I read in an IRS instruction booklet that this might make me eligible for the $250,000 exclusion on gains, but it was unclear.  Also, what if the rental operated at break-even or even a loss in some of those years it was rented?  Does it matter?  Thanks again.