How long does it take too know if you are pregnant?

How long from the actual day(s) of sex would it take to know if you are pregnant?