Stratified Sampling

Calculate Stratified Sampling instantly with the exact formula and a worked example.

Stratified Sampling

Total sample size n
Stratum size N_h
Population size N
Sample size from the stratum
100
Calculate Stratified Sampling instantly with the exact formula and a worked example.
Exact value
100
Stratum share
25%
Sampling fraction n/N
4%

This calculator splits your total sample across strata in proportion to their size, so each subgroup appears in the sample in the same share as in the population.

How the calculation works

Stratified sampling divides a population into non-overlapping groups such as region, age band, gender or customer type, and samples each group separately. The calculator applies proportional allocation as described in standard texts like W. G. Cochran's Sampling Techniques: n_h = n × N_h / N.

Inputs: n is the total sample size you have already decided on (for example from a target margin of error); N_h is the size of the stratum you are working on; N is the total population. The main result is the number of units to draw from that stratum, rounded to a whole number. You also see the exact unrounded value, the stratum share N_h / N in percent, and the sampling fraction n / N, the share of the population that ends up in the sample.

To allocate the whole sample, repeat the calculation for each stratum. If N_h exceeds N, the stratum share is capped at 100% and a warning tells you to check the data.

Worked example

Defaults: total sample n = 400, stratum size N_h = 2,500, population N = 10,000. The stratum makes up 2,500 / 10,000 = 25% of the population, so you draw 400 × 0.25 = 100 units from it. The sampling fraction n / N is 4%, i.e. one in every 25 people.

Things to keep in mind

  • Rounded stratum sizes may not add up exactly to n. A common fix is the largest-remainder method: give the extra unit to the stratum with the biggest fractional part.
  • Proportional allocation works best when variability is similar across strata. If one stratum is far more variable, Neyman allocation (n_h proportional to N_h × S_h) is more efficient.
  • Small strata may get only a handful of cases. If you need separate estimates for them, oversample and apply weights in the analysis.
  • Select units at random within each stratum; stratifying does not protect against a biased selection inside the group.

More about: Stratified Sampling

What it calculates

The “Stratified Sampling” calculator computes Sample size from the stratum from 3 parameters: total sample size n, stratum size n_h, population size n.

A core calculation for studying, engineering tasks, and checking solutions.

Example calculation

With parameters Total sample size n = 400, Stratum size N_h = 2,500, Population size N = 10,000 the result is 100.

How to use

  1. Enter total sample size n, stratum size n_h and population size n — each field above is adjustable with a slider.
  2. Sample size from the stratum is calculated automatically as you type.
  3. Check the worked example below to see the formula applied to real numbers.
  4. Copy the result or bookmark this calculator.

Related calculators

FAQ

Why stratify instead of simple random sampling?
It guarantees each subgroup is represented in its true proportion and, when strata are internally homogeneous, reduces the standard error of estimates.
How do I choose the total n?
Separately, from your desired margin of error and confidence level, for example with Cochran's sample-size formula. This tool only distributes a given n.
What if I have many strata?
Run the calculation for each one with the same n and N, then check that the n_h values sum to n.
What is the sampling fraction?
n / N, the proportion of the population included. Under proportional allocation it is the same in every stratum.

More calculators in this category

Explore related free tools

Special Right Triangles (30-60-90, 45-45-90)Numerical DerivativeHigher-Order DerivativeImplicit DifferentiationDefinite IntegralRiemann SumSimpson's RuleLimitCritical Points (Extrema)Inflection PointsVolume of RevolutionDerangements (!n)