The PCR test for COVID-19 works by detecting genetic material from SARS-CoV-2, the virus that causes COVID-19. The genetic material from SARS-CoV-2 cannot be confused with the genetic material from other viruses, so the COVID-19 diagnostic test is highly specific. This means it almost never gives a false positive. If you are tested for COVID-19, and the test comes back positive, you can be very sure that you are infected with this virus. The new antigen test for COVID-19 is also very specific and rarely gives a false positive.
Unfortunately, neither test is equally sensitive. If the specimen collection is not done perfectly, or if you are in an early stage of infection or already partially recovered, your nasal-swab sample might not contain enough viral material to come back positive. There are many stories about patients who tested negative soon after their symptoms began, only to test positive on a test done later. It is clear that the PCR test is more accurate at detecting early-stage infections, and there are early indications that the antigen test may be better at identifying patients who are already recovering.
However, because false negative results on diagnostic tests happen relatively often, a negative result should not give you a sense of false security. If you have any symptoms of COVID-19, it is safest to assume you are infected and act accordingly, even if your diagnostic test comes back negative.
May 13, 2020