Some foods are a straight-up gamble. Open up a box of chocolates, and you could get caramel filling or that weird pink marshmallow fluff. Bite into a peach in mid-February, and you could get cardboard. Hard-boiled eggs are another story. They might not be super exciting, but they’re steady. You know (the majority of the time) they're going to taste good. But you can also bet a year’s worth of your vacation days that they’re going to be annoying to peel.

I know this because I eat a hard-boiled egg for breakfast every single day. And after wasting countless hours of my life painstakingly picking bits of shell off of my brutalized egg in a silent rage, I decided it was time to solve this problem once and for all. Here’s what I learned.

Why Hard-Boiled Eggs Are So Hard to Peel

Eggs are packed with protein, especially the whites. When those proteins are exposed to heat—like when an egg is being cooked—the proteins coagulate, or turn from liquid to solid, explains Cathy Davies, PhD, Food Science Communicator for the Institute of Food Technologists.

Coagulation is a good thing, because it means you get to eat a solid egg instead of a gross, goopy mess. But the process also makes boiled eggs difficult to peel. “Proteins are very sticky. When the egg white cooks, it can bind to the membrane and the shell,” Davies says. And you end up with a torn, pockmarked egg.

An egg’s pH also plays a role. Egg white proteins that contain more acid are especially sticky, Davies says. Fresher eggs tend to have a lower pH, which is why the eggs from your local farmer’s market tend to be more stubborn than the ones from the grocery store.

A Method to the Madness

If you’ve ever had to deal with unpeelable eggs, you probably already know that the Internet is chockablock with potential solutions. Except they don’t all actually work. And some of them are downright ridiculous.

To achieve a boiled egg that slips happily out of its shell, one of two things need to happen: You either find a way to stop that pesky membrane from becoming so sticky or find a way to raise the pH of your egg. Here are the methods that got the job done and the ones that were a complete waste of my time.

How to Peel an Egg

1. Start hot; finish cold.

Carefully dropping an egg into a pot of boiling water instead of starting the egg in a pot of cold water is touted as the best route for easy-peel eggs. That’s because adding eggs directly to hot water helps them cook faster and keeps the egg whites from reaching too high a temperature, which seems to make it harder for the membrane to stick to the shell, Davies says. Plunging the eggs into an ice water bath once they’re done stops the cooking quickly, further preventing a sticky situation.

I had always started my eggs in cold water, so this made a big difference. Davies suggested letting my eggs sit in the ice water bath for a full 15 minutes, but I didn’t have time to wait that long. Fortunately, chilling the eggs for just a couple of minutes worked well enough.

The verdict: This wasn’t totally foolproof, but it nixed about 95 percent of my peeling problems. It might’ve been even better if I chilled the eggs longer, but in the interest of time, it was a trade-off I was willing to make.

2. Steam them.

Steaming is gentler than boiling. Supposedly this makes it harder for the whites of the eggs to get too hot and make the proteins ultra sticky. It was the other cooking method that Davies recommended, so I had high hopes. Just like after boiling, I plunged the cooked eggs in ice water for a few minutes to help them cool down.

The verdict: This worked just as well as dropping eggs into boiling water: I hit a couple of snags, but the shells mostly came off.

How to Peel an Egg

3. Use older eggs.

Older eggs have a higher pH than fresher ones. And if you’re buying them from the supermarket, you can check the carton to see when your eggs were actually packed. (Look for the three-digit lot number, which will list a consecutive day of the year. So eggs packed on January 1 would say 001, eggs packed on February 1 would say 032, etc.)

Problem is, there’s no official definition for what "old" actually is. My eggs were packed three weeks before I brought them home, and they weren’t any easier or harder to peel than other supermarket eggs I’d bought in the past. But if you buy very fresh eggs from the farmer's market (or you keep chickens... ), it might be worth seeing whether letting them sit for at least a few days makes for easier peeling.

The verdict: Not that helpful if you’re buying eggs from the supermarket, but could have an impact if you’re buying super-fresh eggs.

4. Boil eggs with baking soda.

Baking soda is alkaline, so adding a sprinkle to your cooking water will raise its pH. Which, theoretically, will raise the pH of your egg and make it easier to peel. But for this to actually work, the baking soda would need to pass through the egg shell and come in contact with the egg white before the proteins start to coagulate, Davies said. So I used a pin to prick tiny holes in the top and bottom of the egg to make sure the baking soda could get inside ASAP.

The verdict: Not very effective. Maybe I needed to use more than just a sprinkle of baking soda? Even if adding more helped, though, I still wouldn’t do this. Pricking holes in the egg was annoying, and the egg had a faint soapy taste.

Peeling Hardboiled Eggs

5. Use the one-hand rolling technique.

Gently rolling the cooked egg on a cutting board (or other hard surface) with the palm of your hand makes lots of cracks in the shell, which supposedly helps to detach the membrane from the egg white. So after dropping the egg into boiling water and chilling it in an ice bath, I gave it a try instead of my usual one big crack.

The verdict: Even though the boiling and cooling method worked on its own, the initial peel would sometimes still be a little tough. Rolling the egg first made the process even easier.

6. Shake the egg in a glass of water.

A hack that went viral a few years back showed a video of a guy putting an egg in a glass cup, adding a little bit of water, covering the mouth of the cup with his hand, and then shaking vigorously for 20 seconds. The combination of the water and the shaking seems to cause the shell to detach from the membrane in one giant piece. Amazing, right?

The verdict: I tried this in place of gentle rolling, even though I was sort of afraid that the glass might break in my hand. It didn’t—and the shell really did slip right off. Even so, I didn’t love it: It was kind of loud, and I like quiet in the morning. Plus, who’s to say the glass won’t break next time?

The Bottom Line

There’s no one foolproof trick to perfectly peel a boiled egg. Instead, it’s a combination of how you cook the egg, how you cool it, and how you crack the shell afterward. So start your eggs in already-boiling water or steam them, cool them quickly in ice, and roll them gently to make lots of cracks in the shell before peeling. Or, if you’re a daredevil, go ahead and shake it up in a cup.

READ THIS NEXT: How to Make the Perfect Boiled Egg Every Time Overshare Promo