When it comes to storing eggs, there are a dozen ways to do it right — and the question of how long these protein-packed ovals last doesn’t have as straightforward an answer as you might expect.

Eggs’ shelf life depends not just on whether you refrigerate them but when you do it. Then there’s the option to freeze them or even store them on the counter (which is actually perfectly safe in some cases).

Wondering how to store eggs, how long they stay good, and how to tell if they’re fresh? We’re hatching up the details.

Sunny-side up eggs on pink backgroundShare on Pinterest
Westend61/Getty Images

How long will they last?

Eggs have a fairly long shelf life under refrigeration. The Food and Drug Administration (FDA) recommends storing eggs in their original carton and using them within 3 weeks for the best quality.

You can, of course, use their printed expiration or “best by” date as an indicator of quality, but eggs aren’t a ticking time bomb. They may very well last beyond a printed freshness date.

More food for thought: All cartons of eggs sold in the United States have a three-digit code that indicates their packing date.

The code is listed as a Julian date, ranging from January 1 as “001” to December 31 as “365.” The code “021,” for example, indicates that the eggs were packed on January 21st, while “359” means the eggs were packed on Christmas Day. This can give you a sense of exactly how old your eggs are.

Depending on the specific brand, the information may look slightly different on the carton, but it’s all there.

How to store them

The FDA recommends refrigerating eggs at 40°F (4°C) or less. It’s better to store them on an inside shelf, not in the door. (An inside shelf maintains a consistent temperature, whereas the door may not if you open and close your fridge often.)

Also, skip the fridge’s built-in egg caddy and keep eggs in their original cartons. Keeping them in this packaging will protect them better and prevent them from absorbing odors from pungent foods. It even prevents moisture loss.

Not gonna use all your eggs before they go bad? You can store them in the freezer, where they’ll keep for up to a year. (This brings a whole new meaning to having your eggs frozen.)

That said, eggs require a little bit of prep work before they go into the deep freeze.

The American Egg Board recommends removing the eggs from their shells before freezing them.

To do this, crack the eggs into a bowl and beat them just until blended (try not to whip too much air into the mixture). You can also add 1/8 teaspoon of salt or 1 1/2 teaspoons of sugar or corn syrup per 1/4 cup of yolks to prevent the yolks from thickening too much in the freezer.

Pour the egg mixture into freezer containers, seal, label with the number of eggs and date, and freeze. Thaw them the same way you would thaw milk (as in, put them in the fridge overnight).

How long can they stay out on the counter?

The short answer is the same for raw eggs in their shells and hard-boiled eggs: 2 hours.

Eggs that have been previously refrigerated (like the ones you buy in a grocery store) should be refrigerated as soon as possible after purchase. According to The Egg Safety Center, “maintaining a consistent, cool temperature is critical to safety.”

Previously refrigerated eggs left on the counter at room temperature will sweat, creating an environment for bacteria growth — and nobody wants that. The Egg Safety Center says previously refrigerated eggs should not be left out longer than 2 hours before re-refrigeration.

Fresh eggs have their own set of guidelines. If you’re raising your own chickens or buying eggs from your local chicken farmer, there’s not an immediate need to refrigerate them.

“Fresh eggs can be left out at room temperature for a week or two as long as they haven’t been washed or refrigerated at any point,” says author and fifth-generation chicken keeper Lisa Steele of Fresh Eggs Daily.

Steele further explains that washing or refrigerating disturbs the integrity of an egg’s “bloom” — the invisible natural protective coating on the eggshell that prevents bacteria and air from penetrating it.

“An egg will last seven times longer in the refrigerator, though,” says Steele, “so it’s best to chill any eggs not being eaten fairly soon.”

Once you refrigerate the eggs, the same 2-hour rule applies if you remove them from the fridge.

Following proper storage procedures will keep your eggs fresh. But if you buy eggs from a local farmer and really want to know if they’re fresh — or if you suspect a bad egg in the bunch — Steele has a quick test you can do: “A fresh egg will sink in a glass of water and sit on the bottom,” she says.

Try it! Place the egg in a glass of water. If it sinks, it’s fresh. If it sinks but stands on one end at the bottom of the glass, it’s not as fresh but is still edible. If it floats to the top of the glass, toss it.

“As the egg ages, air penetrates the shell. The egg will begin to float on one end until it’s standing upright and then will finally float,” Steele explains.

See it in action:

Remember, even if an egg passes the float test and is not past its expiration date, it’s still important to cook it to a safe temperature before you eat it. (Check out the Egg Safety Center’s temperature guidelines for more info.)

To ensure all your egg-cellent meringues, baked goods, and Benedicts are safe for brunching, be sure to store eggs properly. Unless you have a reason not to refrigerate them, you can’t go wrong stashing them in your fridge.

When in doubt, grab a glass of water and try the sinkers-and-floaters test before you get cracking.