# MODE

The **MODE** function returns the value that appears most frequently in a dataset. It finds the value with the highest frequency and returns only one result.

### Syntax

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

### Arguments

The MODE function syntax has the following arguments:

* number1, number2, ... - The numbers or range of values for which you want to find the most frequent value. Required.

### Example

<pre class="language-javascript"><code class="lang-javascript"><strong>MODE(10, 20, 30, 20, 40)
</strong>// returns 20
<strong>MODE(5, 8, 5, 10, 8, 5)
</strong>// returns 5
</code></pre>

You can use the MODE function to determine the most common value in a dataset when analyzing frequently occurring metrics such as sales, scores, or costs.

{% hint style="warning" %}
If no values are repeated, the **MODE** function returns a **#VALUE!** error.
{% endhint %}

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F6OIeqdGfnWeal2XIxbqZ%2F2026-02-13_17h36_02.png?alt=media&#x26;token=29d9a7fb-3250-45fe-8317-89b42c4ea4b6" alt=""><figcaption><p>MODE function</p></figcaption></figure>

{% hint style="info" %}
We can also use 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

[MODE](https://support.microsoft.com/en-us/office/mode-function-e45192ce-9122-4980-82ed-4bdc34973120)
