Sample size calculator

By Harmain Manzoor · Reviewed by Fahad Ullah

MathArithmetic & Basic Math·Last updated August 18, 2026

Created by

Harmain Manzoor

About Me Hi, I'm Harmain Manzoor, a content writer who specializes in semantic SEO writing. I have two years of hands-on experience writing content that is clear, well-researched, and built around what readers are actually searching for - not just stuffed with keywords. I hold a BS in English Literature and Linguistics, along with a Diploma in Information Technology. I am also a Lecturer of English at Government Degree College, Hangu. This academic background has given me a strong command of the English language and clear writing skills. I also have practical knowledge of HTML and CSS, which helps me understand how content actually works on a website, not just how it reads on paper. I'm comfortable using Microsoft Office and other everyday computer tools as well. What I'm Good At: • Writing SEO content that ranks well and is easy to read. • Understanding what readers are searching for and answering it clearly. • Basic HTML and CSS, so I can work directly with web pages. • Using Microsoft Office and other common software confidently. • Strong, clear English writing and grammar. I bring together good writing skills and technical knowledge, which makes me a solid fit for any team that needs content that works well both for readers and for search engines.

View profile →

Reviewed by

Fahad Ullah

SAAS SEO Expert | Software Engineer

I'm the Founder of 360Calculator.net, a platform dedicated to creating accurate, practical, and easy-to-use online calculators that help people solve everyday problems across a wide range of industries. As a Software Engineer, I personally build many of the calculators published on this website, especially those related to my areas of expertise. I focus on creating calculators that are accurate, reliable, fast, and simple to use, while ensuring the underlying formulas and logic are implemented correctly. Not every calculator on 360Calculator is built by me, but every calculator related to my expertise is carefully reviewed before it's published. I verify the calculation logic, test different scenarios, check the accuracy of formulas, and make sure the tool provides consistent and dependable results. I also review and improve the educational content that accompanies these calculators so users can understand not only the result but also how the calculation works and when it should be used. With more than 7 years of experience in SaaS SEO, I also ensure that our content is well-organized, easy to navigate, and created around real user needs. My primary goal is to make 360Calculator a trusted resource where people can confidently find accurate calculators and clear, helpful information. My mission is simple: build calculator tools that are accurate, transparent, and genuinely useful, while continuously improving their quality through testing, research, and regular updates.

View profile →

A sample size calculator works out the minimum number of people you need to survey or study so the results you get can actually be trusted. You tell it four things, roughly how many people make up your total population, how confident you want to be in the outcome, how much margin of error you can live with, and what proportion of responses you expect, and it hands back a number. The sections below walk through what each of those inputs means, the formula running behind the scenes, and how to read the result once you have it.

What is sample size in statistics?

Sample size is simply the number of people, or units, you actually measure out of a much larger group. That larger group is your population, the full set of people, customers, or records you care about. A sample is a smaller, manageable slice of that population, and sample size is just the count of that slice.

It's worth keeping sample size, population size, and the number of responses you collect separate in your head because they get mixed up constantly. Population size is the total group you're trying to understand. Sample size is the number you actually need to reach a reliable conclusion. Responses are whatever number you end up collecting, which may fall short of your target sample size if people don't respond.

Surveying an entire population almost never happens in practice. If you wanted honest opinions from every adult in the United States, you'd be dealing with a population of well over 330 million people, which isn't realistic for cost or time reasons. Instead, researchers pull a sample that's small enough to manage but large enough to represent the whole group fairly.

Why does sample size determine research accuracy?

The bigger your sample, the tighter your margin of error gets and the more confidence you can have that your results reflect reality. A small sample can swing wildly from the true population figure just by chance, while a larger one smooths that noise out.

That said, going bigger isn't free, and it isn't always necessary. Not every survey needs to be statistically airtight. If you're gathering internal feedback from your team or running a quick poll for a blog post, a small, non-representative sample can still be genuinely useful. Statistical rigor starts to matter once real money, policy, or a published claim depends on the number being right.

What inputs does the sample size calculator need?

The calculator asks for four pieces of information: your population size, the confidence level you want, the margin of error you're willing to accept, and the proportion you expect your results to land on. Each one pushes the final number up or down, and understanding what they mean makes the result far easier to trust.

What is population size, and how do you estimate it?

Population size is the total number of people, customers, or units in the group you're studying. If you're surveying employees at a 300-person company, your population is 300. If you're researching an entire city of 500,000 residents, that's your population.

Once your population passes somewhere around 20,000 to 100,000, the required sample size barely moves regardless of how much bigger the population gets. Because of that, most calculators let you leave this field blank or mark the population as unknown when you're dealing with a very large or open-ended group, and the result won't change much either way.

What is a confidence level and which value should you choose?

Confidence level tells you how sure you can be that your sample actually reflects the real population. A 95 percent confidence level, the standard most researchers default to, means that if you repeated the same survey a hundred times, about 95 of those samples would produce a result within your stated margin of error.

Each confidence level corresponds to a fixed z-score used inside the formula:

Confidence level

Z-score

70%

1.04

75%

1.15

80%

1.28

85%

1.44

90%

1.65

95%

1.96

99%

2.58

99.9%

3.29

Ninety-five percent works for most surveys and business research. Ninety percent is common for lower stakes, exploratory work where a wider margin is acceptable. Ninety-nine percent, or higher, tends to show up in clinical research or anywhere a wrong conclusion would be expensive.

What is margin of error, and how does it affect sample size?

The margin of error is the plus or minus range around your result. If 82 percent of your sample says yes and your margin of error is 3 percent, the true figure for your whole population most likely sits somewhere between 79 and 85 percent.

You will sometimes hear people use margin of error and confidence interval interchangeably, and while that's common in casual conversation, they aren't quite the same thing. The margin of error is the size of that plus or minus range. The confidence interval is the actual range itself, built from your result plus and minus the margin of error.

Most surveys land somewhere between a 3 and 8 percent margin of error. Tightening that margin means demanding more precision from your data, which pushes your required sample size up. Loosening it lets you get away with fewer respondents.

What is the expected proportion, and why does 50 percent give the safest estimate?

The expected proportion, often written as "p," is your best guess at how your results will split. If you think 60 percent of respondents will say yes, you would set p to 0.6.

When you have no idea what to expect, 50 percent is the safe default because it produces the largest possible required sample size, which protects you from undersampling. If you do have a reasonable estimate already, use it instead. Say prior research suggests about 6 percent of a population fits a particular trait, you would plug in 0.06 rather than 0.5. Or if you already observed that 40 out of 500 people you talked to had that trait, your proportion is 40 divided by 500, or 0.08. Using the real number instead of the 50 percent default usually shrinks the sample size you need.

How does each input affect the accuracy of your result?

It helps to see all four variables side by side and how nudging each one changes your accuracy.

Input

Effect of increasing it

Effect of decreasing it

Population size

Slightly lowers accuracy

Slightly raises accuracy

Sample size

Raises accuracy

Lowers accuracy

Confidence level

Raises accuracy, needs a bigger sample

Lowers accuracy, needs a smaller sample

Margin of error

Lowers accuracy

Raises accuracy, needs a bigger sample

Sample size and confidence level move accuracy in the same direction; you would expect more of either to get you closer to the truth. Margin of error works backwards. A smaller margin means you are demanding more precision, so it actually requires a larger sample to achieve.

What formula does the calculator use to compute sample size?

For estimating a proportion, the standard formula is:

n = (z² × p × (1 − p)) / e²

Here, z is the z-score tied to your confidence level, p is your expected proportion, and e is your margin of error written as a decimal. This version of the formula is built for estimating proportions, like the percentage of people who prefer one option over another, not for comparing averages between groups, which uses a different approach entirely.

Here is how it plays out with real numbers. Say you want to estimate what share of U.S. supermarket shoppers identify as vegan with 95 percent confidence, a 5 percent margin of error, no strong prior estimate so p equals 0.5, and an unlimited population. Plugging those into the formula gives n equal to 1.96 squared times 0.5 times 0.5, divided by 0.05 squared, which works out to 384.16. Rounded up, that is a sample size of 385.

How is the finite population correction applied?

The formula above assumes your population is effectively infinite, or at least large enough that it doesn't matter. Once you are working with a smaller, fully known population, generally under about 20,000 to 100,000, a correction factor gets applied to shrink the required sample size, since sampling from a smaller pool naturally captures more of the total picture.

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

where n₀ is the sample size from the uncorrected formula and N is your population size. As an example, a university department with 850 students wants to evaluate a new curriculum at 95 percent confidence with a 5 percent margin of error. The uncorrected formula gives 385, but once the correction for a population of 850 is applied, the required sample size drops to about 265 students.

How do you read and use the calculator's result?

The number the calculator gives you back is the minimum number of completed responses you need, not the number of people you should reach out to. Those are two different things, and mixing them up is one of the most common planning mistakes.

Two examples make the relationship between your inputs and the output easier to see.

Scenario

Population

Confidence level

Margin of error

Required sample size

Citywide survey

500,000

95%

5%

About 384

Small company survey

300 employees

80%

10%

About 37

Notice how much the second scenario shrinks. Lowering the confidence level and widening the margin of error both cut the required sample size sharply, which is exactly why a quick internal survey can get away with a fraction of the respondents a citywide study would need.

What sample size is typical for common population sizes?

At 95 percent confidence and a 5 percent margin of error, the sample size needed scales down as the population shrinks, thanks to the finite population correction covered above.

Population size

Required sample size (95% confidence, 5% margin of error)

500

About 218

1,000

About 278

10,000

About 370

100,000

About 383

1,000,000 or unknown

About 385

Notice the number barely moves after 100,000. That is the effect described earlier; once a population gets large enough, adding more people to it stops changing how many you need to sample.

Does the right sample size change by survey or study type?

The honest answer is that it depends heavily on what you are using the data for.

Survey type

Typical sample size need

Employee or HR surveys

Often fine with a smaller sample, since the goal is spotting themes, not proving a statistic

Customer satisfaction surveys

Reading every individual response usually matters more than hitting a large count

Market research and polling

Needs a statistically significant sample, since budgets and decisions ride on the result

Healthcare and academic research

Needs a statistically significant sample when findings will be published or used clinically

Casual or internal surveys

Doesn't need a formal sample size calculation at all

If you are just trying to get a feel for how your team is doing, do not get hung up on hitting a textbook sample size. Save the rigorous calculation for situations where a wrong number would actually cost you something.

What mistakes lower the accuracy of a sample size calculation?

A few habits quietly undermine an otherwise solid sample size calculation.

● Confusing population size with sample size and entering the wrong number into the wrong field.

● Skipping the expected response rate when planning outreach, then ending up with far fewer completed responses than actually needed.

● Leaving the proportion at the 50 percent default even when a reasonable estimate already exists from earlier research.

● Treating margin of error and confidence interval as the same thing when comparing results.

● Comparing two different calculators without first checking that their confidence level and margin of error settings actually match.

Most of these come down to reading the inputs carefully before hitting "calculate," rather than any flaw in the math itself.

How does sample size fit into the rest of your research process?

Working out your sample size is really just the first step. Once your data starts coming in, the questions shift. You will want to check whether your actual margin of error holds up against the responses you collected, build a confidence interval around your result, test whether a difference you are seeing is statistically significant, or, if you are comparing two versions of something, size out a proper A/B test or trial. Each of those is its own calculation, built on the same core ideas covered above, and each gets its own dedicated tool below.

How do you recalculate the margin of error once responses are in?

Once your survey closes, you can go back and recalculate your margin of error using the actual proportion your respondents gave you, rather than the estimate you planned around. That real number often looks a little different from your planning stage figure. If you want to check exactly how precise your finished survey turned out to be, the margin of error calculator walks through it using your actual results.

How do you build a confidence interval from your survey results?

With your data collected, a confidence interval is the real range built around your observed result, using the same z-score and margin of error ideas covered earlier on this page. It tells you where the true population figure most likely falls, not just your single sample estimate. The confidence interval calculator builds that range for you once you have your final numbers.

How is sample size calculated for A/B tests and clinical trials comparing two groups?

Comparing two groups, an A/B test between two page designs, or a clinical trial between a treatment and a control, works differently from estimating a single proportion. Instead of just population, confidence level, and margin of error, you are also working with alpha, the chance of a false positive, usually set at 0.05, power, the chance of actually catching a real difference if one exists, usually 80 percent, and the minimum effect size that would actually matter to you. If you are planning a test like this, the A/B test sample size calculator handles the extra variables for you.

How do you check whether your results are statistically significant?

Once your data is in, the next question is usually whether a difference you are seeing between two survey groups, two product variants, or two time periods is real or just noise. That is a separate calculation from sample size planning, done after the fact rather than before. The statistical significance calculator checks that for you against your actual results.

How many people should you invite based on expected response rate?

The sample size your calculator gives you is the number of completed responses you need, not the number of invitations to send. If you expect a 30 percent response rate and need 500 completed responses, you would need to invite roughly 1,666 people, since 500 divided by 0.30 works out to that figure. The survey response rate calculator does that math for you once you know roughly how many people typically respond to your outreach.


Leave Your Feedback

Help us improve this calculator

Rating

Recent Feedback

No feedback yet.