> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for ATAN2 function

# ATAN2

Two-argument arc tangent function. Calculates the angle, in radians, between the specified positive x-axis value and the ray from the origin to the point `(y,x)`.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
ATAN2(<value_y>,<value_x>)
```

## Parameters

| Parameter   | Description                                  | Supported input types |
| :---------- | :------------------------------------------- | :-------------------- |
| `<value_y>` | The `y value` in the arc tangent calculation | `DOUBLE PRECISION`    |
| `<value_x>` | The `x value` in the arc tangent calculation | `DOUBLE PRECISION`    |

## Return Type

`DOUBLE PRECISION`

## Example

The following example calculates the arc tangent of the values `11` and `3`:

<div className="query-window">
  ```
  SELECT ATAN2(11,3) as result;
  ```

  | result <span>double</span> |
  | :------------------------- |
  | 1.3045442776439713         |

  <p><span>Rows: 1</span><span>Execution time: 5.54ms</span></p>
</div>
