
Standard Deviation Calculator
Free standard deviation calculator with step-by-step solutions. Quickly find the mean, variance, and standard deviation for sample or population data sets.
| Sample | Population | |
|---|---|---|
| Standard Deviation | σ = 5.3385 | s = 4.9937 |
| Variance | σ2 = 28.5 | s2 = 24.9375 |
| Count | n = 8 | n = 8 |
| Mean | μ = 18.25 | x̄ = 18.25 |
| Sum of Squares | SS = 199.5 | SS = 199.5 |
There was an error with your calculation.
Last updated: June 3, 2026
Table of Contents
- The Standard Deviation
- The Population Standard Deviation
- The Sample Standard Deviation
- Margin of Error
- The Confidence Interval
Our standard deviation calculator is a powerful, user-friendly tool designed to find the standard deviation of any data set. Beyond computing standard deviation, it instantly generates vital statistical insights, including the mean, variance, and a detailed frequency distribution table. Furthermore, this tool calculates the confidence interval of your dataset across various confidence levels.
To get started, simply enter your data points separated by commas. Next, select whether your numbers represent a full population or a sample, and click "Calculate" to view your comprehensive results.
The Standard Deviation
Standard deviation is a fundamental statistical measure that indicates the degree of spread, or variability, within a given dataset. It represents the average distance of your data points from the dataset's mean. A lower standard deviation means the data points cluster closely around the mean, while a higher standard deviation indicates the data is widely spread out. Mathematically, the standard deviation is the square root of the variance—another critical measure of data dispersion.
How you calculate standard deviation depends entirely on your dataset. If your data includes every single member of the group you are studying, you will calculate the population standard deviation. However, if your data is only a subset of a larger group, you will calculate the sample standard deviation.
The Population Standard Deviation
You should calculate the population standard deviation when your dataset includes every possible observation within your group of interest. In statistics, the population standard deviation is denoted by the symbol σ.
σ (pronounced "sigma") is a lowercase Greek letter. The formula for the population standard deviation is as follows:
$$\sigma=\sqrt{\frac{\sum_{i=1}^{N}{(x_i-\mu)^2}}{N}}$$
Where:
- Σ is the Greek capital letter Sigma, which denotes summation in mathematics;
- xᵢ represents each individual data point (observation) in the dataset, starting from the first value to the Nth (last) value;
- μ represents the population mean;
- N is the total population size.
Example of calculating the standard deviation of a general population
The following example demonstrates how to find the standard deviation of population data.
Investors often view stocks as risky assets due to their high price volatility compared to other investment classes. Suppose an investment manager wants to analyze the volatility of specific stocks over the previous month. He decides he will not recommend any stock to his clients if its standard deviation is greater than or equal to its mean, classifying such assets as "too risky."
Below are all the daily closing prices (in USD) for a particular stock over the previous month. Let's calculate the standard deviation to determine if the manager will consider this stock too risky:
1.31, 1.30, 1.36, 1.40, 1.40, 1.41, 1.27, 1.19, 1.15, 1.12, 0.99, 1.00, 0.97, 0.94, 0.88, 0.90, 0.86, 0.88, 0.80, 0.81
Because the manager is only interested in the stock prices of the previous month, and we have all the recorded prices for that specific timeframe, we are working with the entire population. Therefore, we will use the population standard deviation formula.
To find the standard deviation, we must first calculate the mean (μ). Remember, the mean is found by dividing the total sum of the numbers by the total count of the numbers.
$$\mu=\frac{1.31+1.30+1.36+1.40+1.40+1.41+1.27+1.19+1.15+1.12+0.99+1.00+0.97+0.94+0.88+0.90+0.86+0.88+0.80+0.81}{20}=1.097$$
Next, subtract the mean from each individual data point and square the difference. Add all these squared differences together, and divide the result by the total count. This result is the variance (σ²).
$$\sigma^2=\frac{\left(1.31-1.097\right)^2+\left(1.30-1.097\right)^2+\left(1.36-1.097\right)^2+\left(1.40-1.097\right)^2+\ldots+\left(0.81-1.097\right)^2}{20}=0.045031$$
Finally, take the square root of the variance to determine the population standard deviation.
$$\sigma=\sqrt{0.045031}\approx0.21$$
As you can see, the standard deviation of this stock's prices for the previous month (0.21) is less than the mean (1.097). Therefore, the manager will not consider this stock "too risky."
The Sample Standard Deviation
You should calculate the sample standard deviation when your dataset is merely a sample (a smaller subset) drawn from a larger population of interest. The sample standard deviation is denoted by the letter s and is calculated using the following formula:
$$s=\sqrt{\frac{\sum_{i=1}^{n}\left(x_i-\bar{x}\right)^2}{n-1}}$$
Where:
- Σ denotes summation;
- xᵢ represents each individual data point;
- x̄ represents the sample mean;
- n is the sample size.
Let's illustrate how to find the sample standard deviation using a variation of the previous example. Suppose the investment manager wants to analyze the same stock, but this time, he does not have access to the closing prices for every single trading day of the previous month. Instead, he only has the closing prices for a random sample of 5 days. He will need to estimate the stock's standard deviation using this limited sample data.
Let us assume the 5 recorded closing prices are:
1.31, 1.40, 0.86, 0.88, 1.40
Even though the manager's ultimate interest lies in the entire previous month, he only possesses a 5-day subset. Because we are dealing with a sample rather than the full population, we must calculate the standard deviation using the sample standard deviation formula.
First, calculate the sample mean (x̄).
$$\bar{x}=\frac{1.31+1.40+0.86+0.88+1.40}{5}=1.17$$
Next, calculate the sample variance (s²).
$$s^2=\frac{\left(1.31-1.17\right)^2+\left(1.40-1.17\right)^2+\left(0.86-1.17\right)^2+\left(0.88-1.17\right)^2+\left(1.40-1.17\right)^2}{5-1}=0.0764$$
Finally, take the square root of the variance to get the sample standard deviation.
$$s=\sqrt{0.0764}\approx 0.28$$
Margin of Error
One of the most valuable applications of standard deviation is calculating an "acceptable" range of values, which plays a crucial role in predictive analytics and industrial statistical quality assurance. If the underlying data follows a normal distribution, this range is known as the confidence interval (detailed in the next section). These intervals are calculated at various confidence levels, usually expressed as percentages.
The margin of error is a key component of the confidence interval that dictates its overall width. Essentially, the margin of error establishes the maximum and minimum acceptable values for the metric you are analyzing.
The margin of error is calculated using this formula:
$$Margin\ of\ error\ = z_{\alpha/2}\left(\dfrac{\sigma}{\sqrt{n}}\right)$$
We apply this formula when the population standard deviation (σ) is known, provided the sample size is sufficiently large (typically n > 30).
When the population standard deviation is unknown and the sample is small (typically n ≤ 30), we use the following formula instead:
$$Margin\ of\ error\ = t_{n-1,\alpha/2}\left(\frac{s}{\sqrt{n}}\right)$$
In this scenario, we substitute the population standard deviation (σ) with the sample standard deviation (s).
The components \$z_{\alpha/2}\$ and \$t_{n-1, \alpha/2}\$ are known as critical values. They are determined using z-statistics and t-statistics, respectively, and act as constants tied to your chosen confidence level.
The most common confidence levels used in statistical analysis are 90%, 95%, and 99%. Their corresponding \$z_{\alpha/2}\$ critical values are 1.645 (for 90%), 1.96 (for 95%), and 2.575 (for 99%).
The components \$\frac{\sigma}{\sqrt n}\$ and \$\frac{s}{\sqrt n}\$ represent the standard error.
- \$\frac{\sigma}{\sqrt n}\$ is used when we know the population standard deviation (σ) and have a large sample size (typically n > 30).
- \$\frac{s}{\sqrt n}\$ is used when we do not know the population standard deviation and are working with a small sample size (typically n ≤ 30). Because σ is unknown, we must rely on the standard deviation of our available sample (s).
The Confidence Interval
As mentioned above, the confidence interval is a statistical range of values within which a given population parameter is expected to fall, based on a specific confidence level.
For instance, a statistician might state that the average height of 13-year-old girls falls between 59 inches and 66 inches at a 90% confidence level. This means that if we were to take multiple random samples of 13-year-old girls, about 90% of the time, their average height would lie between those two bounds.
When the population standard deviation is known, the confidence interval is calculated using the following formula:
$$\bar{x}± z_{\alpha/2}\left(\frac{\sigma}{\sqrt{n}}\right)$$
- x̄ is the sample mean,
- \$z_{\alpha/2}\$ is the critical value,
- σ is the population standard deviation,
- n is the number of observations.
If we do not know the population standard deviation (σ) and must use the sample standard deviation (s) instead, we use this alternative formula:
$$\bar{x}± t_{n-1,\alpha/2}\left(\frac{s}{\sqrt{n}}\right)$$
- x̄ is the sample mean,
- \$t_{n-1,\alpha/2}\$ is the critical value,
- s is the sample standard deviation,
- n is the number of observations.
As detailed in the previous section, the expressions \$z_{\alpha/2}\left(\frac{\sigma}{\sqrt{n}}\right)\$ and \$t_{n-1,\alpha/2}\left(\frac{s}{\sqrt{n}}\right)\$ represent the margins of error.
Example of confidence interval calculation
Suppose we know that the daily stock prices we are analyzing follow a normal distribution. We have the following sample of 10 stock prices at our disposal:
1.31, 1.36, 1.40, 1.27, 1.15, 0.99, 0.97, 0.88, 0.86, 0.80
We want to calculate the range within which the true average stock price will fluctuate, with a 95% level of confidence.
Because this is a small sample and the population standard deviation is unknown, we will use the sample standard deviation and the corresponding t-statistic formula:
$$\bar{x}± t_{n-1,\alpha/2}\left(\frac{s}{\sqrt{n}}\right)$$
- x̄ is the sample mean: 1.10
- \$t_{n-1,\alpha/2}\$ is the critical value: \$t_{9, 0.025}\$ = 2.26 (critical values for a given sample size and confidence level are typically found using a standard t-table or z-table)
- s is the sample standard deviation: 0.23
- n is the number of observations: 10
- \$\frac{s}{\sqrt n}\$ is the standard error: \$\frac{0.23}{\sqrt{10}}=0.07\$
Now, we plug these numbers into our confidence interval formula:
$$\bar{x}± t_{n-1,\alpha/2}\left(\frac{s}{\sqrt{n}}\right)$$
Calculating the lower and upper bounds, we get:
$$1.10 - 2.26 (\frac{0.23}{\sqrt{10}}) = 1.10 - 2.26 (\frac{0.23}{3.16}) = 1.10 - 2.26 × 0.07 = 1.10 - 0.16 = 0.94$$
$$1.10 + 2.26 (\frac{0.23}{\sqrt{10}}) = 1.10 + 2.26 (\frac{0.23}{3.16}) = 1.10 + 2.26 × 0.07 = 1.10 + 0.16 = 1.26$$
This result means we can be 95% confident that the true average share price for this stock lies within the confidence interval of (0.94, 1.26).



