Latex or oil-based paint that is left over at the end of a project can last for two or more years if it is sealed properly. Limiting exposure to air, moisture and extreme weather conditions will preserve the shelf life of the paint as well.
Laying a sheet of plastic wrap directly over the surface of the paint and applying another layer between the can and the lid can also help extend the shelf life of the paint. If any lumps develop, they can be strained out. The remainder of the paint should be mixed well to break up any remaining lumps and to smooth out the consistency before use.