Statistics Calculators
Sample Size Calculator


Sample Size Calculator

This sample size calculator enables you to calculate the minimum sample size and the margin of error. Learn about sample size, the margin of error, & confidence interval.

Sample Size

385

Margin of Error

9.8%

There was an error with your calculation.

Table of Contents

  1. Sample
  2. Margin of error
  3. Confidence Interval
  4. Interconnection between Sample in Statistics, Margin of Error, and Confidence Interval
  5. Formula to calculate Sample Size
  6. Example 1
  7. Example 2
  8. Example 3
  9. Formula to calculate the confidence interval
  10. Example 4

Sample Size Calculator

There are two components to the sample size calculator. The first component is to calculate the sample size, and the second component is to determine the margin of error.

Selecting the confidence level from the drop-down list is the first step in sample size determination. Next, insert the relative margin of error. You can convert the margin of error from absolute to relative terms by dividing the absolute value from the point estimate.

Then, if you know the population proportion, enter it. Otherwise, keep it at 50%. Enter the population size in the last cell if you know it; otherwise, leave it blank. Finally, click the "Calculate".

Use the second component of the calculator to get the margin of error. As the first step, choose a confidence level from the drop-down menu. Enter the study's sample size in the second cell. Afterward, insert the population proportion. Enter the population size in the last cell. If you don't know the population size, leave that cell blank. Lastly, click the "Calculate".

Sample

A part or a portion of the population is known as a sample. The population refers to all the elements of interest in a specific study. Studying every element of the population of your chosen study is the ideal way to examine the population. However, due to many factors, it is frequently impractical to examine every single item in the population. For example, if your research is on insects in the jungle, the population is unlimited. Therefore, you cannot study your entire population. Sometimes when testing, your study's items may be destroyed.

For example, when you open and check the volume of a sealed soft drink bottle, you cannot send that soft drink bottle to the market.

You need much time, money, and other resources to examine the entire population. In most cases, you must complete your research with limited time, money, and other resources. Investigating the entire population is impractical in most cases. The solution is to choose a sample and do the research.

Margin of error

Most of the time, we cannot examine all of the population's components. Hence sample statistics (measures calculated from the sample) are often used to estimate population parameters (measures calculated from the population). Sample statistics are derived from the actual data observed or measured from the sample. We call it a point estimation when you estimate a single number for a population parameter.

For example, if you want to estimate the average volume of a soft drink bottle in a production line, you can choose a random batch and find the average volume of that batch. Let's imagine that batch has an average volume x̄ of 250 ml. Therefore, you estimate that each bottle on the production line contains an average volume \$(\hat{μ})\$ of 250 ml.

In practice, the actual parameter and the estimated parameter are not equal. The difference arises from estimating the parameter using a sample rather than the complete population.

The margin of error is defined as the maximum likely difference between a parameter's point estimate and its actual value. This is often referred to as the estimate's maximum error.

Confidence Interval

The confidence interval represents the range of estimations. The range of estimates or confidence intervals suggests that the parameter was estimated within a specific margin of error. To determine the lower boundary of the confidence interval, the margin of error is subtracted from the point estimate. To determine the upper border of the confidence interval, the margin of error is added to the point estimate.

Interconnection between Sample in Statistics, Margin of Error, and Confidence Interval

Instead of researching the complete population, we are studying a sample to estimate the parameters of the population. Hence there may be a difference between the estimated parameter of the population and the actual parameter of the population. The margin of error is the maximum likely difference between a parameter's point estimate and its actual value. Furthermore, there is an inverse link between sample size and margin of error. A larger sample size will result in a more accurate representation of the population, which will lower the margin of error. Similarly, reducing the sample size increases the margin of error.

The confidence interval will be obtained when you apply this margin of error to the point estimate.

Formula to calculate Sample Size

Different formulas are available to calculate sample size depending on your information.

The desired confidence level determines the degree of accuracy, while the maximum range on the margin of error determines the degree of precision we want to achieve with our range estimate.

We can calculate the minimum sample size required to obtain the desired confidence interval if we also know the population standard deviation by using the below formula.

$$n=\left(\frac{z_{\alpha/2}×\sigma}{E}\right)^2$$

The final result n should be rounded up to the nearest whole number.

The Cochran formula enables you to determine the minimum sample size based on the desired level of margin of error, desired level of confidence, and the expected proportion of the attribute present in the population. The Cochran formula is,

$$n₀=\frac{z^2p(1-p)}{E^2}$$

  • z = Z value from the z-table based on the desired level of confidence
  • p = The expected proportion of the attribute present in the population
  • E = Margin of error

Example 1

Imagine that we are researching international students enrolled in undergraduate courses in Canada. At the outset, we do not have a lot of information. We, therefore, assume that international students make up 60% of all undergraduates in Canada. As a result, the estimated proportion of the attribute in the population is 60%. We desire a 95% confidence level and a 4% margin of error. How many students must be included in the study's minimum sample size?

$$(1-\alpha)=95\%$$

$$z_{α/2}=z_{{95\%}/2}=1.96$$

$$p=60\%$$

$$E=4\%$$

$$n₀=\frac{z²p(1-p)}{E²}=\frac{1.96²×60\%×(1-60\%)}{4\%²}=576.24≈577$$

So, a minimum of 577 students must be included in the study to get desire a 95% confidence level and a 4% margin of error.

The above formula is used when the population size is large or infinite. If the population size is small or finite, then we have to adjust the sample size. The sample size is adjusted using the below formula.

$$n=\frac{n₀}{1+\left(\frac{n₀-1}{N}\right)}$$

  • n₀ = The sample size calculated from the Cochran formula
  • N = Population size
  • n = Adjusted sample size for finite population

Example 2

Imagine that we are researching international students enrolled in undergraduate courses in the college you are studying in Canada. At the outset, we do not have a lot of information. We, therefore, assume that international students make up 60% of all undergraduates in your college. As a result, the estimated proportion of the attribute in the population is 60%. The total number of students in your college is 12,000. We desire a 95% confidence level and a 4% margin of error. How many students must be included in the study's minimum sample size?

In this case, you must first calculate n₀ using the Cochran formula and then adjust the sample size as the population is finite.

$$n₀=\frac{z^2p(1-p)}{{E}^2}=\frac{1.96^2×{60\%}×(1-{60\%})}{{4\%}^2}=576.24$$

$$n=\frac{n₀}{1+\left(\frac{n₀-1}{N}\right)}=\frac{576.24}{1+\left(\frac{576.24-1}{12,000}\right)}=549.88\approx550$$

With a minimum sample size calculator, you can complete the aforementioned complex calculations in less than a second.

Formula to calculate Margin of Error

You can rearrange the sample size formula to find the formula for the Margin of error.

You know that the minimum sample size formula is,

$$n₀=\frac{z^2p\left(1-p\right)}{E^2}$$

Let's make E or the margin of error the subject of the above formula.

$$n₀=\frac{z^2p\left(1-p\right)}{E^2}$$

$${n₀}×{E}^2=z^2p\left(1-p\right)$$

$$E^2=\frac{z^2p\left(1-p\right)}{n₀}$$

$$E=\sqrt{\frac{z^2p\left(1-p\right)}{n₀}}$$

$$E=z\sqrt{\frac{p\left(1-p\right)}{n₀}}$$

Example 3

Imagine that we are researching international students enrolled in undergraduate courses in Canada. At the outset, we do not have a lot of information. We, therefore, assume that international students make up 60% of all undergraduates in Canada. As a result, the estimated proportion of the attribute in the population is 60%. Let's say we desire a 95% confidence level, and you select 577 students for your research. What is the margin of error of your study?

$$z_{{95\%}/2}=1.96$$

$$p=60\%$$

$$n₀=577$$

$$E=z\sqrt{\frac{p\left(1-p\right)}{n_0}}=1.96 \times \sqrt{\frac{60\% \times \left(1-60\%\right)}{577}}=4\%$$

If the population is finite, you must first find the n₀ using the formula below.

$$n₀=\frac{n-nN}{n-N}$$

Then, apply the answer in the following formula to find the margin of error:

$$E=z\sqrt{\frac{p\left(1-p\right)}{n₀}}$$

The second component of the minimum sample size calculator helps you to skip all of these steps and calculate the margin of error in less than a second.

Formula to calculate the confidence interval

The confidence interval is simple to determine if you know the margin of error. The formula shown below is used to compute the confidence interval.

Confidence interval = Point estimate ± Margin of error

The upper boundary of the confidence interval = Point estimate + Margin of error

The lower boundary of the confidence interval = Point estimate - Margin of error

The confidence interval for the mean μ is,

x̄ - E < μ < x̄ + E

The x̄ - E is the lower limit, and the x̄ + E is the upper limit.

The confidence interval for P is,

p - E < P < p + E

Example 4

You are researching the average program cost of international students studying in Canada. You have selected 1,000 students for your sample, and based on your sample, you estimate that the average program cost of international students studying in Canada is CAD 20,000. The margin of error is CAD 5,000. Find the confidence interval for the average program cost of international students studying in Canada.

Upper limit = x̄ + E = CAD 20,000 + CAD 5,000 = CAD 25,000

Lower limit = x̄ - E = CAD 20,000 - CAD 5,000 = CAD 15,000

Therefore, the confidence interval is,

x̄ - E < μ < x̄ + E

CAD 15,000 < μ < CAD 25,000