Skip to main content

$mod

The $mod operator returns the remainder after dividing the first numeric value by the second numeric value.

Input

  • An array containing exactly two numeric values (dividend and divisor)

Output

  • The remainder after division (first % second)

Examples

Basic Modulo

Result: 1

Field Value Modulo

Result: The remainder when item_count is divided by group_size

Decimal Modulo

Result: 4.1

Modulo by Zero Error

Result: Error (division by zero)