> 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-percentiles-and-percent-ranks.md).

# Calculate percentiles and percent ranks

Plan provides functions to calculate percentiles and percentage ranks in a dataset. Use the functions in this section to determine the relative position of values and analyze their distribution within a set of numerical data.

### PERCENTILEEXC

The *PERCENTILEEXC* function returns the *k*-th percentile of a set of numbers using the exclusive method. The function accepts *k* values greater than `0` and less than `1`, excluding the minimum and maximum values from the calculation.

#### Syntax

```
PERCENTILEEXC(array, k)
```

#### Arguments

* `array`: The list or range of numeric values used to determine the percentile.
* `k`: Specifies the percentile to return as a decimal value greater than `0` and less than `1`.
  * `0.25`: Returns the 25th percentile.
  * `0.5`: Returns the median (50th percentile).
  * `0.75`: Returns the 75th percentile.

{% hint style="warning" %}

#### Note

The exclusive method supports only *k* values greater than `0` and less than `1`. If a value less than or equal to `0`, or greater than or equal to `1`, is specified, the *PERCENTILEEXC* function returns a **`#ERR`** error.
{% endhint %}

#### Return value

Returns the value corresponding to the specified percentile from the given set of numbers.

#### Examples

```
PERCENTILEEXC(10,20,30,40,50,60,70,80,0.25)
```

Returns the 25th percentile of the specified set of numbers. In this example, the function returns `22.5`.

```
PERCENTILEEXC(10,20,30,40,50,60,70,80,0.5)
```

Returns the 50th percentile (median) of the specified set of numbers. In this example, the function returns `45`.

```
PERCENTILEEXC(10,20,30,40,50,60,70,80,0.75)
```

Returns the 75th percentile of the specified set of numbers. In this example, the function returns `67.5`.

You can use the *PERCENTILEEXC* function to determine the relative standing of values within a dataset by calculating exclusive percentiles 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%2F95kMchEpisfkqxTNjloK%2Fimage.png?alt=media&amp;token=d8ff6729-517d-4567-bf2a-8de9c8db70a2" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[PERCENTILE.EXC](https://support.microsoft.com/en-us/office/percentile-exc-function-bbaa7204-e9e1-4010-85bf-c31dc5dce4ba)

### PERCENTILEINC

The *PERCENTILEINC* function returns the *k*-th percentile of a set of numbers using the inclusive method. The function accepts *k* values from `0` to `1`, including the minimum and maximum values in the calculation.

#### Syntax

```
PERCENTILEINC(array, k)
```

#### Arguments

* `array`: The list or range of numeric values used to determine the percentile.
* `k`: Specifies the percentile to return as a decimal value between `0` and `1`.
  * `0`: Returns the minimum value.
  * `0.25`: Returns the 25th percentile.
  * `0.5`: Returns the median (50th percentile).
  * `0.75`: Returns the 75th percentile.
  * `1`: Returns the maximum value.

{% hint style="warning" %}
The inclusive method supports `k` values from `0` to `1`, inclusive. If a value outside this range is specified, the *PERCENTILEINC* function returns a **`#ERR`** error.
{% endhint %}

#### Return value

Returns the value corresponding to the specified percentile from the given set of numbers.

#### Examples

```
PERCENTILEINC(10,20,30,40,50,60,70,80,0.25)
```

Returns the 25th percentile of the specified set of numbers. In this example, the function returns `27.5`.

```
PERCENTILEINC(10,20,30,40,50,60,70,80,0.5)
```

Returns the 50th percentile (median) of the specified set of numbers. In this example, the function returns `45`.

```
PERCENTILEINC(10,20,30,40,50,60,70,80,0.75)
```

Returns the 75th percentile of the specified set of numbers. In this example, the function returns `62.5`.

You can use the *PERCENTILEINC* function to determine the relative standing of values within a dataset by calculating percentiles 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%2FJ1N9Hhmw4KkXpKdYaZl9%2Fimage.png?alt=media&amp;token=b9b93475-c33c-4971-a081-941710446b63" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[PERCENTILE.INC](https://support.microsoft.com/en-us/office/percentile-inc-function-680f9539-45eb-410b-9a5e-c1355e5fe2ed)

### PERCENTRANKEXC

The *PERCENTRANKEXC* function returns the percentage rank of a value within a set of numbers using the exclusive method. It indicates the relative position of a value compared to other values and excludes the minimum and maximum values from the calculation.

#### Syntax

```
PERCENTRANKEXC(array, x, [significance])
```

#### Arguments

* `array`: The list or range of numeric values used to determine the percentage rank.
* `x`: The value used to determine the percentage rank.
* `significance` (optional): Specifies the number of significant digits in the returned value.

#### Return value

Returns the percentage rank of the specified value as a decimal greater than `0` and less than `1`.

{% hint style="warning" %}

#### Note

If the specified value is less than the minimum value in the dataset, the *PERCENTRANKEXC* function returns `0`. If the specified value is greater than the maximum value in the dataset, the function returns a **`#ERR`** error.
{% endhint %}

#### Examples

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

Returns the percentage rank of the specified value. In this example, the function returns `0.5`.

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

Returns the percentage rank of the specified value. In this example, the function returns `0.25`.

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

Returns the percentage rank of the specified value. In this example, the function returns `0.75`.

You can use the *PERCENTRANKEXC* function to determine the relative standing of a value within a dataset when excluding the minimum and maximum values.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F3xdXAayA58f509cdms7N%2Fimage.png?alt=media&amp;token=ad450114-c49b-4629-b937-899995f2e556" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[PERCENTRANK.EXC](https://support.microsoft.com/en-us/office/percentrank-exc-function-d8afee96-b7e2-4a2f-8c01-8fcdedaa6314)

### PERCENTRANKINC

The *PERCENTRANKINC* function returns the percentage rank of a value within a set of numbers using the inclusive method. It indicates the relative position of a value compared to other values and includes both the minimum and maximum values in the calculation.

#### Syntax

```
PERCENTRANKINC(array, x, [significance])
```

#### Arguments

* `array`: The list or range of numeric values used to determine the percentage rank.
* `x`: The value used to determine the percentage rank.
* `significance` (optional): Specifies the number of significant digits in the returned value.

#### Return value

Returns the percentage rank of the specified value as a decimal between `0` and `1`, inclusive.

{% hint style="warning" %}

#### Note

If the specified value is less than the minimum value in the dataset, the *PERCENTRANKINC* function returns `0`. If the specified value is greater than the maximum value in the dataset, the function returns a **`#ERR`** error.
{% endhint %}

#### Examples

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

Returns the percentage rank of the specified value. In this example, the function returns `0`.

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

Returns the percentage rank of the specified value. In this example, the function returns `0.5`.

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

Returns the percentage rank of the specified value. In this example, the function returns `1`.

You can use the *PERCENTRANKINC* function to determine the relative standing of a value within a dataset 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%2FIzkTn7RNQ39taVHSBaNv%2Fimage.png?alt=media&amp;token=0d9069d9-86b7-4bc6-8427-a17f67903b7f" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[PERCENTRANK.INC](https://support.microsoft.com/en-us/office/percentrank-inc-function-149592c9-00c0-49ba-86c1-c1f45b80463a)


---

# 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-percentiles-and-percent-ranks.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.
