Homemade cookie dough lasts three to five days in the refrigerator, and unopened store-bought cookie dough lasts around two weeks when stored in the refrigerator. Frozen cookie dough that is placed in the refrigerator lasts one to two weeks.
Cookie dough lasts the longest when it is properly stored to keep out contaminants. To maximize the dough's shelf life, store it in a small airtight container. Another way to store cookie dough is by wrapping it tightly in parchment paper and then placing it in an airtight container.
In the freezer, cookie dough can last for up to 12 months.