How long do carrover credits last

I am semi-retired and possibly retired. I have carrover credits from 2 years ago. How long do these credits last and if I am retired are these credits lost if I no longer have earned income? Can I use these credits after I sell my house if my house nets more than $250,000? Can I use these credits to reduce my income if I have capital gain and interest?

 

Joel