To cook soft-boiled eggs, boil them for 4-5 minutes. For medium-boiled eggs, cook them for 6-7 minutes. And for hard-boiled eggs, boil them for 9-12 minutes.