taking a pregnancy test

When is the best time to take a test that will be the most accurate