Standard Deviation Calculator: Sample and Population SD and Variance, with Steps
Paste your numbers to get the sample standard deviation (n − 1), the population standard deviation (n) and both variances, with a full table of deviations and squared deviations so you can see exactly how the answer is built. Results match Excel STDEV.S / STDEV.P and R sd(). Nothing is saved.
- PriceFree, no login or sign-up needed
- Your dataCalculated in your browser; nothing is saved
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published24 November 2026
- Last updated24 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Standard deviation calculator [Online tool]. Codanics. Retrieved 24 November 2026, from https://codanics.com/tools/standard-deviation-calculator/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 24 November 2026.
How to use the standard deviation calculator
- Paste or type your numbers. Commas, spaces and new lines all work.
- Choose Sample if your numbers are a sample from a bigger group (the usual case in research), or Whole population if you have every member.
- Read the standard deviation and variance, then follow the steps and the deviation table to see how they were calculated.
What is standard deviation?
Standard deviation is a measure of how far the values in a data set typically are from their mean: a small SD means the values are close together, a large SD means they are spread out. It is the square root of the variance, and it has the same units as the data (cm, kg, marks).
Sample vs population formula
| Sample (most research) | Population (every member) | |
|---|---|---|
| Variance | s² = Σ(x − x̄)² ÷ (n − 1) | σ² = Σ(x − μ)² ÷ n |
| Standard deviation | s = √s² | σ = √σ² |
| Excel | STDEV.S, VAR.S | STDEV.P, VAR.P |
| R | sd(x), var(x) | sd(x) * sqrt((n-1)/n) |
Dividing by n − 1 (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance. A sample’s values sit a little closer to their own mean than to the true population mean, so dividing by n would underestimate the spread.
Worked example
Data: 2, 4, 4, 4, 5, 5, 7, 9 (n = 8).
- Mean: 40 ÷ 8 = 5.
- Deviations: −3, −1, −1, −1, 0, 0, 2, 4.
- Squares: 9, 1, 1, 1, 0, 0, 4, 16; sum of squares = 32.
- Population: σ² = 32 ÷ 8 = 4, so σ = 2.
- Sample: s² = 32 ÷ 7 = 4.5714, so s = 2.1381.
How to interpret and report SD
- For roughly bell-shaped data, about 68% of values lie within 1 SD of the mean and about 95% within 2 SD.
- Report it as mean ± SD, for example “plant height was 24.3 ± 3.1 cm (mean ± SD, n = 20)”.
- Do not confuse SD with the standard error (SE = s ÷ √n). The SD describes the spread of the data; the SE describes how precisely the mean is estimated.
- To compare spread between groups with different means, use the coefficient of variation (CV = SD ÷ mean × 100).
- SD is sensitive to outliers. For skewed data, also report the median and IQR.
Frequently asked questions
How do you calculate standard deviation step by step?
Find the mean, subtract it from each value, square the differences, add them up, divide by n − 1 (sample) or n (population), and take the square root.
Should I use sample or population standard deviation?
Use the sample SD (n − 1) when your data are a sample from a bigger group, which is almost always the case in research and surveys. Use the population SD (n) only when you have measured every member of the group.
What is the difference between STDEV.S and STDEV.P in Excel?
STDEV.S divides by n − 1 and estimates the SD of a population from a sample. STDEV.P divides by n and treats the data as the whole population. This calculator shows both.
What is the difference between variance and standard deviation?
Variance is the average squared deviation from the mean; standard deviation is its square root. SD is in the same units as the data, so it is easier to interpret.
Can standard deviation be negative?
No. It is a square root of a sum of squares, so it is zero (all values equal) or positive.
Is my data saved?
No. Everything is calculated in your browser and nothing is saved or uploaded.
Do I need to log in or create an account to use the standard deviation calculator?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Standard deviation calculator [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/standard-deviation-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel