---
title: MAX
url: https://www.tines.com/docs/formulas/functions/max/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# MAX

*[View on tines.com](https://www.tines.com/docs/formulas/functions/max/)*

Returns the argument with the highest numeric value. Can either be called with a single argument which must be an array or multiple arguments

**Categories:** Numbers

## Syntax

```
MAX(array) or MAX(number1, number2, ...)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": 13
  }
}
```

Formula:

```
MAX(my_action.message, 20)
```

Output:

```json
20
```

### Example 2

Input:

```json
{
  "my_action": {
    "message": [
      1,
      3,
      2
    ]
  }
}
```

Formula:

```
MAX(my_action.message)
```

Output:

```json
3
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "2",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": 13
        }
      },
      "position": {
        "x": 2505,
        "y": 3225
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "MAX",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "max": "=MAX(my_action.message, 20)"
        }
      },
      "position": {
        "x": 2505,
        "y": 3330
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
