Mean and Standard Deviation Calculator

Use this Mean and Standard Deviation Calculator to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Numbers

Mean

▼ See explanations and tips below ▼

What Are Mean and Standard Deviation?

Mean and standard deviation are two of the most common ways to summarize a numeric dataset. The mean describes the center of the data, while the standard deviation describes how spread out the values are around that center.

The mean is the arithmetic average. It answers a question such as, “What is the typical value if the total were shared evenly across all observations?” For example, if several students have test scores, the mean score gives one summary of overall performance.

The standard deviation answers a different question: “How much do the values usually vary from the mean?” A small standard deviation means the values are clustered close to the mean. A large standard deviation means the values are more spread out.

Together, the mean and standard deviation help you describe both the center and the variability of a dataset. That is why they are used in statistics, education, research, quality control, finance, science, and many everyday data summaries.


Why Descriptive Statistics Matter

Raw data can be hard to understand by inspection alone. A list of 50 measurements, scores, prices, or times may contain useful patterns, but those patterns are easier to see when the data is summarized.

Descriptive statistics help you:

  • Compare datasets without reading every value one by one.
  • Spot unusual values that may need a closer look.
  • Understand whether values are consistent or highly variable.
  • Choose a better measure of center, such as the median instead of the mean, when the data is skewed or has extremes.
  • Communicate results clearly in reports, homework, research notes, dashboards, and quality checks.

The mean is often useful, but it does not tell the whole story. Two datasets can have the same mean and very different spreads. Standard deviation, variance, range, median, mode, and a simple plot all add context.


Key Terms to Know

  • Observation: One numeric value in the dataset.
  • Count: The number of active numeric observations included in the calculation.
  • Mean: The arithmetic average of the observations.
  • Deviation: The difference between an observation and the mean.
  • Variance: The average squared deviation from the mean, using the selected sample or population denominator.
  • Standard deviation: The square root of the variance. It brings the spread measure back to the same unit as the original data.
  • Sample standard deviation: A standard deviation calculated from data treated as a sample from a larger population.
  • Population standard deviation: A standard deviation calculated from data treated as the full population of interest.
  • Median: The middle value after sorting the data, or the average of the two middle values when the count is even.
  • Mode: The most frequently occurring value or values.
  • Range: The maximum value minus the minimum value.
  • Z-score: A value’s distance from the mean measured in standard deviations.
  • Outlier: A value that appears unusually far from the rest of the data and may deserve investigation.

How Mean and Standard Deviation Work

Start with numeric values \(x_1, x_2, \ldots, x_n\). The mean is found by adding all values and dividing by the number of values:

$$ \bar{x} = \frac{\sum_{i=1}^{n} x_i}{n} $$

Where:

  • \(x_i\) = one observation
  • \(n\) = number of observations
  • \(\bar{x}\) = sample mean

After finding the mean, standard deviation measures how far the observations tend to be from that mean. The process is:

  1. Subtract the mean from each value.
  2. Square each deviation so negative and positive deviations do not cancel out.
  3. Add the squared deviations.
  4. Divide by the correct denominator.
  5. Take the square root.

For a sample, the variance and standard deviation are:

$$ s^2 = \frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n - 1} $$
$$ s = \sqrt{\frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n - 1}} $$

For a population, the variance and standard deviation are:

$$ \sigma^2 = \frac{\sum_{i=1}^{N}(x_i - \mu)^2}{N} $$
$$ \sigma = \sqrt{\frac{\sum_{i=1}^{N}(x_i - \mu)^2}{N}} $$

Where:

  • \(s^2\) = sample variance
  • \(s\) = sample standard deviation
  • \(\sigma^2\) = population variance
  • \(\sigma\) = population standard deviation
  • \(\mu\) = population mean
  • \(N\) = population size

The sample formula uses \(n - 1\) because a sample is being used to estimate variation in a larger population. The population formula uses \(N\) because the entered data is treated as the whole population of interest.

A z-score uses the standard deviation selected for the calculation to describe how far one value is from the mean. In sample mode the denominator is the sample standard deviation \(s\); in population mode it is the population standard deviation \(\sigma\):

$$ z = \frac{x_i - \bar{x}}{d}, \quad d = \begin{cases} s & \text{(sample mode)} \\ \sigma & \text{(population mode)} \end{cases} $$

A positive z-score means the value is above the mean. A negative z-score means it is below the mean. A z-score near \(0\) means the value is close to the mean.


Examples of Mean and Standard Deviation in Practice

Example 1: A Simple Dataset

Suppose the values are:

$$ 2,\ 4,\ 4,\ 4,\ 5,\ 5,\ 7,\ 9 $$

The sum is \(40\), and there are \(8\) values:

$$ \bar{x} = \frac{40}{8} = 5 $$

The mean is \(5\).

The sum of squared deviations from the mean is \(32\). If these values are treated as the full population, the variance is:

$$ \sigma^2 = \frac{32}{8} = 4 $$

So the population standard deviation is:

$$ \sigma = \sqrt{4} = 2 $$

If the same values are treated as a sample, the variance is:

$$ s^2 = \frac{32}{8 - 1} = \frac{32}{7} \approx 4.571429 $$

So the sample standard deviation is:

$$ s = \sqrt{4.571429} \approx 2.13809 $$

This example shows why sample and population standard deviation can differ even when the data values are the same.


Example 2: A Small Set with a Repeated Value

Consider this dataset:

$$ 12,\ 15,\ 15,\ 18,\ 20,\ 21,\ 24 $$

The count is \(7\), and the sum is \(125\):

$$ \bar{x} = \frac{125}{7} \approx 17.857143 $$

The median is \(18\) because \(18\) is the middle value after sorting. The mode is \(15\) because it appears more often than any other value. The range is:

$$ 24 - 12 = 12 $$

Using sample standard deviation, the variance is approximately \(17.142857\), and the standard deviation is approximately \(4.140393\).

The mean, median, mode, standard deviation, and range each describe a different part of the same dataset.


Example 3: No Spread

If all values are the same, such as:

$$ 10,\ 10,\ 10 $$

Then the mean is \(10\), and every deviation from the mean is \(0\):

$$ 10 - 10 = 0 $$

The variance is \(0\), and the standard deviation is also \(0\). This means there is no spread: every active value is identical.


How to Interpret the Result

The main result is the mean of the active numeric values. It is a center point, not a guarantee that any individual observation equals or even comes close to that number.

Standard deviation explains spread in the same implicit unit as the input values. If the input values are test scores, the standard deviation is in score points. If the input values are seconds, the standard deviation is in seconds. Variance is different: because it is based on squared deviations, it is measured in squared input units.

A low standard deviation means the data values are close to the mean. A high standard deviation means the data values vary more widely. A standard deviation of \(0\) means all included values are equal.

Sample and population mode change the denominator used for variance:

  • Use sample standard deviation when the entered values are a sample from a larger group.
  • Use population standard deviation when the entered values are the complete group you want to describe.

The median can be more representative than the mean when the dataset contains a very large or very small value. The mode is helpful when repeated values matter. The range gives a quick look at the distance between the minimum and maximum, but it depends only on the two most extreme values.

A simple outlier hint can be useful for screening, but it should not be treated as a final decision. A value more than two standard deviations from the mean may deserve attention, but it may still be a valid observation. Context, data quality, and the shape of the distribution matter.


Common Mistakes and Misconceptions

Choosing sample or population mode without thinking about the data. The same dataset can produce different standard deviations depending on the denominator. Use sample mode for a sample and population mode for the full population of interest.

Rounding too early. Rounding intermediate values can slightly change the final variance or standard deviation. It is usually better to calculate with full precision and round only the final displayed result.

Assuming blanks are zeros. Blank rows are missing values, not zero values. Treating blanks as zeros would change the mean, standard deviation, sum, range, and other results.

Using comma-formatted numbers in pasted data. If commas are used as separators, a value such as \(1{,}000\) may not be treated as one thousand. Enter large numbers without thousands separators when importing data.

Using decimal commas instead of decimal points. A value such as \(1,5\) may be read as two separate values instead of the decimal value \(1.5\). Use decimal points for decimal values.

Treating the outlier hint as a formal test. A two-standard-deviation screen is only a simple flag. Formal outlier analysis depends on the data distribution, the purpose of the analysis, and the consequences of keeping or removing values.

Expecting nearly equal decimals to count as the same mode. Values must match exactly to be grouped as the same repeated value. For example, \(2.5\) and \(2.5000001\) are different numeric values.

Using mean and standard deviation for every dataset without checking shape. Extreme values and skewed distributions can pull the mean and standard deviation away from the typical middle of the data. In those cases, the median, interquartile range, or a graph may be more informative.


When to Use Mean and Standard Deviation

Use mean and standard deviation when you want to summarize numeric data and understand both center and spread.

They are especially useful for:

  • Comparing test scores, measurements, response times, prices, ratings, or experimental results.
  • Summarizing repeated measurements from a process.
  • Describing variation in a roughly symmetric numeric dataset.
  • Checking whether values are tightly clustered or widely spread.
  • Preparing a quick descriptive statistics summary before deeper analysis.
  • Estimating population variability from a sample.

Mean and standard deviation are less informative when the data is strongly skewed, contains extreme outliers, uses categories instead of numbers, or represents grouped frequency data rather than individual observations.


Limitations and Things to Keep in Mind

Mean and standard deviation summarize data, but they do not explain why the data looks the way it does. They also do not prove that a dataset follows a normal distribution.

Important limitations include:

  • Results depend on the quality of the entered data.
  • Empty rows are ignored rather than treated as zeros.
  • The calculation is unweighted, so every active value counts equally.
  • The method does not handle grouped-frequency data or categorical labels.
  • Sample standard deviation requires at least two active numeric values.
  • Population mode can describe a single active value, but the spread is \(0\) because there is no variation among multiple values.
  • The mode is based on exact numeric equality.
  • The outlier hint uses a simple rule: values more than two selected standard deviations from the mean are flagged.
  • Displayed results are formatted for readability. Ordinary finite nonzero values are shown up to \(6\) decimal places, while very large or very small values may be shown with up to \(8\) significant digits.
  • Variance is in squared units, so it is often less intuitive than standard deviation.
  • Browser-based graph download can depend on support for SVG, canvas, Blob URLs, and image export features.

For important decisions, double-check the data and the calculation. When the result affects research conclusions, money, health, safety, legal obligations, engineering work, or official records, use appropriate statistical methods and consult a qualified professional when needed.


How to Use This Calculator

  1. Enter one numeric observation per row in the Value column.
  2. Add more rows when you need more observations, or delete rows while more than two table rows remain.
  3. Choose sample or population standard deviation.
  4. Optionally paste values separated by spaces, commas, or semicolons.
  5. Use the basic example to load sample data, or clear the table to start over.
  6. Read the main result as the mean.
  7. Review the detail cards for standard deviation, variance, median, mode, outlier hint, sorted values, count, sum, minimum, maximum, and range.
  8. Use the dot plot to compare observations with the mean, median, minimum, maximum, and one-standard-deviation band.
  9. Hover over or focus a dot to see that observation’s value, distance from the mean, z-score, and outlier status.
  10. Download the graph as a PNG if you want to save the dot plot.

Frequently Asked Questions

What is the difference between mean and standard deviation?

The mean tells you the average value. Standard deviation tells you how spread out the values are around that average. Two datasets can have the same mean but very different standard deviations.


Should I use sample or population standard deviation?

Use sample standard deviation when your values are only part of a larger group you want to estimate. Use population standard deviation when your values are the complete group you want to describe. If you are unsure in a typical class or research setting, sample standard deviation is often the expected choice.


Why does sample standard deviation divide by \(n - 1\)?

A sample uses its own mean as an estimate of the population mean. Because that mean is calculated from the same sample data, one degree of freedom is used up. Dividing by \(n - 1\) helps estimate the population variance from the sample.


Can standard deviation be negative?

No. Variance is based on squared deviations, and standard deviation is the square root of variance. Standard deviation is always \(0\) or greater.


What does a standard deviation of \(0\) mean?

It means there is no spread among the included values. Every active observation is the same value, so every deviation from the mean is \(0\).


Is a value more than two standard deviations from the mean always an outlier?

Not always. It is a useful screening rule, but it is not a formal outlier test. A flagged value should be checked in context before deciding whether it is an error, a rare but valid value, or a sign that a different analysis is needed.


Why can the mean and median be different?

The mean uses every value and is affected by very large or very small observations. The median depends on the middle position after sorting, so it is usually less affected by extremes. When the mean and median are far apart, the data may be skewed or may contain unusual values.


Does the calculator include blank rows?

No. Blank rows are ignored. Only active finite numeric values are included in the calculations.


Sources and References

Books

  1. Barbara Illowsky and Susan Dean. Introductory Statistics 2e. OpenStax, 2023. Sections 2.5, “Measures of the Center of the Data,” and 2.7, “Measures of the Spread of the Data.” https://openstax.org/books/introductory-statistics-2e
  2. David M. Diez, Mine Çetinkaya-Rundel, and Christopher D. Barr. OpenIntro Statistics. 4th ed., OpenIntro, Inc., 2019. Chapter 2, “Summarizing Data.” ISBN 978-1943450077. https://www.openintro.org/book/os/

Online and Official Sources

  1. National Institute of Standards and Technology and SEMATECH. “Measures of Scale.” NIST/SEMATECH e-Handbook of Statistical Methods, accessed July 4, 2026. https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm
  2. National Institute of Standards and Technology and SEMATECH. “Detection of Outliers.” NIST/SEMATECH e-Handbook of Statistical Methods, accessed July 4, 2026. https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm