# exp2 {#exp2}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`exp2(X)`

## Arguments {#arguments}

**X** is a scalar/pair/vector/matrix.

## Details {#details}

Return 2 raised to the power of *X*.

**Return value**: DOUBLE type

## Examples {#examples}

```
exp2(3);
// output: 8

exp2(2 4 NULL 6);
// output: [4,16,,64]

exp2(1..4$2:2);
```

|\#0|\#1|
|---|---|
|2|8|
|4|16|

