# evm_max

Returns the maximum of two UINT256 values.

Canonical HTML: <https://determica.com/docs/functions/evm_max>

- Kind: scalar function
- Category: [EVM utilities](/docs/category/evm-utilities.md)
- Tags: Types, EVM

Returns the maximum of two UINT256 values.

## Overload 1: evm_max(UINT256, UINT256)

```sql
evm_max(UINT256, UINT256)
```

Returns the larger of two UINT256 values.

- Kind: scalar
- Execution context: Offline
- Behavior: Transform
- Execution modes: Offline
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: One Per Input
- Determinism: Deterministic
- Return shape: Scalar
- Schema stability: Fixed
- Stability: Stable
- Side effects: None documented

### Inputs

- `a` (UINT256; required; positional) — First UINT256 value.
- `b` (UINT256; required; positional) — Second UINT256 value.

### Returns

Larger value

The larger UINT256 input; NULL when either input is NULL.

- `max` (UINT256)

Larger value. The larger UINT256 input; NULL when either input is NULL.

### Examples

_Local SQL · Local_

```sql
SELECT evm_max(9::UINT256, 14::UINT256)::VARCHAR AS result;
-- => [{"result":"14"}]
```

## Related functions

- [muldiv](/docs/functions/muldiv.md) — See Also
- [fixed_mul](/docs/functions/fixed_mul.md) — See Also
- [fixed_div](/docs/functions/fixed_div.md) — See Also
