How many days?

How many days after sex can you take a pregnancy test that will be 100% accurate