> For the complete documentation index, see [llms.txt](https://docs.cheddar.vihan.org/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheddar.vihan.org/docs/mathematics/remainder.md).

# Remainder

## Syntax

```swift
x % y
```

## Explanation

The remainder operator returns the remainder left over after division of the two operands. The sign of the dividend is taken rather than the divisor making it different from a `modulus` function.

## Examples

```swift
16 % 16  // 0
17 % 16  // 1
18 % 16  // 2
-16 % 16 // 0
```
