Investors & landlords

So when I report the sale of the home through TurboTax, it is saying that I have to pay capital gains on part of the gain of the sale. I’m guessing because it was rented for 2 years. Is this correct? I  just thought that if I lived in the home for at least two years then that excluded all capital gain tax on the sale.