How soon after unprotected sex can I do a pregnancy test? If you have irregular period or are not sure when you ovulated, you can do a urine home pregnancy test 14 days after you last had unprotected sex. However for accuracy of result, it is recommended to do the test 21 days after intercourse.