Skip to main content
v2026.11,858 entries · CC-BY 4.0

What Is a Good Sample Size for a Quantitative Study? Formula and Worked Example

A good sample size meets your precision or power target. Formulas, worked arithmetic and code for finding it.

Written and maintained by CASRAI Editorial Board

Last updated

There is no single good sample size for a quantitative study. The number comes from what the study has to achieve: either an estimate that lands within a chosen margin of error, or a test that detects a difference of a stated size with a stated probability. Fix those targets, and a formula gives the minimum sample size. Rules of thumb are not a substitute for that calculation.

Short answer: what is a good sample size for a quantitative study?

A good sample size is the smallest one that meets the precision or power target you set before collecting data. Two situations cover most quantitative work:

  • Estimating a quantity (a mean or a proportion): the sample size is set by the margin of error you can accept and the variability of the measurement.
  • Comparing groups or testing a hypothesis: the sample size is set by the significance level (α), the power (1 − β) and the smallest effect worth detecting. See power analysis and sample size calculation for the full treatment.

Definition in one paragraph

Sample size (N, or n per group) is the number of observations a study analyses. In a priori planning it is the minimum number that makes the study’s primary estimate or test meet a stated precision or power requirement, given assumptions about variability and effect size. It is chosen before data collection, and it is a design decision, not a property of the data. For how participants are drawn, see sampling methods.

Formula for precision: sample size from a margin of error

The NIST/SEMATECH e-Handbook of Statistical Methods (section 7.2.2) gives the minimum sample size for estimating a mean to within a chosen error. For 95 % confidence:

N ≥ (1.96 / δ)² × σ²

  • N: the minimum sample size.
  • σ: the population standard deviation. NIST’s restriction is that the standard deviation must be known, so in practice you substitute a value from earlier work or a pilot study (see pilot study).
  • δ: the margin of error, so the interval is the sample mean ± δ.
  • 1.96: the standard normal value z at 0.975, which gives the 95 % confidence level.

The handbook derives this from δ = (σ / √N) × z, which guarantees the error of estimation is less than δ with a probability of 95 %.

Formula for power: sample size from alpha, power and effect size

For a test, the sample size depends on α, power (1 − β) and the size of the difference you want to detect. NIST section 7.2.4 gives the two-sided test of a proportion:

N ≥ ( ( z1−α/2 √(p₀(1 − p₀)) + z1−β √(p₁(1 − p₁)) ) / δ )²

  • p₀ is the proportion under the null hypothesis and p₁ the proportion you want to be able to detect.
  • δ = |p₁ − p₀|, the difference to detect.
  • z1−α/2 and z1−β are standard normal quantiles; power equals 1 − β.

For a difference between two means, most researchers use software rather than a hand formula, because the exact calculation uses the t distribution. R’s power.t.test and G*Power both do this; the worked example below solves one design in each.

Worked example with real numbers

Example 1: precision for a mean

A lab wants to estimate a mean to within δ = 2 units with 95 % confidence, and earlier measurements suggest σ = 10.

N ≥ (1.96 / 2)² × 10² = 0.98² × 100 = 0.9604 × 100 = 96.04. Sample sizes are whole numbers and the requirement is a minimum, so round up: N = 97.

Example 2: power for two independent groups

A researcher wants 80 % power at α = 0.05 (two-sided) to detect a 5-point difference between two group means when the standard deviation is 10, a standardised difference of 0.5. The design is solved three ways:

Method Input Result
R power.t.test delta = 5, sd = 10, sig.level = 0.05, power = 0.80 63.77, so 64 per group
G*Power, a priori, t test for two independent means d = 0.5, α = 0.05, power = 0.80, allocation ratio 1 64 per group, 128 in total
Normal approximation in a spreadsheet 2 × (1.96 + 0.8416)² × (10 / 5)² 62.8, so 63 per group

The normal approximation is one participant short because it ignores the extra uncertainty from estimating the standard deviation. At n = 64 per group the exact t-based power is about 0.80; at n = 63 it falls just under, at about 0.795. Use the t-based answer, 64 per group, and round up.

Example 3: power for a proportion

To detect a change from p₀ = 0.50 to p₁ = 0.60 with α = 0.05 (two-sided) and 80 % power, using the NIST formula: z1−α/2 = 1.96 and z1−β = 0.8416. The numerator is 1.96 × √0.25 + 0.8416 × √0.24 = 0.98 + 0.4123 = 1.3923. Divide by δ = 0.10 to get 13.923, and square it: 193.8. Round up to N = 194. NIST also recommends a continuity correction, N = N′ + 1/δ, where N′ is the value from the formula; here that adds 1/0.10 = 10, giving 204 if you apply it.

Interpretation: how the result changes with your assumptions

The sample size is only as credible as the inputs. These values come from the arithmetic above and show how sensitive N is.

If you change this With σ = 10, 95 % confidence, N from the precision formula
Margin of error δ = 1 (1.96 / 1)² × 100 = 384.16, so N = 385
Margin of error δ = 2 96.04, so N = 97
Margin of error δ = 4 (1.96 / 4)² × 100 = 24.01, so N = 25

Halving the margin of error roughly quadruples the required sample. For power, the same pattern holds for the effect you hope to detect. For a two-sided, two-group t test at α = 0.05 and 80 % power, exact t-based calculation gives:

Standardised difference (d) n per group
0.5 64
0.75 29
1.0 17
1.5 9

For d = 1 the R documentation’s own example, power.t.test(power = .90, delta = 1), targets 90 % power instead, which needs more participants than the 80 % figure above. Choosing a realistic effect size is the hardest input; the guide to sensitivity power analysis covers working backwards from a fixed sample.

Assumptions and common mistakes

  • Treating σ as known. The NIST formula requires the standard deviation, so an optimistic guess gives a sample that is too small.
  • Mixing up per-group and total n. In R’s power.t.test, n is the number of observations per group. A two-group design needs twice that in total.
  • Forgetting to round up. The result is a minimum. 96.04 means 97, not 96.
  • Counting enrolled instead of analysable participants. If you expect dropouts or exclusions, plan for them separately from the calculated N.
  • Powering for one test and analysing another. The calculation applies to the primary statistical test; a different analysis needs its own calculation. Regression has its own considerations, covered in events per variable and minimum sample size for regression.
  • Trading off error rates silently. Changing α or power changes N. See Type I and Type II errors.

How to report it (APA example)

State the test, α, power, the effect size and where it came from, the software, and the resulting number:

An a priori power analysis for an independent-samples t test (two-tailed, α = .05, power = .80, d = 0.50) indicated that 64 participants per group (N = 128) were required. The analysis was run in G*Power 3.1 (Faul et al., 2007).

For a precision-based plan: “To estimate the mean within ±2 units with 95 % confidence, assuming σ = 10 from earlier measurements, at least 97 observations were required.” For how this fits a grant or protocol, see sample size justification for a grant or protocol.

How to calculate it in Excel, R or Python

Excel (precision example)

=ROUNDUP((NORM.S.INV(0.975)/2)^2*10^2, 0)

Returns 97 for δ = 2 and σ = 10. For the two-group normal approximation: =ROUNDUP(2*(NORM.S.INV(0.975)+NORM.S.INV(0.8))^2*(10/5)^2, 0) returns 63, which is the approximation noted above; use R or G*Power for the t-based 64.

R (two-group power)

power.t.test(delta = 5, sd = 10, sig.level = 0.05, power = 0.80,
             type = "two.sample", alternative = "two.sided")
# n = 63.77  ->  use 64 per group

Exactly one of n, delta, power, sd and sig.level must be left as NULL; that is the one R solves for.

Python (precision example, standard library only)

import math
from statistics import NormalDist

z = NormalDist().inv_cdf(0.975)   # 1.96
sigma, delta = 10, 2
n = math.ceil((z / delta) ** 2 * sigma ** 2)
print(n)   # 97

G*Power is a free program for power analyses of t tests, F tests, chi-square tests, z tests and some exact tests, and it graphs the results.

FAQ

What is a good sample size for a quantitative study?

It is the minimum that meets your precision or power target. For a mean with σ = 10 and a margin of error of 2 at 95 % confidence, that is 97; for a two-group comparison of a medium difference (d = 0.5) at 80 % power it is 64 per group.

Is there a minimum number that always works?

No. The required number moves with variability, margin of error, α, power and effect size, as the tables above show.

Should I round up or down?

Always up. The formula returns a minimum.

Where do I get the standard deviation before I have data?

From earlier studies of the same measure or from a pilot study; the NIST formula assumes it is known.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about What Is a Good Sample Size for a Quantitative Study? Formula and Worked Example

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.