How long does it take to find out if you are pregnant?

A pregnancy test will give an accurate result 3 weeks after sex.