Pregnancy testing

Hailey
How long should I wait to take a pregnancy test after having unprotected sex? I know they say once your period is late but can I test sooner?