Standard deviation calculator

    This standard deviation calculator finds the mean, variance, and standard deviation of any dataset, for a sample or a full population. Paste numbers separated by commas, spaces, or line breaks and the result appears with every calculation step shown.

    Tip: You can paste data from Excel or Google Sheets. We accept commas, spaces, or line breaks.

    Related calculators

    How to calculate standard deviation by hand

    The calculation follows five steps. This worked example uses the dataset 2, 4, 4, 4, 5, 5, 7, 9 and computes the population standard deviation.

    1. Count and sum the values: 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40, with 8 values.
    2. Find the mean: 40 / 8 = 5.
    3. Subtract the mean from each value and square the result: 9, 1, 1, 1, 0, 0, 4, 16. Add them: 32.
    4. Divide by the count for a population: 32 / 8 = 4. This is the variance.
    5. Take the square root: √4 = 2. The standard deviation is 2.

    For a sample, step 4 divides by n - 1 instead: 32 / 7 ≈ 4.57, so the sample standard deviation is √4.57 ≈ 2.14.

    Sample or population: which one to pick

    Pick population when the dataset contains every member of the group being described, such as the test scores of one class. Pick sample when the dataset is a subset used to estimate a larger group, such as 200 voters polled from a whole city.

    When in doubt, most statistics courses and research papers default to the sample formula. It matches Excel's STDEV.S, Google Sheets' STDEV, and the SD function in R.

    Frequently asked questions

    What is standard deviation?

    Standard deviation measures how spread out the values in a dataset are around the mean. A small standard deviation means the values cluster tightly near the average, and a large one means they are spread far apart. It is expressed in the same units as the original data.

    What is the difference between sample and population standard deviation?

    Population standard deviation divides by n, the full count of values, and is used when the data covers the entire group. Sample standard deviation divides by n - 1 (Bessel's correction) and is used when the data is a subset drawn from a larger group. The sample version is slightly larger, which corrects the bias that comes from estimating spread from incomplete data.

    How is variance related to standard deviation?

    Variance is the average of the squared deviations from the mean, and standard deviation is its square root. Variance is useful inside formulas and statistical tests, while standard deviation is easier to interpret because it is measured in the same units as the data.

    Why does Excel have STDEV.S and STDEV.P?

    Excel splits the calculation into two functions because the divisor changes. STDEV.S divides by n - 1 for samples and STDEV.P divides by n for populations. Google Sheets uses the same naming, and the sample option in this calculator matches STDEV.S exactly.

    When is standard deviation better than the interquartile range?

    Standard deviation works best for roughly symmetric, bell-shaped data without extreme outliers, because it uses every value. The interquartile range is more robust when the data is skewed or contains outliers, because it depends only on the middle 50 percent. Many analysts report both.

    Related tools and guides

    Last updated: September 30, 2026