When a pregnancy test is performed correctly, its result is quite reliable. However, it is possible to get false positives and false negatives in pregnancy tests.
The main cause of a false negative is testing too early. In this case, the hCG hormone may not have been given time to rise to levels detectable by the test.
On the other hand, false positives can occur in the absence of pregnancy (due to the administration of exogenous hCG for ovulation induction) or in cases in which the pregnancy is not evolving (ectopic pregnancy, anembryonic pregnancy, etc.).