Ink cartridges can last approximately two years if it is properly packaged and stored. After 2 years, you might still be able to use the ink cartridges. However, they can start to dry out and lead to some potential problems if you use them on your printer, such as getting a dry print head.
An opened ink cartridge can only last for approximately 6 months. You should always let your printer ink remain in its package until you need to install it into your printer.
However, the expiration date is not the only factor that contributes to the degradation of the ink quality. The way you treat the ink cartridges greatly influences their lifespan as well.