Diagnostic Test Metrics Calculator
Summarise a binary classifier or screening test from its four confusion-matrix counts. The result separates how well the test detects positives from how well it identifies negatives.
How to use this calculator
- Enter the true positives using the units shown beside the field.
- Enter the false negatives using the units shown beside the field.
- Enter the true negatives using the units shown beside the field.
- Review the calculated values and check that the assumptions match your scenario.
- Change one input at a time when comparing scenarios so you can see which assumption drives the result.
Formula and assumptions
Sensitivity=TP/(TP+FN); specificity=TN/(TN+FP); PPV=TP/(TP+FP); NPV=TN/(TN+FN); accuracy=(TP+TN)/total.
- Predictive values change with the prevalence of the condition in the tested population. This calculator is a statistics aid, not medical advice or an assessment of a real test’s clinical suitability.
- The result is computed from the values you provide; it does not fetch external rates, live account data or local rules.
Worked examples
Worked example
For TP=48, FN=12, TN=130 and FP=10, sensitivity is 80% and specificity is about 92.86%.
Example inputs: True positives = 48, False negatives = 12, True negatives = 130, False positives = 10.
Compare the displayed output with your own measurements before using it in a decision.
Understanding the result
Predictive values change with the prevalence of the condition in the tested population. This calculator is a statistics aid, not medical advice or an assessment of a real test’s clinical suitability.
Results are estimates based on the stated model. If the situation depends on measured conditions or contractual specifications, use those source values rather than typical assumptions.
Important notes
Predictive values change with the prevalence of the condition in the tested population. This calculator is a statistics aid, not medical advice or an assessment of a real test’s clinical suitability.
Frequently asked questions
What formula does this calculator use?
It uses the method described above: Sensitivity=TP/(TP+FN); specificity=TN/(TN+FP); PPV=TP/(TP+FP); NPV=TN/(TN+FN); accuracy=(TP+TN)/total.
What should I verify before relying on the result?
Predictive values change with the prevalence of the condition in the tested population. This calculator is a statistics aid, not medical advice or an assessment of a real test’s clinical suitability.
Can I compare different scenarios?
Yes. Change the inputs while keeping units and definitions consistent, and record the assumptions used for each scenario.
Related calculators
- 2×2 Matrix Calculator — Add, subtract and multiply 2×2 matrices and calculate each determinant with transparent row and column inputs.
- Sensitivity and Specificity Calculator — Calculate sensitivity, specificity, predictive values and total sample count from confusion-matrix counts.
- A/B Test Sample Size Calculator — Estimate per-variant sample size for a two-sided conversion-rate A/B test using a normal approximation, baseline rate and relative minimum detectable lift.
- Lens Depth of Field Calculator — Estimate near and far focus limits from focal length, aperture, subject distance and an assumed circle of confusion.
- API Error Rate Calculator — Calculate the fraction of API requests that meet your defined error criterion in a measured period.
- API Latency Percentile Calculator — Calculate median, p95 and p99 latency estimates from a list of measured request durations in milliseconds.
Related explanations
Learn the method behind the number or compare the terminology before using the calculator.
- How to Calculate a Z-Score — Learn how a z-score shows how far a value is from the mean in standard-deviation units.
- How to Calculate Percentage Change — Learn the percentage change formula, how to calculate increases and decreases, and why the original value matters.
- Percentage Change — Learn what percentage change means, how to calculate increases and decreases, and how the original value affects the result.
This page provides a calculation tool plus explanatory information so you can understand what the result means and when the underlying method may not fit your situation.