# Sample Size Calculator for a Proportion

> Free sample size calculator for estimating a prevalence or proportion. Choose the expected proportion, margin of error and confidence level, with an optional finite population correction, and get a sentence for your methods section and R code.

Canonical: https://biostatkit.com/sample-size-proportion

Find how many participants you need to estimate a prevalence with a chosen margin of error. You get the number, the expected 95% CI, a sentence for your methods section, and the R code.

## Methods wording

The sample size for estimating a single proportion was calculated with BiostatKit [1] using the formula of Cochran [2].

Method: Cochran formula for one proportion with optional finite population correction.

## Frequently asked questions

### What if I do not know the expected proportion?

Use 50%. It gives the largest sample, so you are safe. A pilot study or a published study in a similar population gives a better, smaller number.

### When do I use the finite population correction?

When the sample is more than about 5% of the population, for example 400 of 2,000 hospital patients. For a large or unknown population leave it empty.

### Why is the answer rounded up?

A sample of 384.2 people does not exist, and rounding down would leave you with less precision than you planned.

### Is my data stored or sent anywhere?

No. All calculations run in your browser tab. Nothing is uploaded, and the page works offline once loaded.

## Related calculators

- [Odds ratio calculator](https://biostatkit.com/odds-ratio)
- [Sensitivity and specificity calculator](https://biostatkit.com/sensitivity-specificity)

Author: TS.BS. Vũ Duy Kiên (https://www.vuduykien.com)
