This method works well for me.
1/4 cup distilled vinegar
Fill a 12-inch skillet, or large pan with a couple inches of water. Bring to a boil and add vinegar. Reduce to a gentle simmer.
Break each egg into a small cup. Gently add the egg to the water, tipping the edge of the bowl into the water.
4 minutes – soft set
5 minutes – medium
8 minutes – hard
(I like to flip the eggs over about half way through cooking but it is not really necessary)
Remove with a slotted spoon, drain on a clean dish towel or blot with a towel/paper towel.