## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> REMAINDER[REMAINDER]:::quoted
REMAINDER --> End((END))
```
## Purpose
The `REMAINDER` SQL function uses the round function in its formula, whereas the MOD function uses the floor function in its formula.
See also [[MOD]].
Parameters:
- Number1 (`decimal`): a number.
- Number2 (`decimal`): a number.
Returns: the remainder.
## Examples
The following example retrieves the remainder of 25 divided by 7; since 25 / 7 rounds to 4, the remainder is 25 - 4 * 7:
```sql
select remainder(25, 7)
-------------------
-3
```
The following example retrieves the remainder of 1 divided by 2:
```sql
select remainder(1, 2)
-------------------
1
```