Skip to content
Omnikalc

Diagnostic study sample size calculator

Enter the expected sensitivity and specificity, the precision wanted, the confidence level and the prevalence of the disease to get the number of people with and without the disease and the total to recruit.

Updated on

Educational tool, not medical advice: this page does not diagnose and does not replace a doctor, nurse or pharmacist. It has not been reviewed by a healthcare professional. Editorial and medical policy

Your inputs
%

Value out of range

%

Value out of range

points

Value out of range

%

Value out of range

Results

Total to recruit

355

A manageable study size
People with the disease needed
71
People without the disease needed
100
Total needed for the sensitivity
355
Total needed for the specificity
125
Which accuracy measure drives the size
1
The sensitivity (the number of cases) drives the size

The diagnostic study sample size calculator gives the number of people with and without the disease and the total to recruit to estimate a test’s sensitivity and specificity with a chosen precision.

How the calculation works

  • Enter the expected sensitivity and specificity.
  • Enter the precision, the confidence level and the prevalence.
  • The calculator gives the cases, the non-cases, the totals and the measure that drives the size.

Example

A new test is expected to have a sensitivity of 90 % and a specificity of 85 %. You want each within ±7 points at 95 % confidence, in a sample where 20 % have the disease. The cases needed: 1.96² × 0.9 × 0.1 / 0.07² = 71. The non-cases needed: 1.96² × 0.85 × 0.15 / 0.07² = 100. Dividing by the shares gives 355 and 125, so you recruit 355 people.

Why it matters

The calculator helps researchers who plan studies of diagnostic tests, medical students, and laboratories that validate a new assay.

Good to know

The expected sensitivity and specificity come from pilot data or the literature. If you are unsure, using 50 % gives the largest, most cautious size. The prevalence should be that of the people who will really be tested, since a test often performs differently in a hospital clinic and in the general population. The formula uses a normal approximation, which is poor when the expected value is near 0 % or 100 % or the numbers are small, and an exact method is then better. Remember that precision here is about the width of the interval, not about a hypothesis test. Report the design using the STARD guidelines.

The sensitivity and specificity calculator evaluates a test, the Bayes theorem calculator links prevalence and predictive values, the proportion confidence interval calculator brackets a proportion and the margin of error calculator sizes surveys.

Frequently asked questions

What does this calculator size?

It sizes a study that estimates the sensitivity and the specificity of a test with a chosen precision. Sensitivity is estimated among people with the disease and specificity among people without, so each needs its own number of people.

How is the size computed?

For a proportion P and a half-width d, the number is n = z² × P × (1 − P) / d². For sensitivity this gives the number of people with the disease, and dividing by the prevalence gives the total to recruit. The same holds for specificity with the share without the disease.

What if the disease is rare?

Then the total to find enough cases becomes very large. Studies often recruit cases and controls separately, which fixes the numbers of each group but then prevents estimating predictive values directly.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.