# power

> 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: power
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/power
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/power.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/math-functions/power.adoc
description: The `power()` function calculates the value of a number raised to the power of another number specified in the arguments.
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/power.md -->

The `power()` function calculates the value of a number raised to the power of another number specified in the arguments.

## [](#syntax)Syntax

This example shows the syntax of the `power()` function:

```sql
POWER(a,b)
```

Where:

-   `a`: The base number.

-   `b`: The exponent to which the base number is raised.


## [](#examples)Examples

### [](#basic-usage)Basic usage

In this case, the `power()` function calculates the result of raising one number to the power of another.

```sql
SELECT POWER(3, 4) AS "Example 1",
       POWER(7, 3) AS "Example 2";
```

The query returns:

```sql
 Example 1 | Example 2
-----------+-----------
        81 |       343
```

### [](#use-power-with-negative-values)Use `power()` with negative values

In this case, the `power()` function is applied to negative numbers.

```sql
SELECT POWER(-4, -5), POWER(-1, -2), POWER(-6, -7);
```

The query returns:

```sql
 power | power | power
-------+-------+-------
 -1024 |     1 |     0
```

### [](#use-power-with-floating-point-numbers)Use `power()` with floating-point numbers

In this example, use the `power()` function to calculate 2.5 raised to the power of 3.0.

```sql
SELECT POWER(2.5, 3.0) AS power_result;
```

The result, 15.625, is the value obtained by raising 2.5 to the third power.

```sql
 power_result
--------------
       15.625
```

### [](#zero-to-the-power-of-zero)Zero to the power of zero

This case shows that 0 expression raised to the power of 0 returns 1.

```sql
SELECT POWER(0, 0);
```

The query returns:

```sql
 power
-------
     1
```