How long does cookie dough last in the fridge?
The short version: raw cookie dough wrapped well and kept cold is usually good for three to five days in the fridge, and about two to three months in the freezer. Those two numbers are not close, and the gap is the whole story here — dough is a food built to live in the freezer, and the fridge is really just a short-term holding pen for the day or two before you bake it.
Why raw dough is not on the same clock as the baked cookie
A baked cookie is dry, low-moisture, and has been through an oven hot enough to deal with almost everything that was in the raw mixture. That is why a batch of baked cookies sits happily in a tin on the counter for a week or more. Raw dough is the opposite kind of food: butter, sugar, egg and flour beaten into a soft, moist paste, with no heat step behind it yet. Structurally it has more in common with a bowl of fresh custard than with the biscuit it is about to become. It should be treated like the perishable, dairy-and-egg-based food it currently is, not like the shelf-stable one it will turn into once it sees an oven.
The raw-flour-and-egg part, and why it is a separate question from freshness
There are two questions tangled up in "can I eat this," and they are worth pulling apart. One is freshness — has this particular batch of dough gone off. The other is that raw flour and raw egg both carry the same general caution as anywhere else uncooked batter or dough shows up: flour is milled from raw grain and is not a treated, ready-to-eat ingredient, and general food-safety guidance is to avoid eating raw dough or batter, no matter how fresh it tastes. That guidance does not change based on how new the bag of flour is or how good the dough looks in the bowl — it is about the uncooked ingredients, not about spoilage, and it is why a lot of home bakers now keep the raw bowl strictly for baking and save any "dough to snack on" for a version made with heat-treated flour and no raw egg. Baking is what actually resolves both the freshness question and the raw-ingredient one at the same time.
Why the fridge window is short and the freezer window is not
Three to five days in the fridge is a practical range, not a fixed number — dough that is heavier on butter and dairy, like one made with cream cheese, tends to sit at the shorter end, while a firmer, lower-moisture dough can stretch a little further. What shortens it either way is exposure: dough left loosely covered in a bowl will dry a crust on top and pick up whatever else is in the fridge; wrapped tightly against the surface of the dough itself, with the air pressed out, it holds far better.
The freezer changes the picture because it stops the clock that is actually limiting the fridge window — the slow drift of butter and dairy toward rancid, and the gradual drying of the surface. Cold enough for long enough, dough that would be questionable after a week in the fridge is still fine after two months in the freezer. This is the ordinary shape of the fridge-versus-freezer trade-off that shows up across a lot of food, just more dramatic here because raw dough is one of the more perishable things people routinely make in batches larger than they will use in a day or two.
What actually changes once you portion it
Most of the trouble with frozen dough is not the freezing itself, it is the wrapping. A whole log of dough, re-wrapped a little more loosely each time you slice off a piece, exposes fresh surface to freezer air on every cut — which is exactly the mechanism behind freezer burn covered elsewhere on this site. Scooping the dough into individual cookie-sized portions before freezing avoids that entirely: freeze the balls spaced out on a tray until solid, then move them into one sealed bag or container, and every portion stays wrapped until the moment it goes in the oven rather than being re-exposed each time you take one out. It also means you can bake exactly as many cookies as you want, straight from frozen, with a couple of extra minutes in the oven rather than a full thaw — which is arguably the actual point of freezing dough in the first place rather than just a side benefit.
How to tell a batch has actually turned
This is a different check from the raw-ingredient caution above — it is about whether this specific batch has gone past useful, not about the general handling of raw flour and egg. A sour or distinctly off smell, rather than the plain buttery one, is the clearest sign, and it usually shows up before anything else does. A grey or dulled surface where butter has been sitting exposed to air is a quality signal worth taking seriously on dough that has been in the fridge a while, even if it has not smelled off yet. A hard, dry crust that has formed because the dough was left loosely covered is more of an annoyance than a real problem — trim it or work it back in — but it is also a sign the wrapping was not doing its job, which is worth fixing for the next batch rather than the current one.
What actually helps day to day
Cookie dough is an easy thing to lose track of precisely because it usually goes into an unlabelled container or a rough foil log, made on one day and half-forgotten by the next, with nothing printed on it the way a store-bought package would carry a date. Munch logs a batch like that the same way it logs anything else made at home: where it is, fridge or freezer, and how long it has actually been there, so a container of dough shows up next to how many days it has left rather than being a mystery lump someone eventually has to smell-test and guess about.