True Positive Calculator
Calculate the true positive count from a confusion matrix and classification results.
About True Positive Calculator
True positives are the correctly identified positive cases: TP = total_population × prevalence × sensitivity. Prevalence is the fraction of the population that truly has the condition/class, and sensitivity is the fraction of those true cases the test correctly detects. This formula is commonly used to convert population-level statistics (like disease prevalence and test sensitivity from a clinical study) into expected confusion matrix counts for a given population size.
Formula
TP = total * prevalence * sensitivity
- N
- Total population
- \pi
- Prevalence (fraction truly positive)
- Se
- Sensitivity (true positive rate)
Worked example
With the default values below, True Positive Calculator returns True Positives (TP) of 80.00. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Total Populationaccepts 0–1,000,000,000
- 1,000
- Prevalenceaccepts 0–1
- 0.1
- Sensitivityaccepts 0–1
- 0.8
Results
- True Positives (TP)
- 80.00
- Actual Positives
- 100.00
Step by step
- 1Actual positives: total × prevalence= 100.00
- 2TP: total × prevalence × sensitivity= 80.00
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What's the difference between TP count and sensitivity?
Sensitivity is a rate (TP / actual positives), while TP count is the absolute number of correctly identified positives in a specific population — you need both prevalence and population size to convert one into the other.
Where does 'actual positives' come from?
Actual positives is simply total population × prevalence — the number of individuals who truly belong to the positive class, regardless of what the test/model predicts.
How do I get the other confusion matrix cells?
Use the FP, TN, and FN Calculators with the same total, prevalence, sensitivity, and specificity inputs to build out the complete 2×2 confusion matrix.
