Lewati ke konten utama
Calculator Tools
MatematikaGratisTanpa daftar

Sample Size Calculator - Kalkulator online gratis

Calculate the sample size needed for a survey to achieve your target margin of error and confidence level. Used in market research, opinion polls, A/B tests and quality control to know how many respondents you need.

  • Rumus tampil di halaman
  • Berjalan di browser Anda
  • Data Anda tetap pribadi
%

Use 0.5 if unknown (most conservative)

Required sample size

385 respondents

Using z = 1.96 for 95% confidence at ±5% margin

Formula: n = z² · p(1−p) / e²

Sebagian konten masih ditampilkan dalam bahasa Inggris.

Tentang

Memahami Sample Size Calculator

Sample size determination is the first practical question in any survey, A/B test, clinical trial or market research study: 'How many respondents do I need to interview to get statistically meaningful results?' Sample too few and your results carry too much uncertainty to act on; sample too many and you waste time, money and goodwill. This calculator gives you the mathematically optimal sample size for a target margin of error and confidence level. It's the same calculation used by CSDS, Lokniti, Axis My India, CVoter and other Indian polling agencies when designing election surveys, and by product teams at Flipkart, Swiggy, Zomato, and Paytm when planning A/B tests.

Indian context: a national opinion poll with 1,200 respondents gives ~±3% margin at 95% confidence - sufficient for election predictions. State-level polls need 800-1,000 per state. Brand surveys for a city require 400-500 respondents for ±5% margin. A/B testing on websites can need 1,000-50,000 visitors per variant depending on baseline conversion rate and detectable difference. This calculator handles all these cases including finite population correction for small populations like 'survey all employees of a 500-person company'.

Cara pakai

Memakai Sample Size Calculator dalam 5 langkah

  1. Pick your confidence level (95% is standard).

  2. Enter your target margin of error (e.g. ±5%).

  3. Enter the population proportion (use 0.5 for the most conservative estimate).

  4. Optionally enter total population size for finite-population correction.

  5. See the required sample size.

Rumus

Cara kerja Sample Size Calculator

For a population proportion, the formula is n = (z² × p × (1−p)) / e². For a known finite population, the corrected sample size is n / (1 + (n−1)/N). Using p = 0.5 gives the largest required sample - safest if the true proportion is unknown.

Formula

n₀ = z² × p × (1−p) / e² n = n₀ / (1 + (n₀−1) / N) (finite population)

  • zZ-score for chosen confidence level
  • pEstimated proportion (0.5 if unknown)
  • eMargin of error (decimal)
  • NPopulation size (optional)
Matematikanya

Bagaimana Sample Size Calculator mendapatkan hasilnya

Core formula for infinite (large) population: n = z² × p × (1−p) / e², where z is the critical value for confidence level (1.96 for 95%, 2.58 for 99%, 1.645 for 90%), p is the expected proportion (0.5 if unknown - the worst case that maximises required sample), and e is the margin of error in decimal (0.03 for ±3%). The formula derives from the standard error of a proportion: SE = √(p(1-p)/n), set equal to e/z and solve for n.

Finite population correction: when sampling more than ~5% of a known finite population N, adjust: n = n₀ / (1 + (n₀-1)/N). For very large N, this barely changes n₀; for small N (like surveying 500-person company), it significantly reduces required sample. Example: n₀ = 384 (95% conf, ±5%, p=0.5) reduces to 217 for a 500-person population. The intuition: when you sample a large fraction, your sample contains more of the truth, so you need fewer to be confident.

Practical adjustments: factor in expected response rate. If you need 1,000 completed responses and response rate is 30% (typical for online surveys), you need to invite 3,300 people. For panel surveys, response rates can be 60-70%; for cold email, 5-15%. Multiply target n by 1/response_rate to get gross sample needed. Stratified sampling (separate samples by region, age, gender) may need larger total samples but produce more accurate sub-group estimates.

Contoh

Contoh soal

National election poll: ±3% margin, 95% confidence, infinite population

n = 1.96² × 0.5 × 0.5 / 0.03² = 3.8416 × 0.25 / 0.0009 = 1,067. Round up to 1,100. Standard CSDS-style poll size. Smaller margins (±2%) require 2,401; ±1% requires 9,604 - quickly impractical.

Company survey of all employees (N=500): ±5% margin, 95% confidence

n₀ (uncorrected) = 384. Corrected for finite N: n = 384 / (1 + 383/500) = 384 / 1.766 = 217 employees. About 43% of the company. Manageable for an HR survey.

E-commerce A/B test: detect 2% lift in 3% baseline conversion, 80% power

More complex - needs a power analysis tool. Rough estimate: with baseline p=0.03, lift to 0.03 × 1.02 = 0.0306, detectable at α=0.05 with 80% power, requires ~50,000 visitors per variant. A/B tests on small effects need large samples.

Kasus penggunaan

Kapan memakai Sample Size Calculator

  • Designing opinion polls and election surveys.
  • Market research - customer satisfaction, brand awareness studies.
  • A/B testing on websites and apps.
  • Clinical trials - sizing patient cohorts for drug efficacy testing.
  • Quality control - sampling production batches.
  • Academic research - planning thesis and dissertation surveys.
  • Employee engagement surveys at organisations.
  • Marketing - pre/post campaign measurement.
Perhatikan

Kesalahan dan jebakan umum

  • Using p = 0.5 even when you have a better estimate. If you know the proportion is ~10%, use 0.1 - needs fewer respondents.
  • Forgetting finite population correction for small populations.
  • Confusing margin of error with confidence level. They're different parameters.
  • Failing to account for non-response. Multiply sample size by 1/response_rate.
  • Forgetting sub-group sample sizes. National sample of 1,200 doesn't give a meaningful read on a sub-group of 50.
Tips pro

Manfaatkan alat ini lebih jauh

  • Always use p = 0.5 if uncertain - most conservative and ensures sufficient sample.
  • 95% confidence + ±3% margin is the standard for political polls; ±5% for general consumer surveys.
  • Halving margin of error requires quadrupling sample size - diminishing returns.
  • For sub-group analysis, each sub-group needs its own sample size logic, not just a fraction of total.
  • Pair with the confidence interval, statistics and standard deviation calculators on this site for survey design.
FAQ

Pertanyaan tentang Sample Size Calculator

What is margin of error?

How far the sample estimate can stray from the true population value. ±3% margin means the result is within 3 percentage points of the truth (with the chosen confidence).

Why use p = 0.5 by default?

The product p × (1−p) is maximised at p = 0.5, giving the largest required sample. Safest when you don't know the true proportion in advance.

Common confidence levels?

95% is the standard for opinion polls and most research. 99% is used for high-stakes decisions (medical, regulatory). 90% is sometimes used for quick estimates.

What's the finite population correction?

When sampling more than ~5% of a population, the variance is smaller than the simple formula suggests. The correction reduces required sample size for small populations.

Sample size for a referendum / election?

1000-1100 respondents at 95% confidence gives ±3% margin. National polls typically use this as their floor.

Does response rate matter?

Yes for fieldwork. If response rate is 25% and you need 1000 completes, you need to invite 4000 people. The math doesn't change but logistics do.

Math in your browser

From simple percentages to scientific notation, statistics, geometry and big-number arithmetic - every common math problem you'd reach for a calculator for, runs in your browser with no installs. The fraction calculator preserves exact rationals, the big-number calculator uses BigInt for hundreds of digits without precision loss, and the scientific calculator's expression evaluator is a hand-written shunting-yard parser (no eval) that supports trig, log, factorial and parentheses.

If you're a student, double-check your work without paying for a graphing calculator. If you're a professional, use these tools as a sanity check on spreadsheet formulas. Every result is shown alongside its formula and inputs, so the math is always auditable.

The Sample Size Calculator is part of the Math suite on Online Calculator Tools, alongside 6 related calculators. All tools share the same UI patterns, the same privacy-first rendering (nothing is sent to a server), and the same commitment to showing the formula and assumptions behind every result.