---
title: "round function in Strata | Oplema"
description: "Round a number to the decimal places you choose, for example in prices or measurements. Write it as round(x, precision) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/round"
updated: "2026-11-04"
---

# round

Round decimal values to a consistent number of places for prices, measurements or reports.

## Try an expression

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

Example input

1. Row 1 `amount = 12.346`
2. Row 2 `amount = 8.764`
3. Row 3 `amount = NULL`

### Expression

```
round(amount, 2)
```

### Result

```
Row 1: 12.35
Row 2: 8.76
Row 3: NULL
```

The expression returns `DECIMAL(5,2)`. Formula stores it as `DOUBLE` in this example. NULL means the value is missing.

Try it live in Formula

Result
| id | amount | result |
| --- | --- | --- |
| 1 | 12.346 | 12.35 |
| 2 | 8.764 | 8.76 |
| 3 |  |  |

## Arguments and types

```
round(x, precision)
```

**x**

Number

**precision**

Number

Supported signatures (16)

```
round(x: BIGINT) → BIGINT
round(x: BIGINT, precision: INTEGER) → BIGINT
round(x: DECIMAL) → DECIMAL
round(x: DECIMAL, precision: INTEGER) → DECIMAL
round(x: DOUBLE) → DOUBLE
round(x: DOUBLE, precision: INTEGER) → DOUBLE
round(x: FLOAT) → FLOAT
round(x: FLOAT, precision: INTEGER) → FLOAT
round(x: HUGEINT) → HUGEINT
round(x: HUGEINT, precision: INTEGER) → HUGEINT
round(x: INTEGER) → INTEGER
round(x: INTEGER, precision: INTEGER) → INTEGER
round(x: SMALLINT) → SMALLINT
round(x: SMALLINT, precision: INTEGER) → SMALLINT
round(x: TINYINT) → TINYINT
round(x: TINYINT, precision: INTEGER) → TINYINT
```

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

[ceil

Round a number up to the nearest whole number.

](https://oplema.com/docs/strata/functions/ceil)[floor

Round a number down to the nearest whole number.

](https://oplema.com/docs/strata/functions/floor)[trunc

Remove the fractional part of a number, rounding toward zero. An optional second argument keeps that many decimal places.

](https://oplema.com/docs/strata/functions/trunc)[round\_even

Round a number, resolving exact halfway cases toward the nearest even digit.

](https://oplema.com/docs/strata/functions/round-even)

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

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