Use the Basic Sample Size tab to compute an unadjusted (simple random sample) sample size for estimating a population proportion. If you are using cluster sampling, use the Cluster Design Effect tab to inflate that unadjusted sample size using a design effect and estimate the number of clusters needed.

Cluster Sample Size Calculator

Basic Sample Size
Cluster Design Effect

Enter any 3 values to calculate the missing variable. Note: if solving for p, both p and 1 − p satisfy the equation; this tool returns the smaller solution (≤ 0.5).


Related Calculators

Cluster Sample Size Formula

The unadjusted (simple random sampling) sample size for estimating a single population proportion uses the standard proportion formula. For cluster sampling, you typically inflate that unadjusted sample size by a design effect and then convert the total sample size to a number of clusters.

\begin{aligned}
n_0 &= \frac{Z^2 \, p(1-p)}{E^2} \\
DEFF &= 1 + (m-1)\,ICC \\
n &= n_0 \cdot DEFF \\
\text{Clusters} &= \left\lceil \frac{n}{m} \right\rceil
\end{aligned}

Variables:

  • n0 is the unadjusted sample size (simple random sample) for estimating a proportion
  • n is the adjusted total sample size after accounting for clustering
  • Z is the z-score for the chosen confidence level
  • p is the expected population proportion (0 to 1); if unknown, p = 0.5 is a common conservative choice
  • E is the desired margin of error (half-width) in proportion units (e.g., 0.05)
  • m is the average cluster size (average number of subjects per cluster)
  • ICC is the intra-cluster correlation coefficient (typically between 0 and 1)
  • DEFF is the design effect (the inflation factor due to clustering)
  • Clusters is the number of clusters required (rounded up to a whole cluster)

To calculate an unadjusted sample size, multiply the square of the z-score by the population proportion and its complement, then divide by the square of the margin of error. For cluster sampling, multiply that unadjusted sample size by the design effect and round up to determine a total sample size; then divide by the average cluster size and round up to get the number of clusters.

What is a Cluster Sample Size?

A cluster sample size is the total number of individual observations needed when sampling units in groups (clusters), such as schools, households, clinics, or villages. Because observations within the same cluster are often correlated, cluster sampling generally requires a larger total sample size than simple random sampling to achieve the same margin of error. A common way to account for this is to inflate an unadjusted (simple random sample) size by a design effect based on the average cluster size and the intra-cluster correlation coefficient (ICC).

How to Calculate Cluster Sample Size?

The following steps outline how to calculate the Cluster Sample Size.


  1. Determine the z-score (Z) based on the desired confidence level.
  2. Choose the expected population proportion (p). If you do not have a prior estimate, p = 0.5 is commonly used as a conservative assumption.
  3. Choose the desired margin of error (E) in proportion units (e.g., 0.05 for ±5 percentage points).
  4. Calculate the unadjusted sample size using n0 = (Z2 · p · (1 − p)) / E2, then round up to the next whole number.
  5. If using cluster sampling, select an average cluster size (m) and an ICC, then compute the design effect: DEFF = 1 + (m − 1) · ICC.
  6. Compute the adjusted total sample size n = ceil(n0 · DEFF), then compute the number of clusters as ceil(n / m).
  7. After inserting the values and calculating the result, check your answer with the calculator above.

Example Problem : 

Use the following variables as an example problem to test your knowledge.

Z-Score (Z) = 1.96 (95% confidence)

Population Proportion (p) = 0.5

Margin of Error (E) = 0.05

Unadjusted sample size: n0 = (1.962 · 0.5 · (1 − 0.5)) / 0.052 = 384.16, so round up to 385.

If you plan to use cluster sampling with an average cluster size m = 10 and ICC = 0.02, then DEFF = 1 + (10 − 1) · 0.02 = 1.18. The adjusted sample size is n = ceil(385 · 1.18) = 455, which corresponds to ceil(455 / 10) = 46 clusters.