---
title: atan2 function
description: Learn the syntax of the atan2 function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/atan2
---

# `atan2` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns the angle in radians between the positive x-axis of a plane and the point specified by the coordinates (`exprX`, `exprY`).

## Syntax

```
atan2(exprY, exprX)
```

## Arguments

* `exprY`: An expression that evaluates to a numeric.
* `exprX`: An expression that evaluates to a numeric.

## Returns

A `DOUBLE`.

## Examples

```sql
> SELECT atan2(0, 0);
 0.0
```

## Related functions

* [`atan` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/atan.md)
* [`acos` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/acos.md)
* [`asin` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/asin.md)
* [`tan` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/tan.md)
