Martha Stewart suggests boiling eggs and letting them sit for 12 minutes to get the perfect hard-boiled egg, although the idea of perfection varies depending on individual taste. Dropping the egg into already-boiling water is more precise than starting from cold water for softer boiled eggs.
For a firmer yolk, start the eggs in cold water, and let it heat up gradually. Start timing when you notice the water boiling. Hard-boil eggs in enough water to cover them by 1 1/2 inches, fully submerging them. Choosing older eggs usually means that the shell membrane is weakened and easier to peel.
After the time is up, remove the eggs from the hot water, and immediately submerge them in cold water. This shocks them and prevents them from cooking longer than the desired time, preserving the state of the yolk. For best results, use ice water for this step. Cool water also makes it easier to peel the eggs without the shell sticking to the white.
A 12-minute cooking time results in a traditional hard-boiled egg with a firm white and a firm, pale yellow yolk, ideal for use in deviled eggs or as a snack. Reducing the cooking time to 10 minutes keeps the white firm, but the yolk soft. Eggs cooked between five and seven minutes have a yolk that is nearly runny, perfect for adding to shoyu ramen or eating at breakfast with Parmesan toast.