Pregnancy test

Avian
How long should you wait after having unprotected sex to take a pregnancy test ??