Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Standard Deviation Calculator for Population and Sample

Enter the numbers whose spread you want to measure, separated by commas (,). The population standard deviation σ and the sample standard deviation s are calculated together with the mean, the variances and the sum of squared deviations.

Enter 2 or more numbers separated by commas (,), for example 10, 12, 23, 23, 16. Decimals and negative numbers are OK.
Result and graph
Enter your numbers separated by commas in the field on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter numbers separated by commas (,) and you get the standard deviation on the spot
  • Both the population standard deviation \(\sigma\) (divide by \(N\)) and the sample standard deviation \(s\) (divide by \(N-1\)) are shown together
  • The mean \(\mu\), the sum of squared deviations \(\sum (x_i-\mu)^2\) and the variances \(\sigma^2,\ s^2\) are calculated too, so you can follow every step at a glance
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
If your data is the whole group you want to study, use the population standard deviation \(\sigma\). If your data is a part (a sample) taken from a larger group and you want to estimate the spread of that whole group, use the sample standard deviation \(s\). If you are not sure, compare the two. You need at least 2 numbers.

What is this calculation used for?

The basis of z-scores and grading on a curve (school and tests)

A z-score (standard score) tells you how far a score is from the mean, measured in standard deviations: \(z = \dfrac{x - \text{mean}}{\text{standard deviation}}\). The standard deviation is right there in the denominator.
If the class mean is 70 and the standard deviation is 10, a score of 85 has \(z = (85 - 70) \div 10 = 1.5\), which is 1.5 standard deviations above the mean. Teachers who "grade on a curve" and standardized test reports use this same idea. It also explains why the same score can stand out more on a test where scores are tightly packed (small spread).

Keeping variation low in manufacturing and quality control (industry)

No matter how precisely they are made, screw lengths and part weights vary a little. Factories measure this variation with the standard deviation and manage the process so that "the mean ± 3 standard deviations" stays within the customer's specifications.
A smaller standard deviation means more consistent, better products. The standard deviation is so basic that improving quality can almost be described as the work of making it smaller.

Measuring investment risk (money and finance)

Two investments may both have an average return of 5%, but the one whose returns have a larger standard deviation has some years of big gains and some years of big losses, so it is judged to be riskier.
In finance, the standard deviation of returns is called volatility, and it is the most common measure of risk. For important money decisions, look at the spread (the standard deviation) as well as the average.

Comparing how steady climates are (weather and reading data)

Two cities may have the same average yearly temperature. If the standard deviation of their monthly temperatures is small, the city is mild all year; if it is large, summer and winter are very different.
The standard deviation turns "steady or changeable" into a number, which the average alone cannot show. It is used to compare climates and to plan crops and tourism.

Setting reference ranges for medical tests (health checkups)

The reference range shown on blood test results is sometimes set by collecting data from many healthy people and taking about "the mean ± 2 standard deviations" (in practice, each test uses a method that fits the shape of its distribution).
Knowing about the standard deviation helps you stay calm: being slightly outside the reference range does not automatically mean you are ill, because some healthy people fall outside it too.

Formulas and figures

Mean
Figure
Standard notation (the usual math form)
\(\mu\) \(=\) \((x_1 + x_2 + \cdots + x_N)\) \(\div\) \(N\)
In words (symbols replaced with words)
③ \(\mu\): mean \(=\) ① sum of the data \(\div\) ② \(N\): number of values
The formula in words
① Take the sum of the data
② divide it by the \(N\): number of values
③ and you get the \(\mu\): mean
Quick example
For the data 10, 12, 23, 23, 16, 23, 21, 16 (8 values), the mean is the sum 144 divided by 8, so
\(\mu\): mean \(=\) sum (144) \(\div\) count (8 values)
\(144 \div 8 = 18\)
Key idea
The standard deviation measures how far each value is from the mean, so the first step is to find the mean. When you work with the spread of a sample, the mean is called the sample mean and is often written \(\bar{x}\) (x-bar), but it is calculated in exactly the same way.
Sum of squared deviations
Figure
Standard notation (the usual math form)
\(S\) \(=\) \(\displaystyle\sum_{i=1}^{N}\) \((x_i - \mu)\) \(2\)
In words (symbols replaced with words)
④ \(S\): sum of squared deviations \(=\) ③ \(\displaystyle\sum\): add them all up ① difference between each value \(x_i\) and the mean \(\mu\) (the deviation) ② squared
The formula in words
① Take the difference between each value and the mean (the deviation)
② square it (so that every value becomes positive),
③ then add them all up \(\displaystyle\sum\)
④ and you get the \(S\): sum of squared deviations
Quick example
For the data 1, 5 (mean 3), the deviations are \(1-3=-2\) and \(5-3=2\). Square each one and add them up
\(S\): sum of squared deviations \(=\) deviation (−2) squared \(+\) deviation (2) squared
\((-2)^2 + (2)^2 = 4 + 4 = 8\)
Key idea
If you simply add up the deviations (the differences between each value and the mean), you always get 0, because the positive and negative ones cancel out. So you square them first to make them all positive, and then add them up. This is the sum of squared deviations, the foundation for turning spread into a number. The population variance, the sample variance, the population standard deviation and the sample standard deviation are all built from this \(S\). The only difference between a population and a sample is whether you divide by \(N\) or by \(N-1\).
Variance (population and sample)
Figure
Standard notation (the usual math form)
\(\sigma^2\) \(=\) \(S\) \(\div\) \(N\)
\(s^2\) \(=\) \(S\) \(\div\) \((N-1)\)
In words (symbols replaced with words)
③ \(\sigma^2\): population variance \(=\) ① \(S\): sum of squared deviations \(\div\) ② \(N\): count
⑥ \(s^2\): sample variance \(=\) ④ \(S\): sum of squared deviations \(\div\) ⑤ \((N-1)\): one less than the count
The formula in words
① Divide the \(S\): sum of squared deviations
② by the \(N\): count
③ and you get the \(\sigma^2\): population variance .
④ Divide the same sum of squared deviations \(S\)
⑤ by \((N-1)\): one less than the count
⑥ and you get the \(s^2\): sample variance
Quick example
For the data 2, 8 (mean 5, sum of squared deviations 18), the population variance is 18 divided by the count 2, and the sample variance is 18 divided by (2 − 1)
\(\sigma^2\): population variance \(=\) 18 \(\div\) 2
\(\sigma^2 = 18 \div 2 = 9\)
\(s^2 = 18 \div (2 - 1) = 18 \div 1 = 18\)
Key idea
The variance shows how large the spread is, but because the data is squared, its unit is squared too (for test points, "points²"), which makes it hard to picture. Taking the square root in the next step brings the unit back, and that is the standard deviation. The sample variance divides by \(N-1\) instead of \(N\) because, when you estimate the spread of a population from a sample, dividing by \(N\) makes the spread come out a little too small. Dividing by one less corrects this (it is called Bessel's correction, and \(N-1\) is called the degrees of freedom). Some statistics textbooks call the version divided by \(N\) the sample variance and call the version divided by \(N-1\) the unbiased sample variance. On this page, as in Excel and Python functions, the version divided by \(N-1\) is called the sample variance \(s^2\).
Standard deviation (population and sample)
Figure
Standard notation (the usual math form)
\(\sigma\) \(=\) \(\sqrt{\sigma^2}\)
\(s\) \(=\) \(\sqrt{s^2}\)
In words (symbols replaced with words)
② \(\sigma\): population standard deviation \(=\) ① square root of the population variance \(\sigma^2\)
④ \(s\): sample standard deviation \(=\) ③ square root of the sample variance \(s^2\)
The formula in words
① Take the square root of the population variance \(\sigma^2\) (the number that gives the variance when squared)
② and you get the \(\sigma\): population standard deviation .
③ Take the square root of the sample variance \(s^2\)
④ and you get the \(s\): sample standard deviation
Quick example
For the same data 2, 8, take the square roots of the population variance 9 and the sample variance 18
\(\sigma\): population standard deviation \(=\) \(\sqrt{9}\)
\(\sigma = \sqrt{9} = 3\)
\(s = \sqrt{18} \approx 4.243\)
Key idea
The standard deviation is the square root of the variance, so its unit is the same as the data (for test points, the standard deviation is in points too). That makes it easy to picture "how far values typically are from the mean". The larger the standard deviation, the more spread out the data; the smaller it is, the more the data gathers near the mean. If all the values are the same, there is no spread, so the standard deviation is 0.
To find the standard deviation: (1) find the mean, (2) square each difference from the mean (each deviation) and add them all up (the sum of squared deviations), (3) divide by the count N (population) or N − 1 (sample) to get the variance, and (4) take the square root. The only difference between a population and a sample is whether you divide by N or by N − 1.

Symbols and terms

Symbols

\(x_1, x_2, \ldots, x_N\) x sub 1, x sub 2, …, x sub N The individual values whose spread you want to measure. (Example - the test scores of 8 students)
\(N\) N The number of values. (Example - for 8 students, \(N = 8\))
\(\mu\) mu The mean. This Greek letter stands for the mean of a population. The mean of a sample is written \(\bar{x}\) (x-bar), but it is calculated the same way.
\(x_i - \mu\) x sub i minus mu The deviation. It shows how far each value is from the mean.
\(S\) S The sum of squared deviations, \(\sum (x_i-\mu)^2\), found by squaring each deviation and adding them all up. The variance and the standard deviation are built from it.
\(\sigma^2\) sigma squared The population variance, the sum of squared deviations divided by the count \(N\).
\(\sigma\) sigma The population standard deviation, the square root of the population variance. It is the best-known symbol for spread.
\(s^2\) s squared The sample variance (unbiased sample variance), the sum of squared deviations divided by \(N-1\).
\(s\) s The sample standard deviation, the square root of the sample variance.
\(\sum\) sigma (summation sign) A symbol that means "add them all up". \(\sum_{i=1}^{N} x_i\) is the sum from \(x_1\) to \(x_N\).

Terms

standard deviation A number that shows how spread out the data is around the mean. It is the square root of the variance, and because its unit is the same as the data, it works well as a guide to "the typical distance from the mean". It is the most common measure of spread.
variance The average of the squared deviations (the differences between each value and the mean). It shows how large the spread is, but its unit is squared, so it is usually turned into the standard deviation by taking the square root.
deviation The difference between a value and the mean (\(x_i - \mu\)). Positive means above the mean and negative means below it. Adding them all up as they are always gives 0, so they are squared before use.
sum of squared deviations The deviations squared and all added up. The variance and the standard deviation are all built from this value.
population The whole group you want to study. If your data is this whole group, use the population standard deviation \(\sigma\).
sample A part of the data taken from a population (the whole group). When you estimate the spread of the whole group from a sample, use the sample standard deviation \(s\).
unbiased sample variance The variance used to estimate the variance of a population from a sample. Divide the sum of squared deviations by \(N-1\). Dividing by \(N\) would make the spread of the population come out too small, so dividing by one less corrects it.
Bessel's correction The correction of dividing by \(N-1\) instead of \(N\) in the sample variance. \(N-1\) is also called the degrees of freedom.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.

The mean (Grade 6)
  • Knowing that mean = sum ÷ count
  • Knowing that the mean shows roughly where the center of the data is
Negative numbers and parentheses (Grades 6–7)
  • Being able to do subtractions with a negative answer, such as \(1 - 3 = -2\)
  • Knowing that squaring a negative number gives a positive number, as in \((-2)^2 = 4\)
Exponents (Grade 6)
  • Knowing that squaring means multiplying a number by itself, as in \(3^2 = 3 \times 3 = 9\)
Square roots (Grade 8)
  • Knowing a square root as "the number that gives this number when squared", as in \(\sqrt{9} = 3\)
  • Knowing that a square root that does not come out even, such as \(\sqrt{18}\), can be written as an approximate decimal
Distribution and spread of data (Grade 6 to high school)
  • Knowing that data with the same mean can be spread out differently
  • Knowing that the variance and the standard deviation express the size of the spread as a number

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the mean
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Count N =COUNT(B1:B8)
Sum Σx =SUM(B1:B8)
Mean μ =AVERAGE(B1:B8)
Table to find the sum of squared deviations S
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Sum of squared deviations S =DEVSQ(B1:B8)
Table to find the population standard deviation σ and variance σ²
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Population variance σ² =VARP(B1:B8)
Population standard deviation σ =STDEVP(B1:B8)
Table to find the sample standard deviation s and variance s²
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Sample variance s² =VAR(B1:B8)
Sample standard deviation s =STDEV(B1:B8)
After pasting, B1 to B8 are the cells for your numbers, and the cells in bold green are calculated automatically.
The first table shows 18 for the mean μ. The population standard deviation σ in the third table is about 4.899, and the sample standard deviation s in the fourth table is about 5.237.
To use a different number of values, add (or remove) rows of numbers, then change "B1:B8" in the formulas to your actual data range (for 10 values, B1:B10).
STDEVP and VARP, with a "P", are for a population (divide by N). STDEV and VAR, without the "P", are for a sample (divide by N − 1). DEVSQ gives the sum of squared deviations in one step.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the mean
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Count N =COUNT(B1:B8)
Sum Σx =SUM(B1:B8)
Mean μ =AVERAGE(B1:B8)
Table to find the sum of squared deviations S
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Sum of squared deviations S =DEVSQ(B1:B8)
Table to find the population standard deviation σ and variance σ²
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Population variance σ² =VARP(B1:B8)
Population standard deviation σ =STDEVP(B1:B8)
Table to find the sample standard deviation s and variance s²
Value 1 10
Value 2 12
Value 3 23
Value 4 23
Value 5 16
Value 6 23
Value 7 21
Value 8 16
Sample variance s² =VAR(B1:B8)
Sample standard deviation s =STDEV(B1:B8)
The same functions as in Excel (AVERAGE, DEVSQ, STDEVP, VARP, STDEV, VAR) work as is. Copy the whole table, paste it into cell A1, and replace B1 to B8 with your own numbers.
In Google Sheets too, use STDEVP and VARP for a population and STDEV and VAR for a sample.

How to calculate it in Python

import statistics

numbers = [10, 12, 23, 23, 16, 23, 21, 16]  # the numbers whose spread you want to measure

mean = statistics.mean(numbers)               # mean μ
pstdev = statistics.pstdev(numbers)           # population standard deviation σ (divide by N)
pvariance = statistics.pvariance(numbers)     # population variance σ²
sstdev = statistics.stdev(numbers)            # sample standard deviation s (divide by N-1)
svariance = statistics.variance(numbers)      # sample variance s²

print(f"Count: {len(numbers)} / Sum: {sum(numbers)} / Mean: {mean}")
print(f"Population variance σ²: {pvariance} / Population SD σ: {pstdev}")
print(f"Sample variance s²: {svariance} / Sample SD s: {sstdev}")
Runs with the standard library only (the statistics module). Replace the numbers list at the top with your own numbers and run it. pstdev and pvariance, starting with "p", are for a population (divide by N). stdev and variance, without the "p", are for a sample (divide by N − 1).

How to write it in LaTeX and other math languages (copy and paste)

Mean
μ = Σxᵢ ÷ N
\mu = \frac{x_1 + x_2 + \cdots + x_N}{N}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>&#x03BC;</mi>
    <mo>=</mo>
    <mfrac>
      <mrow>
        <msub><mi>x</mi><mn>1</mn></msub>
        <mo>+</mo>
        <msub><mi>x</mi><mn>2</mn></msub>
        <mo>+</mo>
        <mo>&#x22EF;</mo>
        <mo>+</mo>
        <msub><mi>x</mi><mi>N</mi></msub>
      </mrow>
      <mi>N</mi>
    </mfrac>
  </mrow>
</math>
mu = (x_1 + x_2 + cdots + x_N) / N
Mean[data]
mu := add(x[i], i = 1 .. N)/N;
mu = mean(x);
μ = (x_1 + x_2 + ⋯ + x_N)/N
Sum of squared deviations
S = Σ(xᵢ − μ)²
S = \sum_{i=1}^{N} (x_i - \mu)^2
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>S</mi>
    <mo>=</mo>
    <munderover>
      <mo>&#x2211;</mo>
      <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow>
      <mi>N</mi>
    </munderover>
    <msup>
      <mrow><mo>(</mo><msub><mi>x</mi><mi>i</mi></msub><mo>&#x2212;</mo><mi>&#x03BC;</mi><mo>)</mo></mrow>
      <mn>2</mn>
    </msup>
  </mrow>
</math>
S = sum_(i=1)^N (x_i - mu)^2
Total[(data - Mean[data])^2]
S := add((x[i] - mu)^2, i = 1 .. N);
S = sum((x - mean(x)).^2);
S = ∑_(i=1)^N (x_i − μ)^2
Variance (population and sample)
σ² = S ÷ N,  s² = S ÷ (N − 1)
\sigma^2 = \frac{S}{N}, \qquad s^2 = \frac{S}{N-1}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup><mi>&#x03C3;</mi><mn>2</mn></msup>
    <mo>=</mo>
    <mfrac><mi>S</mi><mi>N</mi></mfrac>
    <mo>,</mo>
    <mspace width="1em"/>
    <msup><mi>s</mi><mn>2</mn></msup>
    <mo>=</mo>
    <mfrac><mi>S</mi><mrow><mi>N</mi><mo>&#x2212;</mo><mn>1</mn></mrow></mfrac>
  </mrow>
</math>
sigma^2 = S/N, s^2 = S/(N-1)
popVar = S/n; sampleVar = Variance[data]  (* N is a built-in function in Mathematica, so the count is named n *)
sigma2 := S/N; s2 := S/(N - 1);
popVar = S/N; sampleVar = var(x);
σ^2 = S/N,  s^2 = S/(N−1)
Standard deviation (population and sample)
σ = √(σ²),  s = √(s²)
\sigma = \sqrt{\sigma^2} = \sqrt{\dfrac{S}{N}}, \qquad s = \sqrt{s^2} = \sqrt{\dfrac{S}{N-1}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>&#x03C3;</mi>
    <mo>=</mo>
    <msqrt><mfrac><mi>S</mi><mi>N</mi></mfrac></msqrt>
    <mo>,</mo>
    <mspace width="1em"/>
    <mi>s</mi>
    <mo>=</mo>
    <msqrt><mfrac><mi>S</mi><mrow><mi>N</mi><mo>&#x2212;</mo><mn>1</mn></mrow></mfrac></msqrt>
  </mrow>
</math>
sigma = sqrt(S/N), s = sqrt(S/(N-1))
popSD = Sqrt[S/n]; sampleSD = StandardDeviation[data]  (* N is a built-in function in Mathematica, so the count is named n *)
sigma := sqrt(S/N); s := sqrt(S/(N - 1));
popSD = sqrt(S/numel(x)); sampleSD = std(x);
σ = √(S/N),  s = √(S/(N−1))

How to have ChatGPT  do the calculation

You are a statistics calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

For the following data, find each of the values below.
Data: 10, 12, 23, 23, 16, 23, 21, 16
1. The count, the sum and the mean
2. The sum of squared deviations (each value's difference from the mean, squared and all added up)
3. The population variance σ² (divide by N) and the population standard deviation σ
4. The sample variance s² (divide by N − 1) and the sample standard deviation s

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.