> For the complete documentation index, see [llms.txt](https://fivesobes.gitbook.io/nexorm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivesobes.gitbook.io/nexorm/operators/update-operators/number-operators/usdmod.md).

# $mod

Update records by setting the value of a numeric column to the result of a modulo operation. The $mod method is used to calculate the remainder when a number is divided by another number. For example, if the column value is 10 and the divisor is 3, the result will be 1 (since 10 ÷ 3 leaves a remainder of 1). This operation is useful for situations where you need to work with remainders, such as when determining if a value is divisible by another number or handling cyclic data.

```typescript
await Member.$update({
    $where: { 
        age: { 
            $eq: 16 
        } 
    },
    $update: {
        $mod: {
          age: 2
        }
    }
});
```
