Skip to main content
Calkulon
Back to Guides
5 min read4 Steps

How to Calculate Sample Size: Step-by-Step Guide

Learn to manually calculate the minimum sample size for surveys and experiments using confidence level, margin of error, and population.

Skip the math — use the calculator

Step-by-Step Instructions

1

Gather Your Inputs

First, identify your key values for the calculation. For our example: * **Confidence Level:** 95% -> **Z-score = 1.96** * **Margin of Error (E):** 5% -> Convert to decimal: **0.05** * **Population Size (N):** **10,000** users * **Estimated Proportion (p):** No prior knowledge, so use **0.5** (and `1-p` will also be `0.5`)

2

Calculate the Initial Sample Size (Infinite Population)

Now, we'll use the first formula to get an initial sample size, assuming a very large or infinite population. This gives us a baseline. `n = (Z^2 * p * (1-p)) / E^2` Let's plug in our numbers: `n = (1.96^2 * 0.5 * 0.5) / 0.05^2` 1. Square the Z-score: `1.96 * 1.96 = 3.8416` 2. Multiply `p * (1-p)`: `0.5 * 0.5 = 0.25` 3. Multiply the results from steps 1 and 2: `3.8416 * 0.25 = 0.9604` (This is the numerator) 4. Square the Margin of Error: `0.05 * 0.05 = 0.0025` (This is the denominator) 5. Divide the numerator by the denominator: `0.9604 / 0.0025 = 384.16` So, our initial sample size `n` is `384.16`.

3

Apply the Finite Population Correction (If Needed)

Since our population (10,000) is known and our initial sample size (384.16) is a notable percentage of it, we'll apply the finite population correction to get a more precise sample size. This often results in a slightly smaller (and more efficient) required sample. `n_new = n / (1 + ((n-1)/N))` Using our initial `n = 384.16` and `N = 10,000`: 1. Subtract 1 from `n`: `384.16 - 1 = 383.16` 2. Divide this by the Population Size `N`: `383.16 / 10000 = 0.038316` 3. Add 1 to the result: `1 + 0.038316 = 1.038316` (This is the new denominator) 4. Divide the initial `n` by this new denominator: `384.16 / 1.038316 = 370.09` Our corrected sample size `n_new` is `370.09`.

4

Round Up to the Nearest Whole Number

You can't survey a fraction of a person! Always round your final sample size *up* to the next whole number to ensure you meet your confidence level and margin of error requirements. `370.09` rounds up to `371`. **Conclusion for our example:** To be 95% confident that your survey results are within ±5% of the true user satisfaction among your 10,000 users, you would need to survey a minimum of **371 people**.

Hey there, budding data scientist or curious learner! Ever wondered how researchers figure out how many people they need to survey to get reliable results? It's not magic, it's math! Understanding how to calculate sample size is a superpower for anyone conducting surveys, experiments, or market research. It helps you ensure your findings are accurate and representative without wasting resources on surveying too many people.

This guide will walk you through the process of calculating sample size by hand, demystifying the formulas and helping you understand each component. While online calculators are super convenient (and we'll talk about when to use them!), learning the manual method builds a strong foundation and deeper understanding. Let's dive in!

Why is Sample Size Important?

Imagine you want to know what percentage of students at your school prefer online learning. If you only ask five friends, their opinions might not represent the entire student body. But if you ask too many, you might spend ages collecting data! A well-calculated sample size strikes the perfect balance: it's large enough to give you confidence in your results but small enough to be practical and cost-effective.

Prerequisites: What You'll Need

Before we start crunching numbers, let's get familiar with the key concepts you'll need:

  • Confidence Level: This expresses how confident you want to be that your sample results accurately reflect the entire population. Common choices are 90%, 95%, or 99%. A higher confidence level means you need a larger sample size.
  • Margin of Error (E): This is the maximum acceptable difference between your sample results and the actual population value. It's usually expressed as a percentage (e.g., ±5%). A smaller margin of error requires a larger sample size.
  • Population Size (N): The total number of individuals in the group you're studying. If your population is very large (e.g., millions), you might treat it as 'infinite' for the initial calculation.
  • Estimated Proportion (p): This is your best guess of the proportion of the population that has a certain characteristic. If you have no idea, using p = 0.5 is the safest bet because it yields the largest possible sample size, ensuring you have enough data regardless of the actual proportion.
  • Z-score: This value corresponds to your chosen confidence level. It represents how many standard deviations away from the mean your data point is. Don't worry, you don't need to calculate this; we'll provide the common values.

Common Z-Scores:

  • 90% Confidence Level: Z = 1.645
  • 95% Confidence Level: Z = 1.96
  • 99% Confidence Level: Z = 2.576

The Sample Size Formula

There are two main parts to the sample size calculation:

  1. Initial Sample Size (for infinite or very large populations): n = (Z^2 * p * (1-p)) / E^2 Where:

    • n = Sample Size
    • Z = Z-score (from your confidence level)
    • p = Estimated proportion
    • E = Margin of error (as a decimal)
  2. Finite Population Correction (if your population is known and not extremely large): If your calculated n from the first formula is a significant portion of your total population N (typically more than 5%), you'll want to apply a correction factor to get a more accurate (and often smaller) sample size. n_new = n / (1 + ((n-1)/N)) Where:

    • n_new = Corrected sample size
    • n = Initial sample size (from the first formula)
    • N = Total population size

Let's put these formulas into action with an example!

Worked Example: Calculating Sample Size

Imagine you're launching a new app and want to survey users to understand their satisfaction. You have a user base of 10,000 people.

  • You want to be 95% confident in your results.
  • You're willing to accept a margin of error of ±5%.
  • You have no prior knowledge about user satisfaction, so you'll use p = 0.5.

Let's follow the steps!

Common Pitfalls to Avoid

  • Using the wrong Z-score: Make sure your Z-score matches your desired confidence level.
  • Forgetting to convert E to a decimal: If your margin of error is 5%, use 0.05 in the formula, not 5.
  • Not using p=0.5 when unsure: If you don't have a reliable estimate for p, using 0.5 is crucial to ensure your sample size is large enough to be representative.
  • Ignoring the Finite Population Correction: For smaller populations, skipping this step can lead to an unnecessarily large sample size.
  • Rounding down: Always round your final sample size up to the next whole number. You can't survey half a person, and rounding down would slightly reduce your confidence or increase your margin of error.

When to Use a Sample Size Calculator

While understanding the manual calculation is incredibly valuable, online sample size calculators are fantastic for convenience, speed, and reducing the chance of calculation errors. They're especially handy when:

  • You need to quickly test different confidence levels or margins of error.
  • You're dealing with very large or complex populations.
  • You want to double-check your manual calculations.

Think of the manual calculation as learning to drive stick shift – it gives you a deeper understanding of how the engine works. The calculator is like an automatic car – it gets you where you need to go efficiently once you know the basics. Both have their place!

Congratulations! You've now learned the fundamental principles behind calculating sample size. With this knowledge, you're better equipped to design more effective and reliable surveys and experiments. Happy researching!

Ready to Calculate?

Skip the manual work and get instant results.

Open Calculator

Settings

PrivacyTermsAbout© 2026 Calkulon