---
title: "sqrt function in Strata | Oplema"
description: "Calculate the square root of a number, such as 3 from an input of 9. A negative input is rejected with an error. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/sqrt"
updated: "2026-11-04"
---

# sqrt

Calculate the square root of a number.

## Try an expression

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

### Expression

```
sqrt(9)
```

### Result

```
3.0
```

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 | 3 |

## Arguments and types

```
sqrt(x)
```

**x**

Number

Supported signatures (1)

```
sqrt(x: DOUBLE) → DOUBLE
```

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.

### Negative inputs are rejected

```
sqrt(-1)
```

This input is rejected: cannot take square root of a negative number

## Related functions

[cbrt

Calculate the cube root of a number.

](https://oplema.com/docs/strata/functions/cbrt)[bit\_count

Returns the number of bits that are set.

](https://oplema.com/docs/strata/functions/bit-count)[isfinite

Check whether a value is finite, meaning neither infinite nor NaN.

](https://oplema.com/docs/strata/functions/isfinite)[isinf

Check whether a value is infinite.

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

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

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