HomeGoogle DocsSpreadsheetHow to Use the STDEV Function in Google Sheets

How to Use the STDEV Function in Google Sheets

The STDEV function in Google Sheets is a statistical function used to calculate the standard deviation of a sample dataset. Alternatively, you can use the STDEV.S function, which behaves identically.

Google Sheets supports both functions—STDEV and STDEV.S—likely for compatibility with similar spreadsheet applications like Microsoft Excel. While both give the same result, I recommend using STDEV.S, as it’s the more explicitly named version for sample-based standard deviation.

In this tutorial, I’ll use the STDEV function in examples, but you can freely replace it with STDEV.S depending on your preference.

When to Use STDEV/STDEV.S

Use these functions only if your dataset represents a sample of a larger population—not the entire population. If you’re calculating the standard deviation for an entire population, use STDEVP or the updated STDEV.P function.

Other Standard Deviation Options in Google Sheets

Besides STDEV and STDEV.S, Google Sheets offers two more methods for calculating sample standard deviation:

  1. SUBTOTAL function with function numbers 7 or 107.
  2. DSTDEV – a database function designed to work with structured database-like ranges.

Since DSTDEV works differently from regular functions, I’ve covered it in a separate tutorial: DSTDEV Database Function in Google Sheets.

Calculate the Standard Deviation of a Sample in Google Sheets

Standard deviation tells you how much data points deviate from their mean (average).

  • Low standard deviation: Data points are close to the mean.
  • High standard deviation: Data points are spread out across a wider range.

Example 1: Data Points Close to the Mean

40
40
41
41

Mean: 40.5

This will result in a low STDEV value.

Example 2: Data Points Spread Out

40
40
50
9

Mean: 34.75

This will result in a high STDEV value.

If all data values are the same, the mean will equal those values, and the STDEV will return 0, indicating no deviation.

For a deeper dive into the concept, refer to the Wikipedia page on Standard Deviation.

Syntax of the STDEV Function in Google Sheets

STDEV(value1, [value2, ...])

Parameters:

  • value1 – The first value or range in the sample.
  • value2 – Optional. Additional values or ranges to include.

STDEV Formula Examples

Example 1: Single Range Input

=STDEV(A3:A8)

If the values in A3:A8 are all the same (e.g., 26), the output will be 0—no deviation.

You can verify the mean using:

=AVERAGE(A3:A8)

Example 2: Two Separate Ranges or Values

=STDEV(A3:A8, B3:B8)

Or use a single range:

=STDEV(E3:E14)
Examples of the STDEV function in Google Sheets with sample data and formula outputs

Both methods will return the same standard deviation if the values are the same.

You can also pass individual values like =STDEV(10, 15, 20).

Example 3: Conditional Standard Deviation Using FILTER

You can apply conditions before calculating standard deviation. For example, calculate the standard deviation of numbers greater than or equal to 30:

=STDEV(FILTER(D1:D12, D1:D12 >= 30))

In this example, only values ≥30 will be considered. Text strings and blank cells are automatically ignored by STDEV.

STDEV function in Google Sheets with conditional calculation using FILTER

Final Notes

  • The STDEV function in Google Sheets ignores text and blanks.
  • You can use STDEV.S interchangeably.
  • Pair it with FILTER to apply conditions before calculation.
Prashanth K V
Prashanth K V
Your Trusted Google Sheets and Excel Expert Prashanth K V is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Top Discussions

More like this

How to Use the SHEET and SHEETS Functions in Google Sheets

The SHEET and SHEETS functions let you retrieve information about worksheets in a Google...

How to Create a Self-Healing Table of Contents in Google Sheets

A table of contents makes navigating large Google Sheets workbooks much easier. However, a...

Sort a Tab Name List Dynamically by Workbook Order in Google Sheets

When your workbook contains many sheets (tabs), you may create a table of contents...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.