Sampling/
Case-Control Study
Sample Size Estimation, Other Study Designs
How to Calculate Sample Size for a Case-Control Study
A case-control study compares exposure rates between people who have an outcome and similar people who do not. This guide explains the underlying statistics first, then shows how to apply them using AnalyZ Solutions.
6 min read
Sample Size Estimation
Intermediate
A case-control study compares people who already have an outcome, the cases, with similar people who do not, the controls, looking backward to identify factors associated with the outcome. It is a common design in health research, especially when the outcome is rare or has already occurred by the time the study begins. This guide first explains the general formula behind the calculation, then walks through how to apply it in AnalyZ Solutions.
01The general sample size formula
Case-control is defined by binary case and control status, so the calculation works with a binary exposure and an odds ratio, using the Kelsey formula.
ncases = (Z1−α/2√((1+1/k)p̄q̄) + Z1−β√(p₁q₁+p₀q₀/k))2 / (p₁−p₀)2
The exposure rate among cases is derived from the exposure rate among controls and the odds ratio you want to be able to detect:
p₁ = (OR × p₀) / (1 − p₀ + OR × p₀)
Choosing your confidence level and power
Confidence level and power are judgment calls, not fixed rules, and they deserve as much thought as the odds ratio you are trying to detect.
Confidence level reflects how willing you are to risk a false alarm, concluding an association exists when it actually does not. 95% is the standard default. A higher level, such as 99%, is worth considering before a costly or hard to reverse conclusion, such as recommending a policy change based on the finding.
Power reflects how willing you are to risk missing a real association entirely. 80% power is the conventional minimum. 90% power is worth considering when a missed association could have serious consequences, such as in the study of a potential health risk.
Undermining either value carries a real cost. A confidence level set too low increases the risk of reporting an association that is actually just noise. Power set too low means a genuine association has a meaningful chance of going undetected, an outcome that is difficult to distinguish afterward from there being no association at all. Once data collection is complete, there is no way to fix this after the fact.
This tool assumes a binary exposure. If the exposure is continuous, for example comparing mean age or income between cases and controls, that is a different comparison, equivalent to a two-sample t-test, found under Power Analysis rather than here.
How to Calculate This in AnalyZ Solutions
- Set confidence and power. Enter both as numbers.
- Enter the exposure rate among controls. Your best estimate of how common the exposure is in people without the outcome.
- Enter the odds ratio you want to be able to detect. A larger odds ratio is easier to detect and requires fewer cases.
- Set the number of controls per case. One to four is typical. Gains beyond a ratio of four to one are small.
- Choose one-tailed or two-tailed. Two-tailed is selected by default.
- Set a design effect, if sampling by cluster. Defaults to 1 and is always editable.
VIDEO WALKTHROUGH PLACEHOLDER, 90 SECONDS
A short screen recording showing these steps in the AnalyZ Solutions interface can be embedded here.
02Worked example
A study is assessing a possible risk factor for a health outcome. Exposure among controls is estimated at 20%, and the study should be able to detect an odds ratio of 2.5, using two controls per case, at 95% confidence and 80% power, two-tailed.
Inputs
Confidence level95%
Power80%
Exposure rate in controls20%
Odds ratio to detect2.5
Controls per case2
Test typeTwo-tailed
~69
cases required, 138 controls
03Common mistakes to avoid
- Assuming more controls always helps proportionally. Gains beyond about four controls per case are small, and additional cases are usually a more efficient use of the same budget.
- Using this formula for a matched design. The Kelsey formula assumes an unmatched design. Matched case-control studies require a conditional logistic regression approach instead.
- Forcing a continuous exposure into this tool. If exposure is continuous rather than binary, use the two-sample t-test tool under Power Analysis instead.
Frequently Asked Questions
What if my study is matched, for example each case paired with a control of the same age and sex?
This tool assumes an unmatched design. For a matched case-control study, sample size should be calculated using a conditional logistic regression approach, which accounts for the matching directly.
How many controls per case should I use?
One to four is typical. Power gains beyond a ratio of about four to one are small, so beyond that point it is usually more efficient to recruit additional cases rather than additional controls.
Can I detect a protective association, an odds ratio below 1, with this tool?
Yes. Enter the odds ratio as a value below 1, for example 0.5, and the calculation proceeds the same way.
Ready to size your study?
Open the Case-Control tool in AnalyZ Solutions. Free, browser based.
Try it out
Related Guides