# Survey sample size and representation

Sample size for survey project should be planned prior to conducting the survey. In general, there are different ways to plan the optimal size.

**The rule of thumb**

A sample size of 100 is the minimum you need for meaningful results. If your population is smaller than that, you should aim to survey all of the members. The maximum number of respondents should be 10% of your population, but it should not exceed 1000.

### Sample size calculator

This code creates a simple form that asks the user for the population size, margin of error, and confidence level. When the user submits the form, the JavaScript code calculates the necessary sample size and displays it in an alert box.

#### Survey Sample Size Calculator

**Instructions on its use**

Population Size: This refers to the total number of people or items in the group that you are interested in studying. For example, if you want to conduct a survey to study the eating habits of people in a city, the population size would be the total number of people living in that city. A practical example: Suppose you want to study the reading habits of students in a university with a total student population of 10,000.

Margin of Error: This refers to the degree of error that is acceptable in your survey results. It is usually expressed as a percentage. For example, a margin of error of 5% means that the actual survey results could be off by as much as 5% in either direction. A practical example: Suppose you want to conduct a survey to study the satisfaction levels of students with the quality of teaching in their department, and you want a margin of error of 3%.

Confidence Level: This refers to the level of confidence you have in your survey results. It is usually expressed as a percentage, and it tells you how likely it is that your survey results will fall within the margin of error. A confidence level of 95% means that there is a 95% chance that your survey results will fall within the margin of error. A practical example: Suppose you want a confidence level of 90% for the survey on student satisfaction with teaching quality.

Input the values for the population size, margin of error, and confidence level in the respective fields of the survey sample size calculator. An example: Using the values from the examples above, input 10,000 for the population size, 3 for the margin of error, and 90 for the confidence level. The calculator will display the required sample size, which in this case would be 1,068.