# $pow

`$pow` operator lets you calculate **power of** return the result of the expression. You can use this in any [<mark style="color:blue;">**Expression Object**</mark>](https://docs.cosmocloud.io/flow-builder/cql-cosmocloud-query-language/building-expressions).

## Syntax

```json
{
    "$pow": [ <number>, <exponent> ]
}
```

### Properties

| Field       | Description                                                                                                                                                                                                                    | Required |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| \<number>   | The `<number>` expression can be any valid [<mark style="color:blue;">**expression**</mark>](https://docs.cosmocloud.io/flow-builder/cql-cosmocloud-query-language/building-expressions) as long as it resolves to a number.   | true     |
| \<exponent> | The `<exponent>` expression can be any valid [<mark style="color:blue;">**expression**</mark>](https://docs.cosmocloud.io/flow-builder/cql-cosmocloud-query-language/building-expressions) as long as it resolves to a number. | true     |

### Returns

`float` - The result of $pow operation

## Examples

### Basic example

```json
{
    "$pow": [2, 2]
}
```

The above expression returns **4.0** (2^2)

### With Nested Expressions

```json
{
    "$pow": [
        {
            "$add": [1, 2]
        },
        2
    ]
}
```

The above expression calculates the nested expression, return **3** in its place and then the outer `$pow` expression returns **9** overall.

### With Magical Autocomplete

Let's say we have declared a variable `temp` in our API flow, which has a value of 5 currently.

```json
{
    "$pow": ["$.variables.temp", 3]
}
```

The above expression would resolve to a result of **125.0** (5^3 = 5\*5\*5)
