Answer by Yuan Gao:
Cooking an egg is a great exercise in molecular gastronomy. There are some really great answers on this page, but I'd like to present the scientific approach:
Eggs contain protein. When you cook protein, you denature them, breaking up these complex macromolecules. These breaks expose lots of new sites on the protein that can form bonds, and as the broken proteins bond with each other, forming cross-connections, what was previously a liquid congeals into a solid. This is what you're doing when you cook an egg.
There are many different proteins in an egg, and they all congeal at different temperatures. The proteins in the yolk tend to congeal at slightly higher temperatures than in the whites, which allows you to cook a soft-boiled egg.
This actually means that if the temperature of the water is low enough, then your egg will never hard-boil, however long you leave it. This is why they say you can't boil an egg on mount Everest – the boiling point of water at at that altitude is too low to denature the egg's proteins fully. (Though, if a climber REALLY wanted to have hard-boiled eggs on Everest, all they'd need to do is cook the eggs in a different liquid with a high enough boiling point like oil, or maybe toast the egg carefully over an open flame)
Asmentions, the yolks congeal at about 165°F / 74°C (the whites congeal at a lower temperature than this). If you can raise the temperature of the yolks to this temperature, your egg is hard-boiled. The rate at which you do this matters less than the final temperature that you reach (though in reality, the rate of cooking does have an impact on the texture of the egg, but that relationship is much more complex than temperature).
Because there's no easy way to measure the internal temperature of the egg without sticking a thermometer into it, we have to estimate it. An egg placed in boiling water will heat up at a certain rate, and people have long since worked out that for a typical egg, placed in boiling water, it takes about 10-15 minutes to get to the right internal temperature. People will tell you that "cooking times vary" because this is just an approximate time for a typical egg, and typical conditions. If your egg is abnormally large, then it would take longer.
So what's the scientific solution to cooking a perfect egg? You could in theory instrument the egg with a temperature sensor: drill a tiny hole, insert a very fine thermocouple probe, reseal the hole with some food-safe sealant, and then cook the egg. Don't forget to remove the probe before eating.
A better method would be instead to control the heating. If you cook your egg in water that is exactly 165°F / 74°C, then the inside of the egg will gradually reach this temperature, and it will never go over. As long as you leave the egg in there for enough time, it will eventually be done and never over.
Cooking protein at a water-bath set at the exact temperature, is a molecular gastronomy method calledcooking, and can be used to cook not just eggs, but meat, fish, vegetables, and ensembles. Sous-vide cooking has a lot of benefits over regular cooking, for example, for salmon, it's often difficult to get the whole fish thoroughly cooked; f you're not careful, you'll end up with an overcooked dry and flaky exterior, with a pink and undercooked interior. Using an immersion-circulator set to 122°F / 50°C, you can ensure that the entire piece is cooked to a perfect, even doneness, with no risk of over- or under-cooking, while retaining more juiciness than regular cooking.
Being able to cook an egg at an exact temperature gives rise to some interesting possibilities. For example, as the egg whites contain proteins that congeal at a lower temperature than the egg yolks, it is possible to cook a soft-boiled egg with a fairly solid white and very runny yolk, by setting the temperature to At 145°F / 63°C:
Sous-vide cooking has become a popular tool for budding amateur molecular gastronomists, not only because it allows cooking styles not previously achievable by anyone short of a master chef, but also because it allows extremely consistent results, and at a leisurely pace. Quora has sections on bothand , and there are whole websites dedicated to nothing but sous-vide cooking and experimentation. Things that look like this:
So to answer your question, the only fool-proof way of knowing when your hard-boiled eggs are done, is to cook it in water held exactly at 165°F / 74°C. This works regardless the size of egg.