It takes a long time to get a rotten egg
You'll be able to smell when an egg has gone fully rotten—but it can be hard to know exactly how long eggs last before they're unsafe to use in your recipes. Fortunately for those who might be asking themselves, "How long do eggs last?" as they look at the half-finished carton of eggs sitting on their refrigerator shelf, the answer is a surprisingly long time. If you're lucky, your carton of eggs will have an expiration date listed on it; in that case, you know the answer pretty quickly. But if your eggs don't come with an expiration date, look for the date of packaging, which is on the side of every carton as per guidelines from the US Department of Agriculture.
The so-called "pack date" will appear as a three numbers on the side of the carton, but it's actually fairly easy to decipher. "This three-digit code indicates the date of packaging, starting with January 1 as 001 and ending with December 31 as 365," explains the USDA. "These numbers represent the consecutive days of the year." Your eggs will last for four to five weeks after that packaging date, or three weeks after purchase, as long as you know how to properly store your eggs.
To keep your eggs fresh—and safe—for as long as possible, the USDA recommends refrigerating eggs within 24 hours of bringing them home from the market, ideally in the coldest part of the fridge rather than the door (even though that's where lots of refrigerators have their little built-in egg holders). If your egg gets cracked in transit, simply crack the egg into an airtight container and use it within two days. But the USDA warns against purchasing eggs from the store that are already cracked. They're messy to transport and probably unsafe to eat since, "Bacteria can enter eggs through cracks in the shell."
Now, all of this is great if you have the original cardboard carton that the eggs came in, or if you remember exactly when you purchase that carton of eggs in your fridge. But if don't quite know the exact date you went grocery shopping and still want to know how to tell if an egg is bad, don't worry. There is a way you can figure it out that doesn't require you to crack a potentially rotten egg in your kitchen. The easy way to tell how old your eggs are is to (carefully) plop them in a glass of water. Seriously. As chef Jiselle Basile explained to Extra Crispy, "If the egg sinks, it’s still OK to eat. If it floats, throw it away. It’s as simple as that."
The USDA does note, however, that just because an egg can float, it still might be OK to eat. "An egg can float in water when its air cell has enlarged sufficiently to keep it buoyant," they explain. "This means the egg is old, but it may be perfectly safe to use." The only way to know for sure is to crack it open and take a whiff—but there's no reason to take that risk if you can avoid it.