Cooked onions can be stored in the refrigerator for up to five days. Make sure to keep them in an airtight container to maintain their freshness.