<P> There are several theories as to the proper technique of hard - boiling an egg . One method is to bring water to a boil and cook for ten minutes . Another method is to bring the water to a boil, but then remove the pan from the heat and allow eggs to cook in the gradually cooling water . Over-cooking eggs will typically result in a thin green iron (II) sulfide coating on the yolk . This reaction occurs more rapidly in older eggs as the whites are more alkaline . Immersing the egg in cold water after boiling is a common method of halting the cooking process to prevent this effect . It also causes a slight shrinking of the contents of the egg . </P> <P> Hard - boiled eggs should be used within two hours if kept at room temperature or can be used for a week if kept refrigerated and in the shell . </P> <P> Boiled eggs can vary widely in how easy it is to peel away the shells . In general, the fresher an egg before boiling, the more difficult it is to separate the shell cleanly from the egg white . As a fresh egg ages, it gradually loses both moisture and carbon dioxide through pores in the shell; as a consequence, the contents of the egg shrink and the pH of the albumen becomes more basic . Albumen with higher pH (more basic) is less likely to stick to the egg shell, while pockets of air develop in eggs that have lost significant amounts of moisture, also making eggs easier to peel . Keeping the cooked eggs soaked in water helps keep the membrane under the egg shell moisturized for easy peeling . Peeling the egg under cold running water is an effective method of removing the shell . Starting the cooking in hot water also makes the egg easier to peel . </P>

How many layers does a hard boiled egg have