You need an egg, a pot, some water—how complicated can it be? But when we asked members of the Exploratorium staff how to hard cook an egg, every person we asked gave us a slightly different answer.

Even a task as seemingly simple as hard cooking an egg involves making many choices. Here are a few—and the science behind them:

Add salt to the water?



Egg white solidifies more quickly in hot, salty water than it does in fresh. So a little salt in your water can minimize the mess if your egg springs a leak while cooking. The egg white solidifies when it hits the salt water, sealing up the crack so that the egg doesn’t shoot out a streamer of white.

To prick or not to prick?



Some people use a pin to make a small hole in the shell at the large end of the egg before they put the egg in the water. At the large end of each egg is a small air space. When you hard cook an egg, this air heats up, expands, and escapes through pores in the shell—but not before the egg white sets. This leaves the egg with a flattened end. Pricking the egg provides a quick escape route for the air, which gives you an egg with a smoothly rounded end. If you prick an egg, watch for a jet of air shooting from the hole as the egg cooks.

Scientists disagree on the other possible benefits of pricking an egg. Some say that piercing the eggshell with a pin lets water leak between the shell and the egg’s internal membrane, making for an egg that's easier to peel. Others claim that providing a quick way out for expanding gases makes the egg less likely to crack as it cooks, which may be particularly important for older eggs with larger air sacs. Still others say that poking a hole in the shell weakens it, making cracks more likely.

Hot water or cold?



Some people put their eggs in cold water; others heat the water to boiling, then drop in the egg. Both methods have advantages and disadvantages.

When you drop an egg in boiling water, you heat it up quickly. When you start with cold water, you heat it slowly. And the difference in heating makes a difference in the cooked egg white.

An egg white is about 10% protein and 90% water. It’s the proteins that cause the egg white to solidify when you cook it. Egg white proteins are long chains of amino acids. In a raw egg, these proteins are curled and folded to form a compact ball. Weak bonds between amino acids hold the proteins in this shape—until you turn up the heat. When heated, the weak bonds break and the protein unfolds. Then its amino acids form weak bonds with the amino acids of other proteins, a process called coagulation. The resulting network of proteins captures water, making a soft, digestible gel.

If you keep the heat turned up too high or too long when you cook an egg, the proteins in the egg white form more and more bonds, squeezing some of the water out of the protein network and making the egg white rubbery.

Starting with cold water lets you heat the egg more slowly, which keeps the whites from getting rubbery. But this method takes longer and gives you less control over the cooking time. (How long it takes the water to reach boiling depends on the size and shape of your pot, among other things.) Starting with boiling water offers more control over timing but this may cook the whites into a rubbery state. And it has another disadvantage: The egg is more likely to crack because the air in the egg has less time to escape as the egg heats up.

New egg or old?



The age of your egg affects your end result. Very fresh eggs tend to be more difficult to peel. The more acidic the egg’s contents are, the harder the egg is to peel. As an egg ages, carbon dioxide (which is a weak acid) leaks out through pores in the egg’s shell, making the egg white less acidic.

Cold-water plunge?



If you don’t plunge your egg into cold water when you take it off the heat, it goes on cooking . . . and cooking . . . and cooking. The longer you cook the egg, the more likely you are to end up with a rubbery white and a green yolk.

Why does the yolk turn green? The green-gray color (and the whiff of sulfur smell that often accompanies it) comes from the reaction of iron in the egg yolk and sulfur in the egg white. When heated, the two can combine to make green-gray ferrous sulfide and hydrogen sulfide gas. To avoid getting a green yolk, cook your eggs just long enough to reach the desired doneness—no more. And quickly plunge the cooked eggs into cold water to stop the cooking process and minimize the iron-sulfur reaction.

Some people also say that the cold-water plunge makes eggs easier to peel.