Basic statistics

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.

✅ No login needed100% freeRuns in your browserNothing savedYour data stays on your device
Standard Deviation Calculator✅ Free · no login📚 Cite this tool
Your data never leaves your PC. Everything you type is calculated on your own computer or phone. Nothing is saved, not even in your browser, and it is gone when you close the page. Nothing is uploaded, stored or seen by Codanics, and no login is needed.
  • 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.

Citation · APA 7th edition

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.

🚀 Follow Codanics channel on WhatsApp for more updatesNew free tools, scholarships, PhD positions and research tips, straight to your phone. Free lessons on YouTube too.

How to use the standard deviation calculator

  1. Paste or type your numbers. Commas, spaces and new lines all work.
  2. 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.
  3. 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)
Variances² = Σ(x − x̄)² ÷ (n − 1)σ² = Σ(x − μ)² ÷ n
Standard deviations = √s²σ = √σ²
ExcelSTDEV.S, VAR.SSTDEV.P, VAR.P
Rsd(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).

  1. Mean: 40 ÷ 8 = 5.
  2. Deviations: −3, −1, −1, −1, 0, 0, 2, 4.
  3. Squares: 9, 1, 1, 1, 0, 0, 4, 16; sum of squares = 32.
  4. Population: σ² = 32 ÷ 8 = 4, so σ = 2.
  5. 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.
Next steps: turn a value into a z-score with the z-score calculator, or get SD, SE, a 95% confidence interval, skewness and plots together in the descriptive statistics calculator.
Learn the statistics behind these numbers. Codanics has free statistics, R and Python lessons on YouTube and full courses for researchers.

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

Made by Dr. Muhammad Aammar Tufail, Codanics. First published 24 November 2026, last updated 24 November 2026. Found a bug or have an idea for a new tool? Tell us on the WhatsApp channel or in the comments on YouTube. Results are for learning and planning; check important analyses with a statistician or your supervisor.