A vasectomy doesn't provide immediate protection against pregnancy. Use an alternative form of birth control until your doctor confirms there are no sperm in your semen. Before having unprotected sex, you'll need to wait several months or longer and ejaculate 15 to 20 times or more to clear any sperm from your semen.
Most doctors do a follow-up semen analysis six to 12 weeks after surgery to be certain that no sperm are present. You'll need to give your doctor sperm samples to examine. To produce a sperm sample, your doctor will have you masturbate and ejaculate into a container or use a special condom to collect semen during intercourse. Your semen is then examined under a microscope to see whether sperm are present.
Vasectomy is an effective form of birth control, but it won't protect you or your partner from sexually transmitted infections, such as chlamydia or HIV/AIDS. For that reason, you should use other forms of protection such as condoms if you are at risk of acquiring a sexually transmitted infection — even after you have a vasectomy.