Sample Size Worksheet: Formulas & Worked Examples
A copyable one-share formula, four precision examples and a separate two-group power worksheet. See how valid responses translate into recruitment.

A sample size worksheet calculates how many valid human answers a study needs under stated assumptions. Plan one population share for precision or a difference between independent groups for power. The copyable spreadsheet formulas and worked examples below show which inputs to choose, how to round and why valid answers differ from recruitment invitations.
Sample size formula and spreadsheet row
For one population share, n₀ = z² × p × (1 − p) ÷ e². Here, z is the normal critical value, p is the expected share and e is the margin half-width. At 95% confidence, p = 0.50 and e = 0.05, round up to 385 valid answers.
Copy the tab-separated rows below into A1 of a blank Excel or Google Sheets sheet. A2–C2 hold the inputs and D2 calculates the large-population target. Keep the decimal inputs and cell positions shown.
Confidence Expected share Margin half-width Valid answers
0.95 0.50 0.05 =ROUNDUP(NORM.S.INV((1+A2)/2)^2*B2*(1-B2)/C2^2,0)
This quick row assumes simple random sampling and a large population. It does not apply the finite-population correction or plan a difference between groups. The separate worksheets below cover those calculations and explain their limits.
One share and one difference need different plans
“How many responses?” is incomplete until the study says what it must estimate or compare. One overall share needs a precision target. A difference between two independent randomized groups needs anticipated proportions, a decision-relevant effect and power. A paired task, several concept comparisons or a small segment decision needs a different plan.
If your decision concerns the share of buyers who understand instructions, choose how much uncertainty the recommendation can tolerate. If you are comparing offers, choose the smallest difference worth acting on before collection. Entering the observed gap afterward describes a different exercise and cannot turn an underplanned study into a prospectively powered one.
Use the spreadsheet worksheets below to calculate either target, then keep the inputs and result with the study brief. The formulas are copyable; this page presents the method and worked results rather than an embedded calculator.
Inputs for one population share
- Choose confidence: 90%, 95% or 99%, then enter the corresponding decimal in the worksheet.
- For a ±5-point target, enter 0.05; this means percentage points, rather than 5% of the estimated value. The worksheet input must be greater than 0 and less than 1.
- Enter the expected proportion as a decimal equivalent to a value strictly between 0% and 100%. Use the decimal equivalent of 50% when no defensible prior estimate exists; it maximizes the variance term in this formula.
- Leave population size blank for the large-population approximation, or enter a positive whole number for the entire eligible population sampled without replacement.
- Let the worksheet calculate the rounded-up completed-response requirement, and save its inputs.
A CRM list size is the appropriate population only when that list is the population for your claim. A list of 1,000 customers cannot shrink the sample requirement for a broader prospect population it does not cover.
Confidence describes the long-run performance of the interval procedure under the sampling assumptions; it is not the probability that the fixed population share lies in this particular completed interval. The worksheet uses a normal-approximation planning formula, so the achieved data and design still matter.
A five-point half-width means an interval extending about five percentage points on either side of a share estimate. At an estimate of 40%, that describes roughly 35% to 45%, rather than 38% to 42%. Save the units with the recorded inputs so another analyst can reproduce the plan.
The expected share controls the variance term p(1−p). Fifty percent is conservative within this formula because that term reaches its maximum at 0.5. A lower requirement based on a confident prior share needs evidence relevant to this population, stimulus and measure. An attractive prior from a different task can create false economy.
Example: precision targets at 95% confidence
All four examples use 95% confidence and an expected share of 50%:
Half-width | Details |
|---|---|
±5 points | Eligible population: Large/unspecified Valid answers: 385 |
±5 points | Eligible population: 1,000 Valid answers: 278 |
±3 points | Eligible population: Large/unspecified Valid answers: 1,068 |
±10 points | Eligible population: Large/unspecified Valid answers: 97 |
Changing the margin from five points to three multiplies the unrounded requirement by (5/3)², about 2.78. Halving it multiplies the requirement by four. A slightly narrower interval can therefore need much more fieldwork.
The 278 example is different: it uses a finite population of 1,000 sampled without replacement. Use that adjustment only when those 1,000 units are the entire eligible population for the intended claim.
The one-share formula and finite-population adjustment
For a large population, n₀=z²×p×(1−p)/e². With z approximately 1.959964, p=0.50 and e=0.05, n₀ is approximately 384.146. Round upward to 385 completed valid answers. Use fractions for proportions and half-widths.
For an entire finite population N sampled without replacement, n=n₀/[1+(n₀−1)/N]. With N=1,000, the unrounded result is approximately 277.73; round the final adjusted requirement upward to 278. Keep the large-population estimate unrounded until after the finite-population correction, then round the final result up.
The Penn State sampling lesson derives the one-share formulas. They are conditional normal approximations, not exact interval guarantees for every possible proportion and sample. The worksheet’s worked outputs can be checked from the formula independently of its interface.
Power plans a difference worth detecting
The comparison worksheet plans one binary outcome in two different independent groups with equal allocation. At 50% versus 60%, two-sided alpha 0.05 and 80% power, the approximation gives about 387.34 per group. Round up to 388 per group before doubling to 776 total. The overall one-share target of 385 would not plan this comparison.
Alpha is the selected false-positive rate for the planned test under its assumptions. Power is the chance of detecting the specified difference when those anticipated proportions apply. They answer different questions from the half-width of one estimate. A study can estimate an overall share reasonably while lacking the ability to distinguish a small between-group effect.
Independent-group formula and its approximation
For p̄=(pA+pB)/2, n per group = [z(1−α/2)√(2p̄(1−p̄)) + z(power)√(pA(1−pA)+pB(1−pB))]² ÷ (pA−pB)². Proportions are fractions.
This is the dominant-tail normal approximation described in the statsmodels documentation. It ignores the negligible far tail in the common two-sided setting; it is not an exact binomial calculation. The formula adds neither a continuity nor a finite-population correction to this comparison.
Record the calculation, both planned proportions, power, alpha, per-group requirement and total in your study brief. Keep them beside our monadic price-test plan. Unequal allocation, paired answers and multiple comparisons require separate design work.
The decision may depend on a segment or shared unit
The one-share calculation assumes the stated simple random sampling setting. The comparison calculation assumes independent observations, equal cells and one planned binary difference. Neither automatically accounts for clustering, weighting, coverage, nonresponse or small subgroup decisions.
Plan each segment that needs a separate precise result. A large total may contain too few answers from the critical group. When people share a household or buying account, decide whether the claim concerns the person or shared unit before treating them as independent observations.
An opt-in panel or convenience sample does not inherit simple-random-sample coverage merely because the arithmetic produces a target. Increasing responses can reduce some variability while leaving systematic participation or measurement error. Keep the achieved sampling design and limitations beside the number.
Valid answers and invitations are different targets
A hypothetical study needing 385 valid answers at 50% completion requires about 770 eligible invitations if every completed questionnaire supplies a usable primary answer. That is an arithmetic illustration, not a forecast of your response rate. Ineligibility and item missingness introduce additional losses.
Report invited, qualifying, completed and valid-primary-answer counts separately. Use suitable prior evidence for expected rates and monitor important groups. More invitations may increase volume without fixing unequal participation. Do not quietly relax entry rules or drop a difficult group to fill the total.
Save the plan and compare actual answer counts and exclusions with it. If collection stops below target, report the resulting uncertainty or analysis limit. The planned number is not completed fieldwork.
Generated record counts need a different validation question
Creating 10,000 generated records does not create 10,000 independently sampled humans. Shared model, prompt and grounding choices can produce error that neither calculator mode measures. A human survey margin of error cannot be transferred to a simulated population by inserting its generated row count.
For simulated comparisons, check relevant validation against suitable human evidence and sensitivity to reasonable audience setups. For human studies, complete the sampling and measurement plan before recruitment. This worksheet returns a conditional target tied to a research question, not a guarantee for every design.
Copy the data: sample size worksheets
Copy each tab-separated block into A1 of its own blank spreadsheet sheet. The label goes in column A and the input or formula in column B. Use Excel or Google Sheets functions with decimal points and comma-separated arguments; adapt separators if your spreadsheet locale requires them. Keep the cell positions unchanged.
One-share worksheet
Enter confidence as 0.90, 0.95 or 0.99; use fractions for expected share and half-width. Both must be strictly between 0 and 1. Leave B4 blank for a large population, or enter the positive whole-number population for the eligible units sampled without replacement. The starting values produce 385 valid answers; setting B4 to 1000 produces 278.
Confidence 0.95
Expected share 0.5
Half-width 0.05
Population
z =NORM.S.INV((1+B1)/2)
Large-population n =B5^2*B2*(1-B2)/B3^2
Adjusted n =IF(B4="",B6,B6/(1+(B6-1)/B4))
Valid answers =MAX(1,ROUNDUP(B7,0))
Two-group worksheet
On a separate sheet, enter confidence as 0.90, 0.95 or 0.99 and power as 0.80, 0.90 or 0.95. Both planned shares must be strictly between 0 and 1 and must differ. The starting values produce 388 per group and 776 total. Equal shares give a zero denominator and have no finite detection target under this formula. Do not substitute a different comparison design into these cells.
Confidence 0.95
Power 0.8
Share A 0.5
Share B 0.6
Mean share =(B3+B4)/2
z alpha =NORM.S.INV((1+B1)/2)
z power =NORM.S.INV(B2)
Unrounded per group =(B6*SQRT(2*B5*(1-B5))+B7*SQRT(B3*(1-B3)+B4*(1-B4)))^2/(B3-B4)^2
Valid per group =ROUNDUP(B8,0)
Valid total =2*B9
Before relying on either result, check the anticipated success and failure counts in each relevant cell. Small expected counts, often fewer than ten, call for a more suitable exact or simulation-based design. The spreadsheet arithmetic does not check coverage, dependence, response bias or a missing subgroup plan for you.
The planning record
Record | What to save |
|---|---|
Question and unit | The primary measure, target human population, sampling unit and intended decision |
One share | Confidence, expected share, half-width in percentage points, eligible finite population if used, unrounded requirement and rounded valid-answer target |
Two independent groups | Both anticipated shares, two-sided alpha, power, equal allocation, unrounded per-group requirement, rounded per-group and total targets |
Recruitment | Assumed eligibility, completion and valid-primary-answer rates with their evidence; planned and achieved bases |
Limits | Sampling/design assumptions, exclusions and any additional subgroup, clustering, weighting or multiple-comparison work required |
Save a copy of the sheet for each agreed plan. The formulas let a colleague reproduce the conditional target; the record explains what that target is intended to support.
Two decisions sit outside the spreadsheet arithmetic:
- Use our research sampling guide to check the population, frame and selection route the calculation assumes.
- Use our quantitative research guide to define the measure and valid response base.
For a simulated price or concept comparison, book a demo to discuss what data should support the audience and how to check the comparison before acting on a difference between simulated groups.


