---
title: "abs function in Strata | Oplema"
description: "Return the absolute value of a number, removing any minus sign. For example, abs(-17.4) returns 17.4. Works in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/abs"
updated: "2026-11-04"
---

# abs

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

## Try an expression

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

### Expression

```
abs(-17.4)
```

### Result

```
17.4
```

The expression returns `DECIMAL(3,1)`. Formula stores it as `DOUBLE` in this example. 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 | 17.4 |

## Arguments and types

```
abs(x)
```

**x**

Number

Supported signatures (13)

```
abs(x: BIGINT) → BIGINT
abs(x: DECIMAL) → DECIMAL
abs(x: DOUBLE) → DOUBLE
abs(x: FLOAT) → FLOAT
abs(x: HUGEINT) → HUGEINT
abs(x: INTEGER) → INTEGER
abs(x: SMALLINT) → SMALLINT
abs(x: TINYINT) → TINYINT
abs(x: UBIGINT) → UBIGINT
abs(x: UHUGEINT) → UHUGEINT
abs(x: UINTEGER) → UINTEGER
abs(x: USMALLINT) → USMALLINT
abs(x: UTINYINT) → UTINYINT
```

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

[sign

Return -1 for a negative number, 0 for zero and 1 for a positive number.

](https://oplema.com/docs/strata/functions/sign)[round

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

](https://oplema.com/docs/strata/functions/round)[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)

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

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