# Minimum macro

Learn how to find the smallest number in a collection.

This macro returns the minimum value in a [collection](/reference/cql/data-types/core/collection).

The minimum is the smallest of all the numbers in the collection. For example, the minimum of the numbers 2, 3, 4, 7, and 9 is 2.

Since an empty collection has no minimum, trying to get the minimum of an empty collection results in an error. So be sure to provide a [default value](/reference/cql/expressions/operations/other/fallback) in cases where the collection might be empty.

## Syntax

This macro has the following syntax:

```cql
minimum of /*<collection>*/
```

Alternatively, you can use the abbreviated form:

```cql
min of /*<collection>*/
```

You can also prefix the macro with a definite article for readability:

```cql
the minimum of /*<collection>*/
```

## Parameters

These are the supported parameters:

- `collection`: `collection`

  A non-empty collection of numbers from which you want to find the minimum. Elements are automatically converted to numbers if necessary.

## Examples

Here is an example of how to get the minimum value of a collection of numbers:

```cql
minimum of [1.5, 2.5, "3"] // 1.5
```

In cases where the collection might be empty, you can provide a default value:

```cql
minimum of /*<collection>*/ or else null
```
