When's the best time to take a pregnancy test?

I planned my pregnancy I just don't know when it would be the best time to take the test.