# cbrt

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: cbrt
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-functions/math-functions/cbrt
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/math-functions/cbrt.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/math-functions/cbrt.adoc
description: The `cbrt()` function calculates and returns the cube root of a given number.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/math-functions/cbrt.md -->

The `cbrt()` function calculates and returns the cube root of a given number. In mathematical terms, for a number _x_, its cube root _y_ is determined by the equation _y³ = x_.

## [](#syntax)Syntax

The syntax for the `cbrt()` function is:

```sql
CBRT(number)
```

Where:

-   `number`: A required value representing the number for which to calculate the cube root. It can be a positive or negative whole number, a decimal, or even an expression that evaluates to a number.


For example, expressions like `SELECT CBRT(some_column) from test_table`, assuming `some_column` contains a numeric value.

> 📝 **NOTE**
>
> **Return Value:** - Returns `NULL` if the argument is `NULL`. - Returns an error if the input parameter is not a numeric type.

## [](#examples)Examples

These examples show how to use the `cbrt()` function:

### [](#basic-cube-root-calculation)Basic cube root calculation

Consider the example:

```sql
  SELECT CBRT(125);
```

The result of this query will be:

```sql
 cbrt
------
    5
```

### [](#cube-root-of-a-negative-value)Cube root of a negative value

To calculate the cube root of a negative number, use the `cbrt()` function as shown:

```sql
  SELECT CBRT(-125);
```

Result:

```sql
 cbrt
------
   -5
```

### [](#cube-root-of-decimal-result)Cube root of decimal result

For calculations with decimal numbers:

```sql
SELECT CBRT(32);
```

The result is a decimal value:

```sql
       cbrt
-------------------
 3.174802103936399
```

### [](#cube-root-of-decimal-input)Cube root of decimal input

In this scenario, a decimal value is provided as the argument:

```sql
SELECT CBRT(0.12815);
```

The result will be the cube root of the provided decimal value.

```sql
    cbrt
------------
 0.50416523
```

### [](#handle-incorrect-argument)Handle incorrect argument

When a non-numeric argument is provided, the `cbrt()` function works as shown here:

```sql
SELECT CBRT('abc');
```

The function returns an error and the result is not valid.

```sql
invalid input syntax for type double precision: "abc"
```

### [](#cbrt-operator-x)CBRT operator (`||/(x)`)

This example uses the CBRT operator (`||/(x)`) to calculate the cube root of a number:

```sql
SELECT ||/(1728) AS cbrt_operator;
```

This example calculates the cube root of 1728 using the CBRT operator. The result of this query will be:

```sql
   cbrt_operator
--------------------
 12.000000000000002
```