# MAX

\*\* The function MAX returns the largest Number from within a List of Numbers, or from some number of individual Number values.\*\*

This function takes input in two forms: it will accept either a [List](../../variable-data-types/the-list-data-type) of [Numbers](../../variable-data-types/the-number-variable-data-type), or an arbitrary number of individual Number values. It will return a single Number: the largest of the Numbers given (either within the list or individually).

#### Declaration

```javascript
MAX(list_of_numbers) -> max_of_numbers
```

```javascript
MAX(number_1, number_2, ... number_n) -> max_of_numbers
```

#### Parameters

**list\_of\_numbers** (type: `List` of `Numbers`)

A list of Numbers. There is no limit to the number of items that can be in this list.

**number\_n** (type: `Number`)

The _&#x6E;_&#x74;h individual Number given as input. _n_ can be arbitrarily large; there is no upper limit to the number of Numbers MAX will accept.

#### Return Values

**max\_of\_numbers** (type: `Number`)

The largest of the given numbers.

#### Examples

The following example takes the individual Numbers 1, 2, and 3 as input and returns the largest of the three:

```javascript
MAX(1, 2, 3) -> 3
```

The following example takes the List of Numbers \[1, 2, 3] and returns the largest Number of the three in the List. Note that the output is identical to the example above.

```javascript
MAX([1, 2, 3]) -> 3
```

While the MAX function accepts input in the form of either a List of Numbers or some individual Number values, it cannot parse a combination of the two. The following example demonstrates how the MAX function will behave if given both a List and an individual Number – namely, that it returns NULL:

```javascript
MAX([1, 2], 3) -> NULL
```
