How to calculate standard deviation in Desmos
Favorites
No favorites yet. Press Favorite on any page to keep it here.
In one line: type L=[5,9,8,12,6,10,6,8], then stdev(L). That is the
sample standard deviation; stdevp(L) is the population one. The rest of this page
covers tables, which function to pick, and what to do when Desmos gives an error.
Standard deviation in Desmos: the short version
- Open the Desmos graphing calculator.
- On the first line, type a name, an equals sign and your values in square brackets:
L=[5,9,8,12,6,10,6,8]. - On the next line, type
stdev(L). The answer appears at the right of the line.
You can also skip the list and put the numbers straight in:
stdev(5,9,8,12,6,10,6,8). Both forms give the same result.
stdev or stdevp: which one to use
| Function | Divides by | Use for | Same as |
|---|---|---|---|
| stdev(L) | n − 1 | Sample | STDEV.S in Excel, Sx on a TI-84 |
| stdevp(L) | n | Population | STDEV.P in Excel, σx on a TI-84 |
| var(L) | n − 1 | Sample variance | stdev(L) squared |
| varp(L) | n | Population variance | stdevp(L) squared |
| cov(L, M) / covp(L, M) | n − 1 / n | Covariance of two lists | COVARIANCE.S / COVARIANCE.P |
Use stdev when your values are part of a larger group you want to describe, which
is almost always: a survey sample, a set of lab measurements, a handful of test scores. Use
stdevp only when the list is the entire group, with nothing left out.
The full comparison is here.
Standard deviation of a table column
If your data is already in a Desmos table, you don't need to retype it as a list. Refer to the column by its header. With values in the column headed y1, type:
stdev(y_1)
Typing the underscore makes the subscript, so it matches the header. The result updates as you
add or change rows. stdevp(x_1) works the same way for the x1 column.
Worked example
Eight values: 5, 9, 8, 12, 6, 10, 6, 8.
L=[5,9,8,12,6,10,6,8]
mean(L) → 8
stdev(L) → 2.32993
stdevp(L) → 2.17945
The mean is 64 ÷ 8 = 8. The squared distances from 8 are 9, 1, 0, 16, 4, 4, 4 and 0, which add up to 38. The sample variance is 38 ÷ 7 = 5.4286, and its square root is 2.330. The population variance is 38 ÷ 8 = 4.75, and its square root is 2.179. Paste the same eight numbers into the calculator below to see each step.
Other statistics built from stdev
| You want | Type in Desmos |
|---|---|
| Relative SD (%RSD) | stdev(L)/mean(L)*100 |
| Coefficient of variation | stdev(L)/mean(L) |
| Standard error of the mean | stdev(L)/sqrt(length(L)) |
| z-score of a value x | (x-mean(L))/stdev(L) |
Each one is explained on its own page: %RSD, standard error and z-score.
When Desmos gives the wrong answer or an error
- Only one value.
stdevneeds at least two values, because it divides by n − 1. Check the list or the table column has more than one number. - Answer differs from your teacher's or textbook's. One of you used the
sample formula and the other the population formula. Compare
stdevandstdevp; one of them will match. - Desmos says the list is not defined. The name on the
stdevline doesn't match the list. Names are case-sensitive, soLandlare different lists.
Check your Desmos answer
Paste the same values below. The sample standard deviation should match stdev
exactly, and the working shows where each number comes from.
Separate numbers with commas, spaces or new lines, or paste a spreadsheet column.
Decimals and negatives are fine; write 10:3 for a value that occurs 3 times.
Your results will appear here: the standard deviation first, then the rest of the summary and a chart.
Standard deviation (sample)
3.04432
3.04
Your values typically sit about 3.04 above or below their mean of 15.88, in the same units as your data. 5 of 8 values (63%) fall between 12.83 and 18.92, within one standard deviation of the mean. For normally distributed data about 68% would.
Population SD (σ): 2.8477, if these values are the whole group.
- Count (n)
- 8
- Mean (x̄)
- 15.875
- Variance (s²)
- 9.26786
- Standard error
- 1.07633
- Minimum
- 12
- Q1 (25%)
- 13.75
- Median
- 15.5
- Q3 (75%)
- 17.5
- Maximum
- 21
- Range
- 9
More statistics (5)
- Relative SD (%RSD)
- 19.1768%
- Coefficient of variation
- 0.191768
- Sum (Σx)
- 127
- Sum of squares, Σ(x − x̄)²
- 64.875
- IQR (Q3 − Q1)
- 3.75
Data distribution
Shaded bands mark ±1, ±2 and ±3 SD from the mean. 5 of 8 values (63%) fall within ±1 SD.
Chart as text
Mean 15.875, sample standard deviation s = 3.04432, from 8 values between 12 and 21.
- Within ±1 SD (12.83 to 18.92): 5 of 8 values (63%). About 68% for normal data.
- Within ±2 SD: 8 (100%). About 95% for normal data.
- Within ±3 SD: 8 (100%). About 99.7% for normal data.
Show the working, step by step
More statistics
Related calculators
-
Standard deviation calculator
Paste the same list and check Desmos step by step.
-
SD on a TI-84
The handheld version: Sx and σx from 1-Var Stats.
-
Sample vs population
When to use stdev and when to use stdevp.
-
Variance calculator
The var and varp figures, with the working.
-
All software guides
Excel, Google Sheets, TI-84, Casio, Python and R.
Common questions
How do you find standard deviation on Desmos?
Type your data as a list, L=[5,9,8,12,6,10,6,8], then on a new line type
stdev(L) for the sample standard deviation or stdevp(L) for the
population one. Desmos shows the answer at the end of the line.
Is stdev in Desmos sample or population?
stdev is the sample standard deviation (divides by n − 1).
stdevp is the population standard deviation (divides by n).
They match STDEV.S and STDEV.P in Excel, and sx and σx on a
TI-84.
Why does stdev give an error in Desmos?
The sample standard deviation divides by n − 1, so it needs at least two values. A list with one number (or a table column with one filled row) has no sample standard deviation.