# Sample Size Calculator

Estimate required sample size for proportions or means using confidence level, margin of error, and optional finite population correction

> Canonical page: https://elysiatools.com/en/tools/sample-size-calculator

- **Category:** Math & Numbers

- **Keywords:** sample size, statistics, survey, confidence level, margin of error, calculator

## Overview

The Sample Size Calculator helps you determine the statistically significant number of participants needed for your research, surveys, or experiments. By inputting your desired confidence level and margin of error, you can ensure your data collection is robust and reliable.

## Inputs

- **Calculator Mode** (select)
- **Confidence Level** (select)
- **Margin of Error** (text): e.g. 0.05
- **Estimated Proportion** (text): Used for proportion mode, e.g. 0.5
- **Estimated Standard Deviation** (text): Used for mean mode, e.g. 12
- **Population Size (Optional)** (text): Optional finite population size
- **Decimal Precision** (number)

## When to use

- Before launching a survey to ensure your results are representative of the target population.
- When planning a scientific experiment to determine the minimum number of subjects required for valid conclusions.
- When you need to adjust your sample size based on a known, finite population size to avoid over-sampling.

## How it works

- Select your calculation mode: choose 'Proportion' for categorical data or 'Mean' for continuous numerical data.
- Input your target confidence level (e.g., 95%) and the acceptable margin of error.
- Provide optional parameters like estimated standard deviation or total population size for more precise results.
- Click calculate to receive the recommended sample size based on statistical formulas.

## Use cases

- Market researchers determining the number of customers to survey for a new product launch.
- Academic researchers calculating the required participants for a clinical study or behavioral experiment.
- Quality control teams estimating the number of units to inspect from a production batch.

## Frequently asked questions

### What is a confidence level?

It represents how certain you want to be that the true population parameter falls within your margin of error, typically set at 95%.

### What is the margin of error?

It is the range of values above and below your sample result that you expect the true population value to fall within.

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

Use this when your total population is small and known, as it allows for a smaller sample size while maintaining the same level of accuracy.

### What is the difference between Proportion and Mean modes?

Proportion mode is for binary outcomes (e.g., yes/no), while Mean mode is for measuring averages of continuous variables.

### Why is the recommended sample size sometimes a decimal?

Calculations often result in fractions; always round up to the nearest whole number to ensure your sample size meets the minimum statistical requirement.

## Related tools

- [Average Calculator](https://elysiatools.com/en/tools/average-calculator): Compare arithmetic, geometric, and harmonic averages for a numeric dataset in one place
- [Confidence Interval Calculator](https://elysiatools.com/en/tools/confidence-interval-calculator): Calculate confidence intervals for a sample mean or proportion using either raw data or summary statistics
- [Geometric Mean Calculator](https://elysiatools.com/en/tools/geometric-mean-calculator): Calculate the geometric mean of positive numeric values for growth rates, ratios, and multiplicative datasets
- [Harmonic Mean Calculator](https://elysiatools.com/en/tools/harmonic-mean-calculator): Calculate the harmonic mean of positive values, with optional arithmetic and geometric mean comparison
- [Heat Exchanger LMTD Calculator (Log Mean Temperature Difference)](https://elysiatools.com/en/tools/heat-exchanger-lmtd): Compute the Log Mean Temperature Difference (LMTD) of a heat exchanger for parallel or counter flow. Parallel flow: ΔT₁ = T_h,in - T_c,in and ΔT₂ = T_h,out - T_c,out; counter flow: ΔT₁ = T_h,in - T_c,out and ΔT₂ = T_h,out - T_c,in. LMTD = (ΔT₁ - ΔT₂)/ln(ΔT₁/ΔT₂), or ΔT₁ when ΔT₁ = ΔT₂. A non-positive terminal difference (temperature cross) is physically impossible and is rejected. Optionally, with the overall heat transfer coefficient U (W/(m²·K)) and the heat transfer area A (m²), the heat transfer rate Q = U·A·LMTD (W) is returned. Temperatures are used only as differences: Δ°C = ΔK and Δ°F ×5/9 = ΔK; the LMTD is reported in K.
- [Mean Calculator](https://elysiatools.com/en/tools/mean-calculator): Calculate the arithmetic mean of a numeric dataset and review the main supporting statistics
- [Normal Distribution Calculator](https://elysiatools.com/en/tools/normal-distribution-calculator): Calculate z-scores, cumulative probability, tail probability, and interval probability for a normal distribution
- [Statistical Power Calculator](https://elysiatools.com/en/tools/statistical-power-calculator): Estimate statistical power for one-sample mean or proportion tests using sample size, alpha, and expected effect

## Samples

- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [A/B Experiment Design, Sample Size, and Statistical Power](https://elysiatools.com/en/hubs/ab-testing-experiment-design-and-statistical-power): Plan an A/B experiment, size its evidence, select the right test, and review effect size and uncertainty before treating a result as actionable.
