To calculate standard deviation by hand, find the mean, subtract it from every value, square those deviations, add the squares, divide by the correct denominator, and take the square root. The denominator is N for an entire population and n − 1 for a sample used to estimate a larger population.
Using the six values 10, 8, 10, 8, 8, 4, the mean is 8. Treating them as a sample gives a standard deviation of approximately 2.19. Treating them as the complete population gives 2.00. The arithmetic is identical until the division step, so choosing the right interpretation matters.
As an Amazon Associate I earn from qualifying purchases.
What standard deviation measures
Standard deviation summarizes how dispersed a set of numerical observations is around its mean. A small standard deviation means the observations tend to cluster near the mean; a large standard deviation means they are more spread out. The standard deviation is the square root of variance.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFor example, standard deviation can describe variation in test scores, heights, weights, temperatures, reaction times, production measurements, or periodic investment returns. In personal finance, it is often used as a descriptive measure of the volatility of returns. A larger standard deviation means greater variation in the observed returns; it does not, by itself, prove that an investment is inferior or that its future returns will be worse.
#1 Best Overall
- Fundamental, two-line calculator that combines statistics and advanced scientific functions for high school math and science
- Two-line display shows the entry and calculated result at the same time for easy understanding of the calculation
- Fraction features, conversions, and basic scientific and trigonometric functions
- Solar and battery powered
- Approved for use on SAT, ACT and AP exams
The input should be quantitative data for which numerical differences are meaningful. Labels such as eye color, product category, or state abbreviation are not suitable. Numeric ratings, such as one-to-five satisfaction scores, require judgment because the difference between ratings may not represent an equal interval.
Choose the correct formula first
Before doing any arithmetic, decide whether the values are the entire group you want to describe or only a sample from a larger group.
Population standard deviation
σ = √[Σ(xi − μ)2 ÷ N]
- σ is the population standard deviation.
- xi is each observation.
- μ is the population mean.
- N is the number of values in the population.
Sample standard deviation
s = √[Σ(xi − x̄)2 ÷ (n − 1)]
- s is the sample standard deviation.
- x̄ is the sample mean.
- n is the number of observations in the sample.
| Question you are asking | Use | Divide by |
|---|---|---|
| How spread out are all the values I care about? | Population standard deviation, σ | N |
| How spread out is this sample, as an estimate of a larger group? | Sample standard deviation, s | n − 1 |
Practical rule: Use the population formula when the listed values are the complete population for your question. Use the sample formula when the listed values represent or estimate a larger population. The choice depends on the purpose of the calculation, not simply on whether the dataset is large or small.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Scores from every student in one particular class can be a population if you only want to describe that class.
- Scores from 30 selected students are a sample if you want to generalize to all students.
- Every measurement from a defined production run can be a population for that run.
- A smaller set selected to estimate the long-term manufacturing process is a sample.
How to calculate standard deviation in 12 steps
We will use the data set 10, 8, 10, 8, 8, 4. For the main answer, treat these six observations as a sample. The population result is shown at the division and square-root steps so you can see exactly why the answers differ.
Step 1: Confirm that the data are numerical and comparable
Check what each number represents. The observations should measure the same kind of thing in comparable units. Do not combine, for example, monthly returns with annual returns or dollars with cents without converting them consistently.
For this example, the values can be treated as six scores measured in points:
Step 2: Decide whether the data are a sample or population
For the worked answer, choose the sample formula because we are treating the six values as observations from a larger group. That means the denominator will eventually be n − 1.
If these six values were every observation in the population of interest, you would use the population formula instead. Write this decision down before calculating; it prevents one of the most common causes of mismatched answers.
Step 3: Count the observations
There are six values, so:
n = 6
Every occurrence counts. The repeated 8s and 10s are valid separate observations, not duplicates to remove.
Step 4: Add all the observations
Add the values:
10 + 8 + 10 + 8 + 8 + 4 = 48
Step 5: Calculate the mean
Divide the total by the number of observations:
x̄ = 48 ÷ 6 = 8
The mean for this example is 8 points. Every deviation in the next step must be calculated from 8, not from the first value, median, or a rounded substitute for the mean.
Step 6: Subtract the mean from each observation
Calculate x − 8 for every value. Keep negative signs; they show that an observation is below the mean.
| Value, x | Deviation, x − 8 | Squared deviation, (x − 8)2 |
|---|---|---|
| 10 | 2 | 4 |
| 8 | 0 | 0 |
| 10 | 2 | 4 |
| 8 | 0 | 0 |
| 8 | 0 | 0 |
| 4 | −4 | 16 |
| Total | 0 | 24 |
The deviations are:
2, 0, 2, 0, 0, −4
They add to zero:
2 + 0 + 2 + 0 + 0 − 4 = 0
That zero total is an important check. Small rounding differences can occur with decimal data, but the deviations should sum to zero when the exact mean is used.
Step 7: Square every deviation
Square each deviation, including negative deviations:
Rank #2
- View multiple calculations at the same time: Compare results and explore patterns on-screen with the MultiView display that supports up to four lines
- See math exactly as it appears in textbooks: Display math expressions, symbols and stacked fractions exactly the way they appear in textbooks — no need to adapt to a technical syntax; provides quick access to frequently used functions
- Scientific notation output: View scientific notation with the proper superscripted exponents and see the output in scientific notation
- Explore (x,y) table of values: Students can easily explore an (x,y) table of values for a given function automatically or by entering specific x values
- The TI-30XS MultiView scientific calculator is ideal for general math, Pre-Algebra, Algebra 1 and 2, Geometry, Statistics, general science, Biology and Chemistry
22 = 4 02 = 0 22 = 4 02 = 0 02 = 0 (−4)2 = 16
The squared deviations are therefore:
4, 0, 4, 0, 0, 16
Squaring is necessary because positive and negative deviations would otherwise cancel. It also gives more influence to observations that are farther from the mean. The root-mean-square definition explains why standard deviation gives extra weight to large departures from the mean.
Recommended Free Tools
Step 8: Add the squared deviations
Add the numbers in the last column:
4 + 0 + 4 + 0 + 0 + 16 = 24
The result, 24, is the sum of squared deviations, also called the sum of squares. It is the numerator in both formulas.
Step 9: Divide by the correct denominator
Because this walkthrough treats the observations as a sample, divide by n − 1:
n − 1 = 6 − 1 = 5
So the sample variance is:
24 ÷ 5 = 4.8
For comparison, if the six values were the complete population, divide by N instead:
24 ÷ 6 = 4
| Interpretation | Denominator | Variance |
|---|---|---|
| Sample | n − 1 = 5 | 4.8 points2 |
| Population | N = 6 | 4 points2 |
Step 10: Identify the variance
Before taking the square root, name the intermediate result:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors- Sample variance: 4.8 points2.
- Population variance: 4 points2.
Variance is not standard deviation. Because the deviations were squared, variance is expressed in squared units such as points2, dollars2, or inches2. That makes variance useful in calculations but often less intuitive to report.
Step 11: Take the square root
Take one square root at the end:
Sample SD: √4.8 = 2.190890230… ≈ 2.19 points
Population SD: √4 = 2 points
The main answer is therefore a sample standard deviation of approximately 2.19 points. The population answer is exactly 2 points because the population variance is exactly 4.
Step 12: Check and report the result
Before accepting the answer, verify all of the following:
- The mean is 8.
- The deviations are 2, 0, 2, 0, 0, and −4.
- The deviations sum to zero, apart from possible rounding.
- The squared deviations are all nonnegative.
- The sum of squared deviations is 24.
- The denominator matches your population-or-sample decision.
- The square root is taken only after calculating the variance.
- The final answer is reported in the original units and rounded only at the end.
A complete report would say: The six scores have a mean of 8 points and a sample standard deviation of 2.19 points. Do not report only 2.19 without saying whether it is a sample or population standard deviation.
Why does the sample formula use n − 1?
The sample mean is calculated from the same observations used to measure the deviations. Once that mean has been estimated, the deviations cannot vary independently: if the first n − 1 deviations are known, the last one is determined because all deviations must sum to zero. This is described as using one degree of freedom.
Dividing by n tends to underestimate the variance of the larger population because the sample mean is fitted to the sample and usually lies closer to the sample observations than the unknown population mean would. Dividing by n − 1 corrects that tendency. More precisely, s2, the sample variance calculated with n − 1, is an unbiased estimator of the population variance. The resulting sample standard deviation s is still slightly biased; it is not exactly an unbiased estimator of the population standard deviation. The NIST explanation of sample variance documents this distinction.
This is why the sample and population results for the same six values differ: 2.19 uses a smaller denominator, while 2.00 divides by all six values.
Rank #3
- 10-digit display; for general math, pre-algebra, algebra 1 and 2, trigonometry and biology
- Performs trigonometric functions, logarithms, roots, powers, reciprocals, and factorials
- Also add, subtract, multiply and divide fractions; 1-variable statistics (mean / standard deviation)
- Conversions: fractions/decimals, degrees/radians/grads, DMS/decimal/degrees, and polar/rectangular
- Battery-powered; includes slide case
How to interpret a standard deviation of 2.19
For this sample, the mean is 8 and the sample standard deviation is about 2.19 points. In the standard-deviation sense, the observations have a root-mean-square spread of about 2.19 points around the mean.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
That does not mean every score is exactly 2.19 points from 8. Three observations equal the mean, two are 2 points above it, and one is 4 points below it. Standard deviation summarizes the entire set; individual values can be closer, farther away, or exactly at the mean.
It also is not the same as the range. The range uses only the maximum and minimum, while standard deviation uses every observation. See OpenStax’s comparison of range and standard deviation.
Do the 68–95–99.7 percentages always apply?
No. For a normally distributed population, approximately 68.27% of observations fall within one population standard deviation of the mean, 95.45% within two, and 99.73% within three. Those are properties of the normal distribution, not guarantees for every data set. The NIST empirical-rule guidance explains the normal-distribution condition.
For this small example, the sample mean is 8 and the sample one-standard-deviation interval is approximately:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →8 − 2.19 to 8 + 2.19 = [5.81, 10.19]
Five of the six observations fall in that interval, or about 83.3%. That percentage describes this particular small data set; it should not be generalized into a universal 68% rule. For skewed, heavy-tailed, or otherwise non-normal data, the proportion can differ substantially. Distribution shape matters, as NIST’s discussion of empirical coverage explains.
Standard deviation versus standard error
- Standard deviation describes the spread of individual observations, such as individual scores or investment returns.
- Standard error describes the spread or uncertainty of a statistic, often the sample mean, across repeated samples.
For a sample mean, an often-used estimated standard error is:
SE ≈ s ÷ √n
If your goal is to describe how variable individual values are, use standard deviation. If your goal is to quantify how precisely a sample mean estimates a population mean, standard error may be the relevant measure. The NIST glossary distinguishes the concepts.
Calculate standard deviation in Excel
For current Excel versions, use the modern function names:
=STDEV.S(A2:A7)
Use STDEV.S for a sample. With the example values in cells A2 through A7, it returns approximately 2.19089023.
=STDEV.P(A2:A7)
Use STDEV.P for a population. The same range returns 2.
Microsoft lists these functions for Microsoft 365 and Excel 2024, 2021, 2019, and 2016. Older compatibility names, STDEV and STDEVP, remain available, but Microsoft recommends the newer names when backward compatibility is not required. See Microsoft’s documentation for STDEV.S, STDEV.P, and Excel function changes.
Calculate standard deviation in Google Sheets
Google Sheets uses these functions:
=STDEV(A2:A7)
STDEV calculates the sample standard deviation. STDEV.S is also available as a sample-function alias.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Rank #4
- Scientific Calculator with Graphic Function: All-in-one scientific and graphing calculator. Supports plotting functions, analyzing graphs, and solving complex equations. Displays graphs and formulas simultaneously for clear visualization. Ideal for algebra, calculus, and exam prep.
- Compact and Comfortable Design: This scientific and graphing calculator sized at 7 x 3.3 inches for a balanced and ergonomic feel. Fits easily in one hand or on a desk without taking up space. Ideal for long study sessions, test environments, and everyday academic or professional use; smooth button layout supports efficient input and navigation.
- Multiple Modes and 360+ Functions: Includes angle measurement, calculation, and display modes for flexible use across subjects. This scientific and graphing calculator supports over 360 functions such as fractions, complex numbers, statistics, linear regression, standard deviation, and variable solving. Ideal for mastering algebra, geometry, trigonometry, and advanced math applications.
- Durable and Portable Design: Built with an anti-drop body that resists everyday impacts for long-term use. This scientific and graphing calculator is lightweight and slim for easy carrying in a backpack or pocket that includes a protective case to guard the screen and buttons during travel or storage.
- If you cannot turn on the calculator, please press the reset button on the back! If you have any further problems, we offer a limited warranty of 365 days. Please contact us and we will give you an answer within 24 hours.
=STDEVP(A2:A7)
STDEVP calculates the population standard deviation. STDEV.P is also available as a population-function alias. Google’s documentation notes that a sample calculation with fewer than two supplied values can return #DIV/0!. It also distinguishes text entered directly as an argument from text or blanks in a referenced range, so inspect the cells included in the formula. See the Google Sheets documentation for STDEV, STDEVP, and the function list.
Check the calculation with Python or NumPy
Python’s standard-library statistics module makes the denominator choice explicit:
from statistics import stdev, pstdev
data = [10, 8, 10, 8, 8, 4]
sample_sd = stdev(data)
population_sd = pstdev(data)
print(sample_sd) # 2.1908902300206643
print(population_sd) # 2.0
stdev() uses the sample definition and requires at least two values. pstdev() uses the population definition. The Python statistics documentation also confirms that the data do not need to be sorted.
NumPy uses population-style division by N by default:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →import numpy as np
np.std(data) # population-style result
np.std(data, ddof=1) # sample-style result
In NumPy, the default is ddof=0, so np.std(data) divides by N. Set ddof=1 to divide by N − 1. See the NumPy standard-deviation documentation.
Repeated values and frequency tables
Repeated observations are not a problem. In the worked example, each of the three 8s counts separately and each of the two 10s counts separately.
If data are presented as distinct values with frequencies, include each frequency in the calculation. For a sample frequency table:
s = √[Σ fi(xi − x̄)2 ÷ (n − 1)]
Here, fi is the number of times value xi occurs and n equals Σfi. For a population, replace n − 1 with N. A frequency column is not itself a measurement; it tells you how many times each measurement contributes. The frequency-table forms of the formulas show this weighting explicitly.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCommon mistakes and how to fix them
| Mistake | Why it causes trouble | Fix |
|---|---|---|
| Using n when the data are a sample | It generally makes the estimated variance and standard deviation too small. | Use n − 1 for the usual sample estimate. |
| Using n − 1 for a complete population | It reports a sample estimate instead of the population’s actual descriptive spread. | Use N when you have the entire population of interest. |
| Using the wrong mean | Every deviation is then wrong. | Recheck the sum and divide by the correct count. |
| Adding signed deviations | Positive and negative deviations cancel to zero. | Square each deviation before adding. |
| Writing (−4)2 as −16 | A squared value cannot be negative. | Use parentheses: (−4)2 = 16. |
| Taking square roots too early | The terms no longer produce the variance formula. | Finish the sum and division first, then take one square root. |
| Rounding the mean early | Small errors can compound, especially with decimal data. | Keep full precision and round only the final result. |
| Calling variance the standard deviation | Variance is in squared units and is not the final spread measure. | Take the square root and report the original units. |
| Calling standard deviation the range | Range uses only the smallest and largest values. | Use standard deviation when you want a measure based on every observation. |
| Assuming a large SD means inaccurate data | Spread and accuracy are different ideas. | Compare accuracy with a target or true value; use SD to describe dispersion. |
Edge cases and data-quality decisions
One observation
The population standard deviation of a one-value population is 0 because the value equals its mean. The usual sample standard deviation is undefined for one observation because n − 1 equals zero.
All values are identical
Every deviation from the mean is zero. Both population and sample standard deviation are zero, provided the sample has at least two observations.
Negative values
Negative observations are valid. Follow the same procedure: calculate the mean, subtract it, square the deviations, and continue. Negative values do not make standard deviation negative.
Missing values
Decide what missing measurements mean before calculating. Investigate them, exclude them according to a stated rule, or use an appropriate imputation method. Do not silently replace a missing value with zero unless zero is the substantively correct measurement.
Spreadsheet programs can handle blanks, text, and errors differently depending on whether they are in a referenced range or entered directly into a formula. A formula that silently excludes a cell changes the count and potentially the mean, so check the range and the resulting n. Excel’s STDEV.S input guidance documents relevant behavior.
Best Value
- Natural Textbook Display presents formulas and results exactly as written in textbooks for intuitive learning.
Outliers
Because standard deviation squares deviations, an unusually extreme observation can increase it substantially. That may be appropriate if the outlier is a real part of the population. If it is a recording error, correct the underlying data rather than deleting it without explanation.
For skewed or heavy-tailed data, consider reporting a robust companion measure such as the interquartile range or median absolute deviation, and inspect a histogram or box plot. NIST discusses standard deviation’s sensitivity to tail behavior and these alternatives in its guidance on standard deviation.
Non-normal data
Normality is not required to perform the standard-deviation calculation. It matters when you use normal-distribution rules, confidence procedures, or probability statements based on the normal model. For non-normal data, standard deviation remains a valid descriptive calculation, but interpret its coverage and shape-related implications cautiously.
Mixed groups
An overall standard deviation can be large because the data combine different groups rather than because each group is highly variable. For example, mixing children and adults, or production measurements from two different machine settings, may create between-group spread. A graph and group-specific means and standard deviations can reveal this.
Why your calculator or spreadsheet may show a different answer
- Check the label. Look for sample versus population options. For the worked data, the two correct results are about 2.19 and 2.00.
- Check the included values. A blank, text entry, missing cell, or accidentally omitted row changes the count and sum.
- Check the denominator. Excel
STDEV.S, Google SheetsSTDEV, Pythonstdev(), and NumPy withddof=1use the sample convention. ExcelSTDEV.P, Google SheetsSTDEVP, Pythonpstdev(), and NumPy’s default use the population convention. - Check rounding. Recalculate with the unrounded mean and round only the final answer.
- Check whether you entered frequencies as observations. A frequency column should weight values; it should not be treated as another measurement column.
What standard deviation does—and does not—tell you in personal finance
For a list of comparable periodic returns, standard deviation can summarize how much those historical returns varied around their average return. Report the period and units: a standard deviation calculated from monthly percentage returns is a monthly spread in percentage points, not automatically an annual figure.
It is not a complete measure of financial risk. Two investments can have the same standard deviation but different downside behavior, skewness, liquidity, or exposure to loss. Outliers and mixed market regimes can also affect the result. Use a graph and other measures when the shape of the return distribution matters.
The same population-versus-sample decision applies to household or business data. If you are describing every transaction in a defined period, the population formula may answer the descriptive question. If you are using selected transactions to estimate a broader spending process, the sample formula is usually the relevant estimate. State the choice alongside the number.
Recommended Free Tools
Summary of the worked answer
| Quantity | Calculation | Result |
|---|---|---|
| Number of observations | n | 6 |
| Mean | 48 ÷ 6 | 8 |
| Sum of squared deviations | 4 + 0 + 4 + 0 + 0 + 16 | 24 |
| Sample variance | 24 ÷ 5 | 4.8 points2 |
| Sample standard deviation | √4.8 | 2.19 points |
| Population variance | 24 ÷ 6 | 4 points2 |
| Population standard deviation | √4 | 2 points |
Further authoritative references
For formula notation, units, frequency tables, and the population-versus-sample distinction, see OpenStax’s measures of spread reference. For technical guidance on units, outliers, tails, and robust alternatives, see NIST’s standard-deviation reference. For degrees of freedom and the sample-variance reasoning, see Penn State’s statistics lesson.
Frequently Asked Questions
Which standard deviation should I use: sample or population?
Use the population standard deviation when your values include every member of the group you want to describe. Use the sample standard deviation when the observations are intended to estimate a larger population. The sample formula divides by n − 1; the population formula divides by N.
Why does my calculator give 2.19 while another answer says 2?
Both can be correct for the example 10, 8, 10, 8, 8, 4. A sample calculation gives approximately 2.19, while a population calculation gives 2. Check whether the calculator uses the sample or population option before checking the arithmetic.
Can standard deviation be negative?
No. Squared deviations are nonnegative, so standard deviation cannot be negative. It can equal zero when every observation is identical.
Free tools Windows power users keep installed
One-click scans. No signup required.
Does standard deviation require a normal distribution?
No. You can calculate it for any suitable quantitative data. However, normal-distribution percentages such as the 68–95–99.7 rule require an approximately normal distribution and are not guaranteed for every data set.
How do I calculate standard deviation from a frequency table?
Multiply each squared deviation by its frequency before summing: s = √[Σ fi(xi − x̄)2 ÷ (n − 1)] for a sample. Here, n is the sum of all frequencies.
The Bottom Line
The reliable 12-step method is: verify the numerical data, choose population or sample, count, sum, find the mean, calculate deviations, square them, add the squares, divide by N or n − 1, take the square root, and check the result. For 10, 8, 10, 8, 8, 4, the sample standard deviation is 2.19 and the population standard deviation is 2.00.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




