---
title: math.pow() function
description: math.pow() returns x**y, the base-x exponential of y.
url: https://docs.influxdata.com/flux/v0/stdlib/math/pow/
estimated_tokens: 538
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/math/pow/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.22.0+

InfluxDB support

`math.pow()` returns `x**y`, the base-x exponential of `y`.

##### Function type signature

```js
(x: float, y: float) => float
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### x

(Required)
Base value to operate on.

### y

(Required)
Exponent value.

## Examples

* [Return the base-x exponential of a value](#return-the-base-x-exponential-of-a-value)
* [Use math.pow in map](#use-mathpow-in-map)

### Return the base-x exponential of a value

```
import "math"

math.pow(x: 2.0, y: 3.0)// 8.0

```

### Use math.pow in map

```js
import "math"

data
    |> map(fn: (r) => ({_time: r._time, _value: math.pow(x: r.t1, y: r.t2)}))
```

[](#view-example-input-and-output)

View example input and output

#### Input data

|       \_time       |  t1  |  t2  |
|--------------------|------|------|
|2021-01-01T00:00:00Z|\-2.18|19.85 |
|2021-01-01T00:00:10Z|10.92 | 4.97 |
|2021-01-01T00:00:20Z| 7.35 |\-3.75|
|2021-01-01T00:00:30Z|17.53 |19.77 |
|2021-01-01T00:00:40Z|15.23 |13.86 |
|2021-01-01T00:00:50Z| 4.43 | 1.86 |

#### Output data

|       \_time       |         \_value         |
|--------------------|-------------------------|
|2021-01-01T00:00:00Z|           NaN           |
|2021-01-01T00:00:10Z|   144532.83209763622    |
|2021-01-01T00:00:20Z|  0.0005641862251143407  |
|2021-01-01T00:00:30Z|3886587782891166000000000|
|2021-01-01T00:00:40Z|    24672926229934220    |
|2021-01-01T00:00:50Z|   15.933490684011332    |
| _time | t1 | t2 |
| --- | --- | --- |
| _time | t1 | t2 |
| 2021-01-01T00:00:00Z | -2.18 | 19.85 |
| 2021-01-01T00:00:10Z | 10.92 | 4.97 |
| 2021-01-01T00:00:20Z | 7.35 | -3.75 |
| 2021-01-01T00:00:30Z | 17.53 | 19.77 |
| 2021-01-01T00:00:40Z | 15.23 | 13.86 |
| 2021-01-01T00:00:50Z | 4.43 | 1.86 |

| _time | _value |
| --- | --- |
| _time | _value |
| 2021-01-01T00:00:00Z | NaN |
| 2021-01-01T00:00:10Z | 144532.83209763622 |
| 2021-01-01T00:00:20Z | 0.0005641862251143407 |
| 2021-01-01T00:00:30Z | 3886587782891166000000000 |
| 2021-01-01T00:00:40Z | 24672926229934220 |
| 2021-01-01T00:00:50Z | 15.933490684011332 |
