Calculator
Sample size for a two-arm civic experiment.
The most common kind of civic pilot is a two-arm test of a behavior change — vaccination uptake, court attendance, benefits enrollment, tax compliance. This calculator tells you how many participants you need to detect the effect you care about, using the standard two-proportion z-test approximation that most regulators and IRBs expect.
Your trial
Outcome rate without the intervention (e.g. 20%).
The smallest absolute change you want to be able to detect, in percentage points.
Two-sided false-positive rate.
Probability of detecting a real effect of the chosen MDE.
Ratio of treatment-arm size to control-arm size. 1.0 = balanced.
Required sample size
2,188
total participants
1,094 control
1,094 treatment
To detect a shift from 20% to 25.0% with α=0.05 and 80% power.
Anchored examples
Click a preset to load realistic baseline and MDE values from a common civic-experiment class.
Share this scenario
How to use this
- Baseline rate is what currently happens — usually drawn from historical records (last year's vaccination rate in this clinic, last quarter's failure-to-appear rate in this court).
- MDE is the smallest absolute change you'd care about detecting. Be honest — a 0.5-percentage-point effect on a 30% baseline requires ~30× more participants than a 3-point effect. If you can't recruit enough to detect what matters, the experiment is not worth running.
- Power is the probability of finding a real effect. 80% is convention. 90% is what you want if a null result will be used to defend the status quo.
- Allocation only differs from 1.0 if the treatment is more expensive than control or if you need extra power in one arm for subgroup analysis.
What this calculator does not do
- Continuous outcomes (test scores, income, hours). For those, you need a different formula based on means and standard deviations.
- Clustered designs (randomize at the city or clinic level, measure individuals). Effective N is reduced by the intraclass correlation; this calculator will under-state the required sample.
- Multi-arm trials. For 3+ arms with pairwise comparisons, you need Bonferroni or similar correction on α; halve α and re-run for a rough adjustment.
Need help designing a pilot? Get in touch — study design review and power calculations are free for qualifying civic projects.