# STDEVS

The **STDEVS** function returns the sample standard deviation of a dataset. It measures how widely values are dispersed from the mean, assuming the data represents a sample of a larger population. The calculation uses *(n − 1)* in the denominator to provide an unbiased estimate.

{% hint style="info" %}
**STDEV** is the legacy version of the STDEVS function and works similarly. It can be used in place of **STDEVS** for sample standard deviation calculations.
{% endhint %}

### Syntax

```javascript
STDEVS(number1, [number2], ...)
```

### Arguments

The **STDEVS** function syntax has the following arguments:

* number1, number2, ... - The numeric values for which you want to calculate the sample standard deviation. Required.

### Example

<pre class="language-javascript"><code class="lang-javascript"><strong>STDEVS(10, 20, 30, 40, 50)
</strong>// Returns 15.81
</code></pre>

You can use the **STDEVS** function to analyze how widely values are spread from the mean by calculating the sample standard deviation for metrics such as sales, revenue, or performance scores.

<figure><img src="/files/hSKJLmaA4nYoHwi1nBFL" alt=""><figcaption><p>STDEVS function</p></figcaption></figure>

{% hint style="info" %}
We can also use the [**SELECT**](/planning-sheets/formula-syntax/measure-column-selection-functions/select.md) function to select a range of columns from 1 to 4 for the 'Revenue' measure (2022 Revenue - 2025 Revenue)

<pre><code><strong>STDEVS(SELECT([Revenue], 1, 4))
</strong></code></pre>

{% endhint %}

### Excel Equivalent

[STDEVS](https://support.microsoft.com/en-us/office/stdev-s-function-7d69cf97-0c1f-4acf-be27-f3e83904cc23)

### FAQs

**Q1. How is STDEVS calculated?**

STDEVS (Sample Standard Deviation) is calculated by taking the square root of the sum of squared deviations from the mean, divided by *(n − 1)*.

<figure><img src="/files/95fMlpAokfOyAuXXvfBg" alt="" width="301"><figcaption></figcaption></figure>

Where:

* x = each value in the dataset
* <img src="/files/7kgTtFg5mZ5tcXpS74Op" alt="" data-size="line"> = mean of the values
* n = number of values

It measures how widely the values are spread from the mean by calculating the sample standard deviation, which is the square root of the [sample variance](/planning-sheets/formula-syntax/statistical-functions/vars.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/formula-syntax/statistical-functions/stdevs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
