# evm_min

Returns the minimum of two UINT256 values.

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

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

Returns the minimum of two UINT256 values.

## Overload 1: evm_min(UINT256, UINT256)

```sql
evm_min(UINT256, UINT256)
```

Returns the smaller 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

Smaller value

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

- `min` (UINT256)

Smaller value. The smaller UINT256 input; NULL when either input is NULL.

### Examples

_Local SQL · Local_

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

## 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
