Sample Size Calculator

Estimate the sample size needed for an entered confidence and error margin. Enter your own values below to see minimum sample size and check the method behind it.

All calculators

Your inputs

Change the example values to match your situation.

Your result

Let’s work it out.

Fill in your inputs and select Calculate.
Your result and breakdown will appear here.

How this calculator works

Cochran’s proportion sample size n₀ = z²p(1−p)/e², with finite population correction when a population size is provided.

What is Sample Size Calculator?

Sample Size Calculator helps you estimate the sample size needed for an entered confidence and error margin.

The main result is minimum sample size. The formula, example and assumptions below explain how to interpret it.

How to use Sample Size Calculator

Use the example to get familiar with the form, then enter your own figures. Any rates in the example are illustrative. Check the field labels and units before calculating.

  1. Gather desired margin of error (%), expected proportion (%), confidence level and population size (0 = very large). Use values from the same situation or reporting period.
  2. Replace the example desired margin of error with your own value, then complete the other fields. Check the displayed units and each selected option.
  3. Select Calculate and read minimum sample size. Change one input and calculate again to compare a second scenario. Reset restores the original example.
  • Enter desired margin of error in %, at least 0.00001 and at most 99. Decimals are accepted.
  • Enter expected proportion in %, at least 0.00001 and at most 99.99999. Decimals are accepted.
  • Choose confidence level from 90%, 95% and 99%.
  • Enter population size (0 = very large), at least 0. Use a whole number.

Sample Size Calculator: a worked example

With the inputs below, the result is 385 responses (minimum sample size). Follow the example, then replace these illustrative values with your own.

Example inputs and output
Input or outputExample value
Desired margin of error (%)5 %
Expected proportion (%)50 %
Confidence level95%
Population size (0 = very large)0
Minimum sample size385 responses

Understanding the Sample Size result

The main output is minimum sample size, expressed in responses. It applies to the inputs and operation you selected.

Displayed results use a readable number of decimal places. When checking a result by hand, keep extra precision until the last step. To compare scenarios, change one input at a time and keep the others fixed.

Sample Size Calculator: assumptions and common mistakes

A useful estimate starts with the right inputs. Check the following assumptions and limits before applying the result to your situation.

  • Check the base value, sample definition and chosen operation. Display rounding should come after the calculation.

For wider guidance, visit NIST statistical handbook. The formula and scope of this specific tool are stated on this page.

Sample Size Calculator FAQs

What does Sample Size Calculator calculate?

Sample Size Calculator helps you estimate the sample size needed for an entered confidence and error margin. Its main output is minimum sample size in responses.

What inputs do I need for Sample Size Calculator?

You need desired margin of error (%), expected proportion (%), confidence level and population size (0 = very large). Use the field labels and units to match your figures to the formula.

Which formula does Sample Size Calculator use?

Cochran’s proportion sample size n₀ = z²p(1−p)/e², with finite population correction when a population size is provided.

What is a worked example for Sample Size Calculator?

Example inputs: Desired margin of error: 5 %; Expected proportion: 50 %; Confidence level: 95%; Population size (0 = very large): 0. The result is 385 responses (minimum sample size).

How should I enter desired margin of error?

Enter desired margin of error in %, at least 0.00001 and at most 99. Decimals are accepted.

How do I choose confidence level?

Choose confidence level from 90%, 95% and 99%. The example uses 95%; replace it if your circumstances differ.

How should I read minimum sample size?

The main output is minimum sample size, expressed in responses. It applies to the inputs and operation you selected.

Why might my Sample Size Calculator result differ from my records?

Check the base value, sample definition and chosen operation. Display rounding should come after the calculation. Differences in entered values, units or rounding can also change the comparison.

Can I compare two scenarios in Sample Size Calculator?

Yes. Note your first minimum sample size, change desired margin of error or another input, and select Calculate again. Editing a field clears the old result so it is not mistaken for a new calculation.

Is Sample Size Calculator free, and where are my inputs calculated?

This calculator is free to use without signing in. Its formula runs in your browser; calculator inputs are not sent to a calculation API. The inputs reset to the example values when you reset the form or start a fresh page.