Full answer
The cold-start method is most reliable. Place eggs in a single layer in a saucepan, cover with cold water by about an inch, and bring to a full rolling boil over medium-high heat. The moment it boils, start your timer and reduce to a gentle simmer.
For soft boiled with a runny yolk and set white, cook 6 minutes. For jammy yolks (slightly fudgy center), cook 7โ8 minutes. For hard boiled with fully set yolk, cook 10โ12 minutes. Immediately transfer to a bowl of ice water when done โ this stops the cooking and makes peeling much easier.
The greenish ring around a hard-boiled yolk means the egg was overcooked. It's harmless but preventable โ just don't leave them in hot water after cooking.
Altitude matters. Water boils at a lower temperature at higher elevations โ at 5,000 feet, water boils at about 202ยฐF instead of 212ยฐF. Add 1 minute of cook time for every 1,000 feet above 3,500 feet. At Denver's elevation (5,280 ft), add about 2 extra minutes for hard-boiled eggs.
For storage: hard-boiled eggs in their shells keep in the refrigerator for up to one week. Peeled eggs should be stored submerged in cold water in a sealed container and used within 5 days, changing the water daily.