> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/planning-sheets/reference/formula-syntax/statistical-functions/calculate-variance-and-standard-deviation.md).

# Calculate variance and standard deviation

Plan provides functions to calculate variance and standard deviation in a dataset. Use the functions in this section to measure how widely values are spread around the mean, making it easier to analyze data variability and distribution.

### STDEVP

The *STDEVP* function returns the population standard deviation of a set of numbers. It measures how widely values are dispersed from the mean when the data represents the entire population. The calculation uses *n* in the denominator.

#### Syntax

```
STDEVP(number1, [number2], ...)
```

#### Arguments

* `number1`, `number2`, ...: The numbers or range of values used to calculate the population standard deviation.

#### Return value

Returns the population standard deviation of the specified set of numbers.

#### Example

```
STDEVP(10, 20, 30, 40, 50)
```

Returns the population standard deviation of the specified set of numbers. In this example, the function returns `14.14`.

You can use the *STDEVP* function to analyze how widely values are spread from the mean for metrics such as sales, revenue, or performance scores.<br>

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fyau6lwZ2D4vH9De64Uql%2Fimage.png?alt=media&amp;token=c6cfb8bc-ed97-4d19-b838-52bb572cbe44" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Note

Use the [*STDEVS*](#stdevs) function when working with sample data, as it calculates the sample standard deviation using *(n − 1)* in the denominator. Use the *STDEVP* function when working with the entire population, as it calculates the population standard deviation using *n* in the denominator.
{% endhint %}

#### Excel equivalent

[STDEV.P](https://support.microsoft.com/en-us/office/stdevp-function-1f7c1c88-1bec-4422-8242-e9f7dc8bb195)

### STDEVS

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

#### Syntax

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

#### Arguments

* `number1`, `number2`, ...: The numbers or range of values used to calculate the sample standard deviation.

#### Return value

Returns the sample standard deviation of the specified set of numbers.

#### Example

```
STDEVS(10, 20, 30, 40, 50)
```

Returns the sample standard deviation of the specified set of numbers. In this example, the function returns `15.81`.

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

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FKLKjhnABPXF3cxUSWH7L%2Fimage.png?alt=media&amp;token=f3dbec3c-bd28-4fb7-9c63-fe472f3dcbad" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

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

### VARP

The *VARP* function returns the population variance of a set of numbers. It measures how widely values are spread from the mean when the data represents the entire population. The calculation uses *n* in the denominator.

#### Syntax

```
VARP(number1, [number2], ...)
```

#### Arguments

* `number1`, `number2`, ...: The numbers or range of values used to calculate the population variance.

#### Return value

Returns the population variance of the specified set of numbers.

#### Examples

```
VARP(10, 20, 30)
```

Returns the population variance of the specified set of numbers. In this example, the function returns `66.67`.

```
VARP(10, 20, 30, 40, 50)
```

Returns the population variance of the specified set of numbers. In this example, the function returns `200`.

You can use the *VARP* function to analyze how widely values are spread from the mean for metrics such as sales, revenue, or performance scores.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FHEci780a9gnWekicu3Op%2Fimage.png?alt=media&amp;token=b0fce0f6-77ea-44a3-ba8d-6e8f3935067a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Note

Use the [*VARS*](#vars) function when working with sample data, as it calculates the sample variance using *(n − 1)* in the denominator. Use the *VARP* function when working with the entire population, as it calculates the population variance using *n* in the denominator.
{% endhint %}

#### Excel equivalent

[VAR.P](https://support.microsoft.com/en-us/office/varp-function-26a541c4-ecee-464d-a731-bd4c575b1a6b)

### VARS

The *VARS* function returns the sample variance of a set of numbers. It measures how widely values are spread from the mean when the data represents a sample of a larger population. The calculation uses *(n − 1)* in the denominator to provide an unbiased estimate.

#### Syntax

```
VARS(number1, [number2], ...)
```

#### Arguments

* `number1`, `number2`, ...: The numbers or range of values used to calculate the sample variance.

#### Return value

Returns the sample variance of the specified set of numbers.

#### Examples

```
VARS(10, 20, 30)
```

Returns the sample variance of the specified set of numbers. In this example, the function returns `100`.

```
VARS(10, 20, 30, 40, 50)
```

Returns the sample variance of the specified set of numbers. In this example, the function returns `250`.

You can use the *VARS* function to analyze how widely values are spread from the mean for metrics such as sales, revenue, or performance scores.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FG0GLWgGAZMQ0TV0AljrD%2Fimage.png?alt=media&amp;token=26a28f86-87a5-41cc-9243-0fbe96b880dc" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[VAR.S](https://support.microsoft.com/en-us/office/var-s-function-913633de-136b-449d-813e-65a00b2b990b)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/reference/formula-syntax/statistical-functions/calculate-variance-and-standard-deviation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
