Free tool · research methodology

Sample size calculator for MD/MS thesis

Size a cross-sectional survey, a case-control study or a two-group trial. Every step of the calculation is shown, and you get a paragraph you can paste straight into your protocol.

Cochran's formulaTwo proportionsTwo meansNon-response & design effectFree with a Google sign-in
What is your study trying to do?
%
%
Precision is

Take p from a published study in a similar population. With no estimate at all, 50% gives the largest, most conservative sample.

%

Which formula should you use?

The formula follows from what your primary objective measures. Size the study for the primary objective only — secondary objectives ride along.

Your primary objectiveFormulaTypical thesis
Estimate a prevalence
n=Z2 · p · (1 − p)d2
Prevalence of anaemia among adolescent girls
Estimate a mean
n=Z2 · σ2d2
Mean haemoglobin in pregnant women
Compare two proportions
n1=(Zα/2 + Zβ)2 · [p1(1 − p1) + p2(1 − p2)r](p1 − p2)2
Case-control study of a risk factor
Compare two means
n=2 ·((Zα/2 + Zβ) · σΔ)2
Two drugs compared on blood pressure

Z is 1.96 for 95% confidence. For comparative studies, Zβ is 0.84 for 80% power and 1.28 for 90% power. Comparing 40% with 25% at 80% power needs 150 per group; detecting a 0.5-unit difference in means with a standard deviation of 1.2 needs 91 per group.

Choosing p, the anticipated prevalence

The value of p must come from somewhere an ethics committee can check: a published study in a population like yours, cited in the protocol. Prefer Indian data, the same age group, and the same setting — a hospital-based prevalence can be far higher than a community one.

If nothing usable exists, use p = 50%. It maximises p(1 − p), so it gives the largest sample size — at ±5% and 95% confidence that is 385 — and no reviewer can say the study is too small.

Absolute or relative precision?

Absolute precision is a fixed number of percentage points: an estimate of 30% ± 5%. With p = 30%, that needs 323 participants.

Relative precision is a fraction of p itself: 20% relative precision around 30% is ± 6 points, which needs 225. Use relative precision for rare conditions. An absolute ±5% around a 3% prevalence would allow the true value to be anywhere from 0% to 8%, which estimates nothing.

Adjusting for non-response

Some participants will refuse, drop out or return incomplete forms, so recruit more than the formula's minimum. The correct adjustment divides:

nfinal=n1 − non-response rate

For 323 and 10% non-response, that is 323 ÷ 0.90 = 359. The common shortcut — multiplying by 1.10 — gives 356, and if 10% of those drop out you are left with 320, below the 323 your own calculation required.

Cluster sampling and the design effect

Community surveys often sample villages, wards or schools rather than individuals. People in the same cluster resemble each other, so each one adds less information, and the sample must be inflated by the design effect. Justify the value you use from a similar published survey; a design effect of 2 is common in community studies. With a design effect of 2 and 10% non-response, the 323 above becomes 718.

If your whole population is small and known — every patient registered at one clinic — enter it as the population size, and the finite population correction will reduce the sample accordingly.

Writing it in your protocol

An ethics committee reviewer wants four things in the sample size section:

  1. the formula, named and written out;
  2. the value and source of every input, with a reference for p or σ;
  3. the calculation, rounded up to a whole participant;
  4. every adjustment — non-response, design effect — and the final number.

The calculator writes that paragraph for you. Replace the bracketed reference with your own before you submit.

Frequently asked questions

What sample size do I need for a cross-sectional MD thesis?

It depends on the prevalence you expect and how precisely you want to estimate it. With an anticipated prevalence of 30% and a precision of ±5% at 95% confidence, Cochran's formula gives 323; with no prior estimate, using 50% gives 385. Add non-response on top.

Should I use absolute or relative precision?

Absolute precision is a fixed number of percentage points (±5%). Relative precision is a fraction of the prevalence itself (20% of 30% is ±6 points). For a prevalence of 30%, ±5% absolute needs 323 people and 20% relative needs 225. For rare conditions, use relative precision — an absolute ±5% around a 3% prevalence is meaningless.

Where does the value of p come from?

From a published study in a population as similar to yours as possible — ideally Indian, the same age group and setting — and you must cite it in the protocol. If no estimate exists, use 50%, which gives the largest and most conservative sample.

How do I add non-response to the sample size?

Divide by (1 − non-response rate), rather than multiplying by (1 + rate). For 323 and 10% non-response that gives 359; multiplying gives 356, and 90% of 356 is only 320 completed participants — fewer than the 323 the formula required.

Is this the same calculation Pythesis uses in its protocols?

Yes. The calculator uses the same formulas as the Pythesis Protocol Maker, so the number here matches the one the generated protocol prints for the same inputs.

Need the whole protocol, not just the sample size?

Pythesis Protocol Maker builds the complete package for your ethics committee — objectives, methodology, this sample size calculation, the participant information sheet, the consent form and the data collection proforma.