Right time to take a pregnancy test?

How long should you wait to take a pregnancy test? Unprotected sex yesterday and the day before, 24th & 25th??