False Positive Calculator
Enter the prevalence of a condition and your test's sensitivity and specificity to get the complete confusion-matrix breakdown: true positives, false positives, false negatives, true negatives and all derived metrics including positive predictive value (PPV), negative predictive value (NPV), likelihood ratios and overall accuracy. All results update as you type.
What is a false positive?
A false positive occurs when a test indicates that a condition is present, but it is actually absent. In medical testing, this means a healthy person receives a positive result. In statistical terms, false positives are also called Type I errors. The false positive rate (FPR) is the complement of specificity: FPR = 1 - specificity. A test with 95% specificity will produce a false positive in 5 out of every 100 truly healthy individuals tested. While this sounds low, the real-world impact depends critically on how common the condition is in the population being tested - known as prevalence.
Why prevalence changes everything: the base rate fallacy
Consider a test with 90% sensitivity and 95% specificity applied to a population where only 1% of people have the condition. In a group of 10,000 people: about 90 true positives are found (90% of the 100 who have the condition), but 495 false positives also appear (5% of the 9,900 who do not have it). That means roughly 85% of all positive results are false alarms - even with an apparently excellent test. This is the base rate fallacy: ignoring how rare the condition is leads to dramatic overestimation of a positive result's meaning. As prevalence rises, PPV improves rapidly because there are far more true cases for the test to find relative to the pool of healthy people who might test falsely positive.
Understanding positive and negative predictive values
Sensitivity and specificity are fixed properties of a test, but they do not directly tell you what a result means for an individual patient. Positive Predictive Value (PPV) tells you the probability that a positive result reflects a true condition, while Negative Predictive Value (NPV) gives the probability that a negative result means the condition is absent. Both values change with prevalence. A screening test for a rare disease may have a PPV of only 10% in the general population but 80% in a high-risk group - the test has not changed, only the population. This is why population-level screening programs and targeted testing produce very different result profiles.
Likelihood ratios and clinical decision-making
Likelihood ratios (LRs) are preferred in clinical practice because they are independent of prevalence. The positive likelihood ratio (LR+) is the ratio of the true positive rate to the false positive rate: LR+ = sensitivity / (1 - specificity). An LR+ above 10 provides strong evidence for a condition; above 2 provides moderate evidence. The negative likelihood ratio (LR-) = (1 - sensitivity) / specificity; values below 0.1 provide strong evidence against a condition. You can use an LR with a Fagan nomogram to convert pre-test probability to post-test probability without needing to recalculate everything from scratch. In practice, an LR+ of 5-10 is considered clinically useful, while values near 1 mean the test adds little diagnostic information.
The F1 score and overall accuracy
The F1 score is the harmonic mean of precision (PPV) and recall (sensitivity): F1 = 2 x PPV x sensitivity / (PPV + sensitivity). It is widely used in machine learning and information retrieval as a single metric that balances false positives and false negatives. A perfect test has an F1 of 1.0; a completely useless test has 0. Overall accuracy - the proportion of all results that are correct - is often misleading when prevalence is very low, because a test that always returns negative would be correct in 99% of cases for a 1% prevalence condition, yet it would be clinically worthless. This is why accuracy alone is a poor metric for imbalanced datasets and diagnostic tests on rare conditions.
Interpreting Likelihood Ratios
| LR+ value | Diagnostic interpretation | Effect on post-test probability |
|---|---|---|
| > 10 | Very strong evidence | Large, often conclusive shift |
| 5 to 10 | Strong evidence | Moderate to large shift |
| 2 to 5 | Moderate evidence | Small to moderate shift |
| 1 to 2 | Weak evidence | Minimal shift |
| 1 | No diagnostic value | No change |
| 0.5 to 1 | Weak negative evidence | Minimal shift toward no disease |
| 0.1 to 0.5 | Moderate negative evidence | Small to moderate shift toward no disease |
| < 0.1 | Strong negative evidence | Large shift toward no disease |
Likelihood ratios (LR) indicate how much a test result shifts the probability of a diagnosis. Values closer to 1 have less diagnostic value.
Frequently asked questions
What is the difference between false positive rate and false discovery rate?
The false positive rate (FPR) is the proportion of truly healthy people who test positive - it equals 1 minus specificity and is a property of the test. The false discovery rate (FDR) is the proportion of positive results that are actually false positives - it equals 1 minus PPV and depends on both the test and the prevalence. For the same test, FDR rises sharply as prevalence falls because there are more healthy people to generate false alarms relative to the number of true cases being found.
Why is PPV so low for rare diseases even with a good test?
When a condition is rare, the pool of people who do not have it is very large. Even a small false positive rate applied to that large pool produces many false alarms. Meanwhile, there are few true cases to generate true positives. This mathematical reality means that for a disease with 0.1% prevalence, even a test with 99% sensitivity and 99% specificity will produce about 91% false positives - roughly ten false alarms for every true case found. This is Bayes's theorem in action and explains why confirmatory testing is standard practice after a positive screening result.
What is a good false positive rate for a diagnostic test?
It depends on the clinical context. For a screening test where false negatives are catastrophic (missing cancer, for example), a higher false positive rate may be acceptable because sensitivity is prioritized. For a confirmatory test where a false positive leads to harmful or expensive treatment, a very low false positive rate (very high specificity) is essential. As a rough guide, a false positive rate below 5% (specificity above 95%) is generally considered good for screening, while confirmatory tests often require specificity above 99%.
How do sensitivity and specificity relate to false positives and false negatives?
Sensitivity measures how well a test detects true cases: high sensitivity means few false negatives. Specificity measures how well a test rules out non-cases: high specificity means few false positives. There is typically a trade-off between the two - raising the threshold that triggers a positive result increases specificity (fewer false positives) but reduces sensitivity (more false negatives), and vice versa. The optimal balance depends on the relative costs of each type of error in the specific clinical or practical setting.
What are likelihood ratios and why should I use them?
Likelihood ratios (LRs) express how much a test result changes the odds of having a condition. Unlike PPV and NPV, they do not change with prevalence, which makes them portable across different populations. LR+ = sensitivity / (1 - specificity); LR- = (1 - sensitivity) / specificity. You can apply them to any prior probability using a Fagan nomogram or the formula: post-test odds = pre-test odds x LR. An LR+ above 10 or LR- below 0.1 is generally considered diagnostically powerful.
Can I use this calculator for A/B testing or machine learning?
Yes. The confusion-matrix framework applies to any binary classifier: a positive result is a predicted positive, sensitivity is recall, specificity is related to fall-out, and PPV is precision. Enter the base rate of the positive class as prevalence, your model's recall as sensitivity, and your model's specificity. The F1 score and accuracy outputs are particularly relevant for evaluating classifier performance. Note that in imbalanced datasets, accuracy is often misleading and F1 or area-under-the-ROC-curve are better primary metrics.