> 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/mod.md).

# Mod

Returns the remainder after dividing the databox value by the number given.

| Expression | Databox value | Result |
| ---------- | ------------- | ------ |
| `Mod(12)`  | `38`          | `2`    |
| `Mod(2)`   | `38`          | `0`    |
| `Mod(2)`   | `37`          | `1`    |

`Mod(2)` returning 0 for an even number and 1 for an odd one is the usual way to test for odd or even. `Mod(12)` gives clock arithmetic.
