Comparison 5 min read

Population vs Sample Standard Deviation: Which One to Use

Learn when to divide by n or n − 1, see both standard deviations worked out on the same data, and how to convert between them with a statistics calculator.

population vs sample standard deviationstandard deviation n or n-1how to calculate standard deviationsample variance formulastdev.p vs stdev.s

The short answer

Use the population standard deviation (divide by n) when your numbers are the whole group you care about, such as the marks of every student in one class. Use the sample standard deviation (divide by n − 1) when your numbers are a sample used to estimate a larger group, such as 50 customers surveyed out of thousands.

The Statistics Calculator reports the population variance and standard deviation. To get the sample version, multiply its variance by n ÷ (n − 1) and take the square root, as shown below.

The two formulas

Both start the same way: find the mean, subtract it from each value, square the differences and add them up. That total is the sum of squared deviations. The only difference is what you divide by.

| PopulationSample
VarianceSum of squared deviations ÷ nSum of squared deviations ÷ (n − 1)
Standard deviation√ population variance√ sample variance
Symbolσ (sigma)s
Excel / Google SheetsSTDEV.PSTDEV.S
Use whenData covers the whole groupData is a sample of a bigger group

Why divide by n − 1 for a sample?

A sample's own mean sits closer to its own values than the true population mean usually does. So the squared deviations measured from the sample mean come out a little too small on average, and dividing by n would underestimate the population's spread. Dividing by n − 1 corrects this. It is called Bessel's correction.

The effect is large for small samples and fades as n grows. With 5 values, the sample variance is 25% larger than the population variance (5 ÷ 4). With 100 values, it is about 1% larger (100 ÷ 99).

Worked example (calculated both ways)

Take the ten values the calculator loads by default: 4, 8, 6, 5, 3, 2, 8, 9, 2, 5.

  • Count: n = 10.
  • Sum: 52. Mean: 52 ÷ 10 = 5.2.
  • Squared deviations from 5.2: for example, (4 − 5.2)² = 1.44 and (9 − 5.2)² = 14.44. Adding all ten gives 57.6.
  • Population variance: 57.6 ÷ 10 = 5.76. Population standard deviation: √5.76 = 2.4.
  • Sample variance: 57.6 ÷ 9 = 6.4. Sample standard deviation: √6.4 ≈ 2.5298.
  • The Statistics Calculator shows Variance (σ²) 5.76 and Std Deviation (σ) 2.4 for this data, which are the population figures.

    Converting the calculator's result to a sample SD

    Because the calculator gives population values, use this conversion when your data is a sample:

    Sample variance = Population variance × n ÷ (n − 1)

    For the example: 5.76 × 10 ÷ 9 = 6.4, and √6.4 ≈ 2.53.

    A second example, using the calculator's Spread preset 2, 4, 4, 4, 5, 5, 7, 9:

    • n = 8, mean = 5, sum of squared deviations = 32.
    • Population SD = √(32 ÷ 8) = 2 (this is what the calculator shows).
    • Sample SD = √(32 ÷ 7) ≈ 2.138.

    How to decide which one you need

    Ask: "Am I describing these exact numbers, or using them to say something about a larger group?"

    • Population (n): all 40 students' marks in your class, if you only care about this class; every transaction in a month's bank statement; the daily temperatures for every day of last year.
    • Sample (n − 1): 200 voters polled to estimate a city's opinion; 30 bulbs tested from a production batch; your last 12 months of returns used to estimate future volatility.

    When in doubt in research or coursework, the sample formula is usually expected, because most data is a sample of something larger. Check what your teacher, textbook or journal requires.

    Using the Statistics Calculator

  • Open the Statistics Calculator.
  • Type or paste your numbers separated by commas, spaces or new lines. Decimals and negative numbers work, for example 12.5, -3.1, 8.2.
  • The results update as you type: Count, Sum, Mean, Median, Mode, Min, Max, Range, Q1, Q3, IQR, Variance and Standard Deviation.
  • Try the presets (Basic, Spread, Stock returns) to see how the measures behave on different data.
  • A few things to know about the output:

    • Do not use thousands separators. Commas split numbers, so 1,500 is read as two values, 1 and 500. Type 1500.
    • Mode lists every value that shares the highest count. In the example above, 2, 5 and 8 each appear twice, so all three are shown. If every value appears once, every value is listed.
    • Q1 and Q3 are taken directly from the sorted list at positions n × 0.25 and n × 0.75 (rounded down, counting from zero). For the example, Q1 = 3 and Q3 = 8. Spreadsheet functions such as QUARTILE interpolate between values and give 3.25 and 7.5 for the same data. Neither is wrong; they are different conventions, so state which one you used.

    Common mistakes

    • Using STDEV.P in Excel for survey data, which understates the spread.
    • Mixing population variance with sample formulas later, for example in a t-test, which expects the sample SD.
    • Reporting variance when the question asks for standard deviation. Variance is in squared units (marks², ₹²). Standard deviation is in the original units.
    • Forgetting that a few outliers can inflate the SD a lot. Check the Min, Max and IQR alongside it. The median and IQR are more robust when data has extreme values.

    For quick percentage changes between periods, the Percentage Calculator is faster, and the Scientific Calculator handles square roots and powers if you want to check the steps by hand.

    Frequently asked questions

    What is the difference between population and sample standard deviation?

    Population SD divides the sum of squared deviations by n and describes a complete group. Sample SD divides by n − 1 and estimates the spread of a larger group from a sample.

    Does the Lazyblink Statistics Calculator use n or n − 1?

    It divides by n, so it reports the population variance and standard deviation. For a sample, multiply the variance by n ÷ (n − 1) and take the square root.

    What is the standard deviation of 4, 8, 6, 5, 3, 2, 8, 9, 2, 5?

    The mean is 5.2 and the sum of squared deviations is 57.6. The population SD is √(57.6 ÷ 10) = 2.4 and the sample SD is √(57.6 ÷ 9) ≈ 2.53.

    Which Excel function matches the calculator?

    STDEV.P matches the calculator's population standard deviation. STDEV.S gives the sample standard deviation.

    Try this tool on Lazyblink

    Put this guide into practice with our free online tool — no signup required.

    Open tool