---
title: "divide function in Strata | Oplema"
description: "Divide whole numbers and discard the fractional part. For example, divide(5, 2) returns 2. Works in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/divide"
updated: "2026-11-04"
---

# divide

Divide whole numbers and discard the fractional part.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **INTEGER**.

### Expression

```
divide(5, 2)
```

### Result

```
2
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 2 |

## Arguments and types

```
divide(a, b)
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[fdiv

Divide two numbers and round the quotient down to a whole number, stored as DOUBLE.

](https://oplema.com/docs/strata/functions/fdiv)[abs

Return the absolute value of a number, removing any minus sign.

](https://oplema.com/docs/strata/functions/abs)[acos

Computes the arccosine of x.

](https://oplema.com/docs/strata/functions/acos)[acosh

Computes the inverse hyperbolic cos of x.

](https://oplema.com/docs/strata/functions/acosh)

[Browse numbers](https://oplema.com/docs/strata/functions#numbers) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/numeric.html#dividex-y)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
