Stratified Sampling
Calculate Stratified Sampling instantly with the exact formula and a worked example.
Stratified Sampling
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
- Enter total sample size n, stratum size n_h and population size n — each field above is adjustable with a slider.
- Sample size from the stratum is calculated automatically as you type.
- Check the worked example below to see the formula applied to real numbers.
- Copy the result or bookmark this calculator.
Related calculators
FAQ
Why stratify instead of simple random sampling?
How do I choose the total n?
What if I have many strata?
What is the sampling fraction?
More calculators in this category
Explore related free tools