After a year we'd dispose of it, but it's possible if the paint can was fairly full and you sealed it well, it might still be usable after two years. But we probably wouldn't use it. One test is to stir it and see if you can get it evenly mixed. If it still separates or if there are lumps, it's not usable even if the paint is relatively new.
Other tests are to smell it (bad paint will have a foul odor) or look for signs of mold. Yes, liquid latex paint can develop mold. Bad smells and mold are also reasons to ditch that can of paint.
We usually leave any leftover paint with the owner, and we try our best to get those lids on tight. But those half-empty cans are meant for touch-ups in the near future. And we really mean NEAR. Like if you mess up the wall when you're putting your furniture back in place or hanging up your decorations. Or if your carpet layer scuffs things up.
One thing to keep in mind as you're hanging onto those old paint cans in case you need to do some spot repainting is that even the very highest quality wall and trim paints will fade over time. You've probably seen this if you go to move furniture or decorations that have been in place for a long time and the color underneath is different than the surrounding walls. And paint can also darken as it ages.
Our advice? Put the date on paint cans before you put them away, opened or not. If you've got opened paint cans that you've had for a year or more, time to dispose of them. Keep in mind that liquid paint is considered hazardous household waste, so you can't just toss it in the trash. Almost empty cans of latex paint can be left with the lids off to dry out and then thrown away.