When is best to test

I had sex on the 5th. Unprotected. I believe i ovulated early. When should i test? And what is the earliest i can test?