# 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="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FddAVXLR62QUK9RihIqIP%2F2026-02-16_17h06_59.png?alt=media&#x26;token=847c39d2-1074-4a40-8f70-03c27de2da7e" alt=""><figcaption><p>STDEVS function</p></figcaption></figure>

{% hint style="info" %}
We used the [**SELECT**](https://docs.inforiver.com/formula-syntax/measure-column-selection-functions/select) function to select a range of columns from 1 to 4 for the 'Revenue' measure (2022 Revenue - 2025 Revenue)
{% 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="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FMcH34Db8CJGlaD23puhy%2Fimage.png?alt=media&#x26;token=87733939-f59d-49ac-9f23-8378c38c9608" alt="" width="301"><figcaption></figcaption></figure>

Where:

* x = each value in the dataset
* <img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fslitpr0n5IIdqR8vSl7J%2Fimage.png?alt=media&#x26;token=4d5395e4-8978-4933-b791-684a3e9cd48a" 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](https://docs.inforiver.com/formula-syntax/statistical-functions/vars).
