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 KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV 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.

How to Generate Semimonthly Dates in Google Sheets

If you need to generate semimonthly sequential dates in Google Sheets, you can do...

How to Make Just One Page Landscape in Google Docs

Sometimes, you may need to include a wide table, an organizational chart, or a...

Google Sheets: Get the Last Row with Any Data Across Multiple Columns

It’s common to have several empty rows at the bottom of a Google Sheet,...

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

More like this

How to Generate Semimonthly Dates in Google Sheets

If you need to generate semimonthly sequential dates in Google Sheets, you can do...

Google Sheets: Get the Last Row with Any Data Across Multiple Columns

It’s common to have several empty rows at the bottom of a Google Sheet,...

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

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.