Free tool · Sample size

Sample size calculator for a prevalence (cross-sectional) study

Quick answer

For a cross-sectional study estimating a prevalence, use n = Z² × p × (1 − p) / d², where Z = 1.96 for 95% confidence, p is the expected prevalence from a previous study and d is the absolute precision. With p = 30% and d = 5%, n = 323; adding 10% for non-response gives 359 participants.

Minimum sample size
—

What each value means

  • Expected prevalence (p): the proportion you expect to find, taken from a published study in a similar population. Always cite the source in your synopsis. If nothing is published, use 50%: it gives the largest (safest) sample size.
  • Absolute precision (d): how close you want your estimate to be to the true value. ±5% is common. For a rare condition (p below 10%), a fixed ±5% is too wide, so use a relative precision such as 20% of p (for p = 30%, d = 6%, giving n = 225).
  • Confidence level (Z): 1.96 for 95%, the standard choice. 99% (Z = 2.576) needs a much larger sample.
  • Non-response: inflate n by dividing by (1 − expected non-response), e.g. n ÷ 0.9 for 10%.

Worked example

A resident wants to estimate the prevalence of anaemia among pregnant women attending the antenatal OPD. A similar study reported 30%. With 95% confidence and ±5% absolute precision:

n = 1.96² × 0.30 × 0.70 / 0.05² = 322.7 ≈ 323. Allowing 10% non-response: 323 ÷ 0.9 = 359.

Tightening precision to ±3% would need 897 participants, which is usually not feasible in a 2-year thesis window. Precision is the lever that most changes your sample size.

Small, known populations

If you are studying a small, fully known population (for example all 500 nursing staff in your hospital), apply the finite population correction: n = n₀ / (1 + (n₀ − 1)/N). For p = 50%, d = 5% and N = 500, n falls from 385 to 218. Enter the population size above and the calculator applies it.

Common mistakes the IEC will question

  • Taking p from a study in a very different population (e.g. a community study for a hospital-based thesis).
  • Using ±5% absolute precision for a prevalence under 10%.
  • Not citing the reference for p.
  • Forgetting to add for non-response or loss to follow-up.
  • Choosing a sample size you cannot reach in your data-collection window: check your OPD/IPD numbers first.

This calculator covers single-proportion (descriptive) studies. For comparing groups, use the two-proportions or two-means calculator. Diagnostic-accuracy, matched, cluster and survival designs need different formulas: ask us in your free review.

Frequently asked questions

What if no previous study reports the prevalence?

Use p = 50%. It gives the maximum sample size for a given precision, so your study is adequately powered whatever the true prevalence turns out to be. Say so explicitly in your methods.

Should I use absolute or relative precision?

Absolute precision (e.g. ±5%) suits prevalences between about 10% and 90%. For rare outcomes, use relative precision (e.g. 20% of p); otherwise the confidence interval can be wider than the estimate itself.

Is a convenience or consecutive sample acceptable for an MD thesis?

Consecutive sampling of all eligible patients during the study period is common and generally accepted in hospital-based theses. State it clearly and discuss the limitation on generalisability.

Can I just use 100 or 50 patients?

Only if you justify it. A number without a calculation is one of the most common reasons an IEC or university returns a synopsis. If feasibility limits you, calculate the precision your available sample gives and report that.

Written and reviewed by the Research Wing mentor team. Last updated 30 November 2026.