Hotjar + Contentsquare 🎉 Hotjar + Contentsquare: we’re joining forces to build better experiences for all. 🎉 Learn more

Sample size calculator

Hotjar's free sample size calculator

Running a customer survey and not sure how big your random sample size should be? Our calculator will show you the minimum recommended sample size you need based on your desired level of precision.

To calculate how many responses you need for feedback polls or surveys, enter the values for the population size, confidence level, and margin of error into the calculator.

Your suggested sample size is:


Now that you know your ideal sample size,
start creating your own Polls and Surveys!

Join over 300,000+ companies who collect user feedback with website surveys.
No credit card required

What is a sample size?

A sample size is a total number of data points collected in a study (e.g., the number of responses to a single survey question). Identifying sample size is key to determining whether data accurately reflects the population as a whole. A larger sample size generally means greater accuracy.

What is Slovin’s Formula?

Slovin’s formula is used to calculate the sample size necessary to achieve a certain confidence interval when sampling a population. This formula is used when you don’t have enough information about a population’s behavior (or the distribution of a behavior) to otherwise know the appropriate sample size.

Slovin’s formula is written as: n= N / (1+Ne2)

n= the number of samples
N=the total population

How the sample size calculator works

The calculator helps you determine the number of people you need to survey (your sample size calculation) based on the level of accuracy you want to achieve. Accuracy is determined by the following three variables:

1. Population size

Population size is the total number of people in the audience you want to study. For example, if you want to use an on-page survey to study your website visitors, and you have 500,000 unique visitors per month, enter “500000” as your population size. 

2. Confidence level

Confidence level determines how certain you can be of your results. The industry standard for market research is a 95% confidence level, which means that if you ran the experiment 20 times, you’d get the same results (within a certain margin of error) 19 times. 

3. Margin of error

Margin of error (or confidence interval) is the amount your data would be expected to vary if you ran the survey multiple times.

For example, let’s say you asked your users a simple “yes or no” question, and 80% answered “yes” (the question itself doesn’t matter). If you had a margin of error of 5%, with a confidence level of 95%, then running this experiment 20 times would mean that 75% - 85% would answer “yes” in approximately 19 out of 20 experiments.

Lower limit: 80% - 5% = 75%
Upper limit: 80% + 5% = 85%

Don’t know your numbers?
If you don’t know your numbers, you can submit the form using industry standards. These default figures appear in the calculator when you load the page (Population size: 20000, Confidence rate: 95%, Margin of error: +/-5%).


External factors that affect survey accuracy

No random sampling is a perfect representation of an entire target population, but you can get close. The following factors can impact accuracy, and understanding them will help you create better surveys.

Population size
If your population size is small, you’ll need to sample a much larger percentage of your population. As the following chart shows, once your population is large enough, boosting your sample size does little (or nothing) to increase accuracy.

*Accuracy = 95% confidence rate w/5% margin of error.

Non-response errors
If your questions discourage certain segments from responding, you’ve got a built-in non-response bias. For example, if you ask clients whether they’ve ever downloaded movies illegally, the “yes” crowd may be less likely to respond for obvious reasons—and that skews your data.

Selection errors
Selection errors occur when you sample a group of people outside the demographic you want to study (e.g., you want to study all your website visitors, but you only collect feedback from your paying customers).

Sampling errors

Sampling errors occur when a certain demographic is overrepresented in your sample (e.g., you have a 50-50 mix of men and women, but for whatever reason, more women respond).

3 golden rules to get solid data with sample sizes

1) The bigger your sample, the better the results (up to a point).

2) A smaller margin of error requires a larger population size.

3) A higher confidence level requires a larger sample size.

4 surveys you can use to improve your business

Collecting accurate survey data can help you better understand your users and improve your products and messaging in a variety of ways.

Market research
Market research is any set of techniques used to better understand a company’s target market. Companies use market research to adapt their products and messaging to market demand. When gathering market research data, use the calculator to achieve a large enough sample size.

Customer satisfaction
Customer satisfaction surveys can help identify areas for improvement. That said, the sample size isn’t super important here because the scores don’t matter nearly as much as the reasons behind them. Study as much feedback as possible to understand what’s working and what isn’t.

Net Promoter Score
Net Promoter Score (NPS) is a popular way to measure customer loyalty, ranging from -100 to 100 (the higher the number, the more they love you).

Net Promoter, Net Promoter System, Net Promoter Score, NPS, and the NPS-related emoticons are registered trademarks of Bain & Company, Inc., Fred Reichheld, and Satmetrix Systems, Inc

Post-purchase surveys
Sending surveys to your customers after they’ve made a purchase, asking how you’re doing and what you can improve, will give you a good sense of how to hold onto good customers and how to win new ones.

Read more

The best way to get good at surveys is to dive right in. Take a look at our ultimate guide to survey questions to get inspired while the knowledge is fresh!