# divide() Function & Examples

Use the divide() operators function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## divide

#### x / y

#### divide(x, y)

Try it yourself:

```calculio
a = 2 / 3
a * 3
4.5 / 2
3 + 4 / 2
(3 + 4) / 2
18 km / 4.5
```

[multiply](https://calcul.io/function/multiply/index.md)

---

## divide(): Quotients and Mathematical Division

**divide()** divides one value by another. For numbers, divide(12, 3) returns 4. It is useful when expressing rates, conversions, averages, proportions, and normalization in a readable function form.

## Never ignore the denominator

Division by zero is undefined in ordinary real arithmetic. Test values with [equal()](https://calcul.io/function/equal/index.md) or protect a model using [and()](https://calcul.io/function/and/index.md) before division. Very small denominators are also important because they can create huge, unstable values.

For matrices, divide has rules that differ from ordinary matrix multiplication; use [dotDivide()](https://calcul.io/function/dotDivide/index.md) when you explicitly need element-wise quotients. Pair division with [multiply()](https://calcul.io/function/multiply/index.md) to check a result, and apply [round()](https://calcul.io/function/round/index.md) only when presenting a value.

## Units and precision

Division naturally changes units: kilometres divided by hours produces a speed. Keep units compatible and retain precision through intermediate calculations. For a collection’s average, combine [sum()](https://calcul.io/function/sum/index.md) with its count deliberately.

[All functions](https://calcul.io/functions/index.md)
