Skip to content
Calcrivo

True Positive Calculator

Calculate the true positive count from a confusion matrix and classification results.

Inputs

Fraction of the population that is truly positive.

True positive rate (recall) of the test/model.

True Positives (TP)

80.00

Actual Positives

100.00

Step by step

  1. Actual positives: total × prevalence

    1000 × 0.1

    = 100.00

  2. TP: total × prevalence × sensitivity

    1000 × 0.1 × 0.8

    = 80.00

How it works

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)

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.

You might also need