> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Mod

> The Mod (modulus) function computes the remainder of a division operation, dividing the first value by the second value.

The **Mod** (modulus) function computes the remainder of a division operation, dividing the first value by the second value.

## Syntax

```
Mod(x, y)
```

Function arguments:

**x** (Required) The dividend; the value that is divided.

**y** (Required) The divisor; the value that is divided by. Non-zero.

## Examples

```
Mod(19,5)=4
```

19 divided by 5 has the modulus of 4.

```
Div(2,3)=0
```

2 divided by 3 has the modulus of 2.

```
Mod([X],[Y])
```

The **Mod** function returns the following values for the X and Y columns:

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/b4868257d7a67662e0cac706b0140977637f6f3f073f497f5c20c5fe09a21c5e/assets/docs-images/a362e36-999.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260817%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260817T050927Z&X-Amz-Expires=604800&X-Amz-Signature=14c8673c8e88ef7c145a5ec6c5ba6b45ad12a219e63184d6d58694b8345beade&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Related resources

* [Div](/docs/div)