Store-bought cookie dough lasts one to two weeks past its "use by" date in the refrigerator. Homemade cookie dough should last three to five days in the refrigerator. If the cookie dough is not refrigerated, it stays good for two to four hours.
In order to keep cookie dough for the longest amount of time possible, it is important to store it in the refrigerator in a tightly closed container. Cookie dough also can be frozen, which extends its shelf life. It can keep in the freezer for six to 12 months. To prevent freezer burn, double wrap the cookie dough in plastic wrap or place it in an airtight container.