MaximCalculator Free, fun & accurate calculators
📦 Sampling / surveys layout
🌙Dark Mode

Sampling Calculator

This Sampling Calculator helps you choose a sample size (how many people/items to measure) or estimate your margin of error for surveys, experiments, product analytics, school projects, and A/B tests. It supports both proportions (percent “yes”, conversion rate, defect rate) and means (average time, average score, average weight), with optional finite population correction for small populations.

Instant sample size (survey-ready)
🎯Confidence level + margin of error
🏫Perfect for homework & research
📱Screenshot-friendly result box

Choose what you want to calculate

Most people use this to answer: “How many responses do I need for my survey?” If you already have a sample size, switch the mode to estimate the margin of error.

🧭
📊
🛡️
Common defaults: 95% for surveys, 90% for quick signals, 99% for high-stakes.
🎯
Enter as percent points (e.g., 5 = ±5%).
👥
Only used in “Margin of error from sample size” mode.
🌎
Add this if your population is small (like a class, a customer list, a factory batch).
🧩
If unsure, leave blank (we’ll use 0.5 for “worst-case” sample size).
📏
Used for “mean” sample size. If unknown, use pilot data or a reasonable guess.
Your sampling result will appear here
Pick your mode, confidence level, and margin of error (or sample size), then tap “Calculate”.
Tip: For a simple survey, use 95% confidence and ±5% margin of error.
Visual meter: smaller margin of error generally requires a larger sample size.
LooseBalancedPrecise
Quick sanity check: If you’re measuring a proportion and you don’t know the expected rate, the safest choice is p = 0.5. It produces the largest recommended sample size, so you don’t under-sample by accident.

Educational tool only. For regulated research or high-stakes decisions, consult a statistician and follow your institution’s methodology requirements.

📚 Formula breakdown

How the Sampling Calculator works (with formulas)

This calculator uses classic “intro stats” formulas that show up in survey methodology, research papers, and quality control. There are two common sampling situations: (1) proportions (a percentage like conversion rate) and (2) means (an average like average score). The inputs you choose are really about one trade-off: precision vs effort.

1) Proportion sample size

If you want to estimate a proportion (for example, “What percent of customers prefer Plan A?”), the baseline sample size formula is:

n₀ = (Z² · p · (1 − p)) / E²

  • Z = z-score for your confidence level (90% ≈ 1.645, 95% ≈ 1.96, 99% ≈ 2.576)
  • p = expected proportion (0.5 is “worst-case” if you don’t know)
  • E = margin of error as a decimal (±5% → 0.05)
  • n₀ = initial sample size for a large population
Finite population correction (optional)

If your population is not huge (say you only have 600 students in a school), you can adjust using finite population correction (FPC):

n = n₀ / (1 + (n₀ − 1)/N)

Where N is the population size. This usually makes the recommended sample size smaller. If N is unknown or very large, the correction barely changes anything — which is why survey tools often ignore it.

2) Mean sample size

If you’re estimating a mean (for example, “What’s the average time to complete a task?”), the formula looks similar, but uses an estimated standard deviation (σ):

n₀ = (Z² · σ²) / E²

Here E is the allowable error in the same units as your measurement (e.g., ±2 minutes, ±5 points). If σ is unknown, you can use pilot data (a small initial sample) or a reasonable guess based on past measurements.

Margin of error from sample size

If you already have a sample size and want to estimate the margin of error for a proportion, you can rearrange the formula:

E ≈ Z · √(p(1−p)/n)

In practice, many people plug in p = 0.5 when p is unknown. That yields a conservative (slightly larger) margin of error.

🧪 Examples

Real examples (copy-paste friendly)

Example A: classic survey

You want a 95% confidence estimate with ±5% margin of error for a proportion (p unknown). Use p = 0.5 (worst-case). The calculator returns about 385 responses. That’s why you see “385” in so many survey guides — it’s the default for 95% and ±5%.

Example B: small population (class of 120)

You’re surveying a class of N = 120 students, 95% confidence, ±5% error, p = 0.5. Without correction you’d still get ~385, which is impossible (bigger than the class). With finite population correction, the required sample size drops to around 92. That’s a huge difference — and it’s the reason “population size” matters when N is small.

Example C: estimating an average

You’re measuring average delivery time. You think σ ≈ 12 minutes from historical data. You want 95% confidence and ±3 minutes error. The calculator returns roughly 62 observations (deliveries).

Example D: “What’s my margin of error with n = 200?”

With 95% confidence and unknown p (use 0.5), a sample size of 200 gives a margin of error around ±6.9%. That’s why small samples can feel “noisy”.

🧩 How to use it

How to pick the “right” inputs (without overthinking)

The “best” sample size isn’t one magic number — it’s a decision based on effort, time, and what you need the result for. Here’s a practical way to choose inputs:

Step 1: Decide what you’re measuring
  • Proportion: yes/no, conversion rate, approval, defect rate, churn rate.
  • Mean: average rating, average completion time, average value in dollars.
Step 2: Choose confidence level
  • 90%: quick internal signals, early product discovery, rough estimates.
  • 95%: standard choice for most surveys and research assignments.
  • 99%: high-stakes estimates where you want stronger certainty.
Step 3: Choose margin of error
  • ±10%: very fast, very rough. Great for early direction.
  • ±5%: common, balanced. Good for public-facing survey claims.
  • ±3%: more precise, often used in serious polling. Requires much larger samples.
  • ±1–2%: highly precise, typically expensive in time or money.
Step 4: Use population size only when it’s real

Population size is helpful when the total group is limited and known (a roster, a customer list, a batch). If you’re sampling “future visitors” or “the internet”, leave it blank.

Step 5: Pick p or σ intelligently

For proportions, if you have no clue, use p = 0.5. If you have a prior estimate (say your conversion rate is usually ~8%), use p = 0.08. This can reduce the required sample size, but be careful: if your guess is wrong, you might under-sample.

For means, σ matters a lot. If you don’t know σ, take a small pilot sample (like 20), compute the sample standard deviation, then use that to plan the full study.

❓ FAQ

Sampling Calculator FAQs

  • Why do I keep seeing “385” as the sample size?

    Because for a proportion with unknown p (use 0.5), 95% confidence, and ±5% margin of error, the formula gives n ≈ 384.16, which rounds up to 385. It’s the standard “default survey” number.

  • Does population size change the sample size a lot?

    Only when the population is small. If N is huge, the correction barely moves. If N is a few hundred or a few thousand, finite population correction can noticeably reduce n.

  • What if I don’t know the expected proportion (p)?

    Use p = 0.5. It’s “worst-case”, meaning it produces the largest recommended sample size for a given margin of error and confidence level. That’s the safe option.

  • Is this the same as power analysis for A/B tests?

    Not exactly. A/B test planning usually depends on statistical power and the minimum effect you want to detect. This tool is perfect for rough planning and survey-style estimation, but power analysis is more specific.

  • Can I use this for quality control sampling?

    Yes for approximate planning. If you’re doing regulated QC or acceptance sampling, your industry may require specific sampling plans (like ANSI/ASQ standards).

  • What’s the difference between “percent points” and “percent”?

    Margin of error here is in percent points. If you estimate 40% with ±5%, your interval is 35% to 45%. That’s ±5 percentage points (not “±5% of 40”).

MaximCalculator provides simple, user-friendly tools. Always treat results as educational estimates and double-check any important study design decisions.