---
schema_version: "1"
id: 91d3c8250ffb724e6fa1855c6cc90d765d737261186c5b87e433fd506c9562ca
title: mod
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-core-functions-mod.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-core-functions-mod
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 396c44bab6ecf97365dfef4eb86113e202bf85217757780486570fef9bc7ce05
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# mod

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## mod(Number, Number): Number

Returns the modulo (the remainder after dividing the `dividend` by the `divisor`).

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>dividend</code></p></td><td><p>The number that serves as the dividend for the operation.</p></td></tr><tr><td><p><code>divisor</code></p></td><td><p>The number that serves as the divisor for the operation.</p></td></tr></tbody></table>

### Example

This example returns the modulo of the input values. Note that you can also use the
`mod(dividend, divisor)` notation (for example, `mod(3, 2)` to return `1`).

#### Source

```DataWeave
%dw 2.0
output application/json
---
[ (3 mod 2), (4 mod 2), (2.2 mod 2) ]
```

#### Output

```JSON
[ 1, 0, 0.2]
```
