Skip to content
ToolUlkaa Tool
All tools

Statistics

Statistics CalculatorRandom Number GeneratorStandard Deviation CalculatorZ-Score CalculatorProbability CalculatorPermutation and Combination CalculatorP-Value CalculatorT-Test CalculatorConfidence Interval CalculatorSample Size CalculatorChi-Square CalculatorCorrelation Coefficient CalculatorLinear Regression CalculatorANOVA CalculatorProbability Distribution Calculator

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Statistics

Sample Size Calculator

Find how many responses a survey needs, the margin of error of a sample, or how many people an A/B test needs.

Calculate
Confidence level
Use 50 if you do not know. It gives the largest, safest sample.
Leave empty for a very large population. A small population needs a smaller sample.

Required sample size

385
Before population correction
384.146
Margin of error
±5 points
Expected proportion
50%
Critical value (z)
1.96

You need at least 385 completed responses for a margin of error of plus or minus 5 percentage points at 95% confidence (using p = 50%, the most cautious choice). Plan for non-response: divide 385 by your expected response rate to know how many people to invite.

Confidence level on the normal curve

Confidence level on the normal curveConfidence level on the normal curve. The central region is shaded. -4-3-2-101234z

The shaded middle is the confidence level. The critical value z at its edges scales the margin of error.

Step-by-step working

  1. 1Critical value
    zα/2 for 95%z_{\alpha/2}\ \text{for}\ 95\%zα/2​ for 95%
    ↓
    z=1.96z = 1.96z=1.96
  2. 2Sample size, large population
    n0=z2 p(1−p)E2n_0 = \dfrac{z^2\,p(1-p)}{E^2}n0​=E2z2p(1−p)​
    ↓
    n0=1.962×0.5(1−0.5)0.052=384.146n_0 = \dfrac{1.96^2\times 0.5(1-0.5)}{0.05^2} = 384.146n0​=0.0521.962×0.5(1−0.5)​=384.146
  3. 3Round up
    n=⌈ ⋅ ⌉n = \lceil\,\cdot\,\rceiln=⌈⋅⌉
    ↓
    n=385n = 385n=385
  1. Tools
  2. Statistics
  3. Sample Size Calculator

About Sample Size Calculator

This sample size calculator is free, needs no sign-up and runs in your browser, so nothing you type is uploaded. It answers four common questions. How many people do I need to survey to estimate a proportion within a margin of error? What margin of error does my sample give? How many observations do I need to estimate a mean? And how many visitors does an A/B test need to detect a given change in a conversion rate?

For surveys you set the confidence level (90%, 95% or 99%), the margin of error, the expected proportion (50% is the cautious choice) and, if your population is small, the population size. The calculator applies the finite population correction, so surveying 1,000 people from a population of 1,000 is not asked for 385 responses. The step-by-step panel writes the formula with your numbers, and a bell curve shows the confidence level the margin is based on.

The A/B mode is a power calculation for comparing two proportions. You give the baseline conversion rate, the smallest change worth detecting (relative or absolute), the power and the significance level, and it returns the number of people per group, using the same normal-approximation formula as R’s power.prop.test. It is a fixed-sample plan and it does not cover sequential testing or multiple variants.

How to use Sample Size Calculator

  1. 1Choose what to calculate: survey size, margin of error, a mean, or an A/B test.
  2. 2For a survey, set the confidence level, the margin of error in percentage points and the expected proportion. Use 50% if you are unsure.
  3. 3If your population is small, type its size to apply the finite population correction.
  4. 4For an A/B test, enter the baseline rate, the change to detect, the power and the significance level.
  5. 5Read the result, then open the working to copy the formula into your methods section.

Features

  • Survey sample size for a proportion at 90%, 95% or 99% confidence.
  • Margin of error for a given sample size, with finite population correction.
  • Sample size to estimate a mean from the standard deviation and the margin of error.
  • A/B test sample size per group from baseline rate, minimum detectable change, power and significance.
  • Finite population correction when the population is known and small.
  • A bell curve of the confidence level and step-by-step KaTeX working.

The formulas

The survey formula is Cochran’s. With p = 0.5 it gives the largest sample, which is why it is the safe default. The finite population correction shrinks the sample when it is a sizeable share of the population. The A/B formula balances the two error rates: the significance level and the power.

proportion   n0 = z² · p(1 − p) / E²
mean         n0 = (z · σ / E)²
finite N     n = n0 / (1 + (n0 − 1) / N)
A/B (each group)  n = (z_α √(2 p̄ q̄) + z_β √(p1 q1 + p2 q2))² / (p1 − p2)²
always round up

Worked examples

  • Survey, 95% confidence, ±5 points, p = 50%, very large population → gives n0 = 384.15, so 385 responses

    Cochran (1977): 384.16, rounded up to 385.

  • Same survey, population of 1,000 and of 10,000 → gives 278 and 370 responses

    Matches the Krejcie and Morgan (1970) table, which lists 278 for 1,000 and 370 for 10,000.

  • 1,000 responses, 95% confidence, p = 50% → gives margin of error ±3.099 points

  • Mean, σ = 15, margin ±2, 95% confidence → gives 217 observations (n0 = 216.08)

  • A/B test, 50% to 75%, power 90%, α = 0.05 two-sided → gives 77 per group (n = 76.71 unrounded)

    Matches the R documentation example power.prop.test(p1 = .50, p2 = .75, power = .90), n = 76.7.

Survey sample size by margin of error (p = 50%, large population)

Computed by the calculator. Halving the margin of error needs about four times as many responses.
Margin of error90% confidence95% confidence99% confidence
10 points6897166
7 points139196339
5 points271385664
4 points4236011037
3 points75210681844
2 points169124014147
1 points6764960416588

Good to know

What the survey formula assumes

It assumes a simple random sample and that people who are invited actually answer. Real surveys have non-response and design effects from clustering or weighting, which raise the sample you need. Divide the answer by your expected response rate to know how many people to invite, and treat the result as a minimum.

Limits of the A/B estimate

The A/B figure is for a single comparison of two conversion rates in a fixed-size test. It uses the normal approximation, so it is less accurate for very small rates or tiny samples. It does not adjust for several variants, repeated peeking at results or sequential designs. Stopping a test early when it first crosses 0.05 inflates false positives.

Privacy: how it works

  • All formulas run in your own browser tab. Nothing you type is sent to Ulkaa or to any other server.
  • There is no account and nothing is stored once you close the tab.

Tips

  • If you do not know the expected proportion, use 50%. It gives the largest sample and so a safe margin.
  • Smaller margins are expensive: moving from ±5 to ±2.5 points roughly quadruples the sample.
  • For an A/B test, decide the smallest change that would matter to the business. Detecting tiny lifts takes very large samples.
  • A population much larger than the sample barely changes the answer. The correction matters when the sample is more than about 5% of the population.

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your numbers are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your numbers are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

How big a sample do I need for a survey?

For a ±5 point margin at 95% confidence and a large population you need 385 completed responses. For ±3 points you need 1,068, and for ±1 point 9,604. A small population needs fewer.

What is the finite population correction?

When the sample is a sizeable share of a small population, each answer tells you more, so you need fewer responses. The correction n = n0 / (1 + (n0 − 1)/N) captures that.

Why is 50% the default proportion?

p(1 − p) is largest at 50%, so it gives the biggest sample. If you pick it you will have enough responses whatever the true proportion turns out to be.

What are power and significance in the A/B mode?

Significance (α) is the false positive rate you accept when there is no real difference. Power is the chance of detecting a real difference of the size you chose. 80% power and α = 0.05 are the common defaults.

Relative or absolute change for an A/B test?

Absolute change is in percentage points (10% to 12% is 2 points). Relative change is a share of the baseline (10% to 12% is a 20% lift). The calculator accepts either and shows the resulting rate.

How do I plan for people who do not respond?

Divide the required sample by your expected response rate. If you need 385 responses and expect 20% to reply, invite about 1,925 people.

Popular Sample Size Calculator pages

  • Survey Sample Size CalculatorSet a confidence level, a margin of error and your population size to find how many responses to collect.
  • Margin of Error CalculatorType the sample size and get the margin of error for a survey result.
  • Sample Size for a Mean CalculatorEnter the standard deviation and the margin of error you can accept to find the number of observations.
  • A/B Test Sample Size CalculatorEnter your baseline conversion rate and the smallest lift you care about to find the sample per group.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account