> For the complete documentation index, see [llms.txt](https://v5docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5docs.keyfax.biz/reference/expression-reference/numeric-expressions/max-and-min.md).

# Max and Min

Return the largest or smallest of the numbers given.

| Expression       | Result                                   |
| ---------------- | ---------------------------------------- |
| `Number Max(10)` | The value, or 10 if the value is smaller |
| `Number Min(10)` | The value, or 10 if the value is larger  |

Both take between two and five numbers, so `Max(a, b, c)` works as well as `Max(a, b)`.

A common use is to floor a calculated quantity at one: `Max(1)` after working out how many of something to order.

**This page still needs**

* A worked example with real databox values
