Pregnancy test

How long do you have to wait until you can take a pregnancy test?