A pregnancy test determines if someone is pregnant by detecting the presence of the hormone human chorionic gonadotropin (hCG) in urine or blood. Urine tests, like home pregnancy tests, are readily available and relatively accurate, while blood tests offer even earlier detection.