> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for MOD function

# MOD

Calculates the remainder after dividing two values, `<value_n>` / `<value_d>.`

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
MOD(<value_n>,<value_d>)
```

## Parameters

| Parameter   | Description                              | Supported input types      |
| :---------- | :--------------------------------------- | :------------------------- |
| `<value_n>` | The numerator of the division equation   | `INT`, `BIGINT`, `NUMERIC` |
| `<value_d>` | The denominator of the division equation | `INT`, `BIGINT`, `NUMERIC` |

## Return Type

Same as the input.

## Example

The following example returns the remainder of 45 divided by 7:

<div className="query-window">
  ```
  SELECT MOD(45, 7);
  ```

  | mod <span>int</span> |
  | :------------------- |
  | 3                    |

  <p><span>Rows: 1</span><span>Execution time: 5.35ms</span></p>
</div>
