Sample Size Margin of Error Calculator
Computes minimum sample size for a proportion given desired margin of error and confidence level z score using standard formula.
—
Sample size from margin of error
When you're estimating a proportion in an infinite population, the sample size you need comes from n = z² · p · (1−p) / E². Here z is the critical value of the confidence interval (1.96 for 95%, 2.576 for 99%), p is the expected proportion, and E is the margin of error you're willing to accept. When you have no idea what the proportion is, set p to 0.5, which gives the most conservative number. Say you want 95% confidence with E = 3% and p = 0.5; that works out to n ≈ 1,067. The 2,000-respondent polls Datafolha usually runs land at a margin of around ±2.2 percentage points.
Applications
Electoral polls (Datafolha, IBOPE/Ipec, Quaest). Household and labor surveys such as the IBGE PNAD. Market research, customer satisfaction tracking with NPS, public health surveillance, and figuring out how many users an A/B test really needs.
FAQ
Why use p = 0.5? The product p · (1−p) peaks at 0.5, so that value gives the largest n. When you don't know the real proportion, that's the safe upper bound to plan around.
Does the population size matter? Only when the population is finite. Once n climbs above roughly 5% of N, apply the finite population correction (FPC).
95% or 99% confidence? More confidence costs you a bigger sample. Move from 95% to 99% and n grows by roughly 70%.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.