Taxes on sale of property

if you sell a home that you’ve lived in for at least two out of the last five years that was also partially and intermittently rented over several years, when you sell it, do you have to pay only depreciation recapture or do you have to also pay capital gains for the time you were receiving rental income?