Enter Diagnostic Study Values
Example Data Table
| Scenario | Sensitivity | Specificity | Precision | Prevalence | Dropout | Use Case |
|---|---|---|---|---|---|---|
| Screening Pilot | 88% | 92% | 5% | 15% | 10% | Early accuracy planning |
| Hospital Validation | 94% | 90% | 4% | 25% | 8% | Clinical validation |
| Rare Disease Study | 90% | 96% | 6% | 5% | 15% | Low prevalence design |
Formula Used
The calculator estimates required diseased and non-diseased participants separately.
Diseased cases needed: nSe = Z² × Se × (1 − Se) ÷ dSe²
Non-diseased controls needed: nSp = Z² × Sp × (1 − Sp) ÷ dSp²
Total for sensitivity: nTotalSe = nSe ÷ prevalence
Total for specificity: nTotalSp = nSp ÷ (1 − prevalence)
Base total: larger value of both total estimates.
Finite population adjustment: nFPC = n ÷ [1 + ((n − 1) ÷ N)]
Final total: adjusted n × design effect ÷ (1 − dropout rate)
How To Use This Calculator
Enter expected sensitivity and specificity from prior studies, pilot data, or expert targets.
Add separate precision widths for sensitivity and specificity.
Enter expected prevalence as a percentage of participants with the condition.
Select a confidence level or enter a custom z-score.
Use design effect when sampling uses clusters or complex recruitment.
Use finite population size only when the available population is limited.
Add dropout when missing samples, invalid records, or test failures are expected.
Press calculate. Review the required total and participant mix.
Understanding Diagnostic Test Sample Size
Why Sample Size Matters
A diagnostic accuracy study needs enough diseased and non-diseased participants. Too few cases can make sensitivity unstable. Too few controls can make specificity unstable. This calculator separates both targets. It then selects the larger total requirement. That approach keeps the study balanced around the stricter planning need.
Sensitivity And Specificity Planning
Sensitivity measures how well a test detects disease. Specificity measures how well it excludes disease. Both are proportions. Their uncertainty depends on the expected value and the selected precision width. A narrow precision width needs a larger sample. A high confidence level also increases the sample.
Role Of Prevalence
Prevalence connects case targets to the total sample. Low prevalence studies need more participants to capture enough diseased cases. High prevalence studies may need more effort to collect enough non-diseased controls. The calculator checks both sides. It protects the weaker side of the design.
Advanced Adjustments
Dropout adjustment covers missing results, invalid specimens, refusal, or incomplete verification. Design effect helps when clustered sampling reduces independent information. Finite population adjustment can lower the required sample when the source population is small and defined. Use it only when the study population is truly limited.
Interpreting Extra Outputs
Predictive values show expected performance under the entered prevalence. Likelihood ratios summarize diagnostic movement after a positive or negative result. Diagnostic odds ratio combines both likelihood ratios. These values do not replace sample size planning. They help researchers check whether assumptions look realistic before writing a protocol.
Good Study Practice
Use realistic assumptions. Avoid choosing very optimistic sensitivity or specificity unless strong evidence supports them. Report every input in the methods section. Include confidence level, precision, prevalence, dropout, and any design effect. A clear plan improves review, replication, and ethics approval.
FAQs
1. What is a diagnostic test sample size?
It is the number of participants needed to estimate test accuracy with planned confidence and precision. It usually considers diseased and non-diseased groups separately.
2. Why does prevalence affect the total sample?
Prevalence determines how many diseased cases appear in the recruited sample. Lower prevalence means more total participants are needed to obtain enough diseased cases.
3. Should I calculate sensitivity and specificity separately?
Yes. Sensitivity depends on diseased participants. Specificity depends on non-diseased participants. A good diagnostic study should satisfy both targets.
4. What precision value should I use?
Many studies use 5% as a practical starting point. Use a smaller value when tighter confidence intervals are required.
5. What is design effect?
Design effect adjusts sample size for clustered or complex sampling. Use 1 for simple random sampling. Use a higher value when observations are less independent.
6. When should finite population correction be used?
Use it only when the total eligible population is small, known, and clearly limited. Avoid it for open or very large populations.
7. Why add dropout percentage?
Dropout protects the final study size from missing data, incomplete verification, invalid samples, and participant withdrawal.
8. Are predictive values part of sample size?
No. Predictive values are extra planning outputs. They show expected test meaning at the entered prevalence.