Minimum sample for group comparison
Sample size per group to compare two proportions or means (power, MDE)
Parameters
E.g. current conversion 20% → enter 20
Expected conversion after changes. Difference with group 1 = MDE
Equal variances in groups assumed
Assumptions and limitations
- Two-tailed test
- Equal group sizes
- For means — equal variances
In SurveyNinja, NPS, CSAT and more are calculated automatically. Create a survey in 5 minutes and get real-time analytics.
Start freeData is not stored — calculation runs in your browser.
Formulas
Two proportions
n per group ≈ (z_α/2 + z_β)² × (p₁(1−p₁) + p₂(1−p₂)) / (p₁−p₂)². z_α/2 for α=0.05 is 1.96, z_β for 80% power is 0.84.
Two means
n per group ≈ 2 × (z_α/2 + z_β)² × σ² / (μ₁−μ₂)². σ = common SD, (μ₁−μ₂) = difference in means (MDE).
Power and MDE
80% power — in 80% of cases the test will detect the given difference. MDE — minimum difference you want to detect. Smaller MDE requires larger sample.
When to use which mode
Proportions — for conversion, shares, % satisfied (A/B on conversion). Means — for continuous metrics: average order, time, scale score. After calculation check significance with a separate calculator.
Sample size planning examples
1 Proportions: A/B on conversion
2 Means: when to use "two means" mode
3 Small difference — large sample
4 CSAT of two segments
5 Strict criteria (α = 0.01, 90% power)
6 Average order: two channels
Frequently asked questions
When do you need per-group sample for comparison?
What is power?
What is MDE?
Why two modes — proportions and means?
Are group sizes equal?
How to estimate standard deviation for means?
How does this differ from the single-proportion sample size calculator?
After calculation how to check significance?
Automate your metrics
In SurveyNinja, NPS, CSAT and more are calculated automatically. Create a survey in 5 minutes and get real-time analytics.
Start free