# QUARTILEINC

The **QUARTILEINC** function divides a dataset into four equal parts and returns a value based on the specified quartile. It uses the inclusive method, meaning the minimum and maximum values are included in the calculation, helping you understand how data is distributed across ranges.

{% hint style="info" %}
**QUARTILE** is the legacy version of the **QUARTILEINC** function and works similarly. It can be used in place of QUARTILEINC for inclusive quartile calculations.
{% endhint %}

### Syntax

```javascript
QUARTILEINC(array, quart)
```

### Arguments

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

* array - The range or list of numeric values. Required.
* quart - The quartile value to return: (Required)
  * 0 - Minimum value
  * 1 - First Quartile (Q1) – 25th percentile
  * 2 - Second Quartile (Q2) – Median (50th percentile)
  * 3 - Third Quartile (Q3) – 75th percentile
  * 4 - Maximum value

### Example

<pre class="language-javascript"><code class="lang-javascript"><strong>QUARTILEINC(10,20,30,40,50,60,70,80, 1)
</strong>// Returns 25
<strong>QUARTILEINC(10,20,30,40,50,60,70,80, 2)
</strong>// Returns 45
<strong>QUARTILEINC(10,20,30,40,50,60,70,80, 3)
</strong>// Returns 65
</code></pre>

You can use the **QUARTILEINC** function to analyze the distribution of a dataset by dividing values into four equal parts for metrics such as sales, revenue, or performance scores.

<figure><img src="/files/a2LglCQAeXxlXr4QdfOH" alt=""><figcaption><p>QUARTILEINC 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>QUARTILEINC(SELECT([Revenue], 1, 4), 3)
</strong></code></pre>

{% endhint %}

### Excel Equivalent

[QUARTILEINC](https://support.microsoft.com/en-us/office/quartile-inc-function-1bbacc80-5075-42f1-aed6-47d735c4819d)

### FAQs

**Q1. What do quartiles represent?**

* Q1 (First Quartile): 25% of the values fall below this value.
* Q2 (Second Quartile): 50% of the values fall below this value (Median).
* Q3 (Third Quartile): 75% of the values fall below this value.


---

# 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/quartileinc.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.
