# ATAN2 Function

> Return the angle of a point from its x and y coordinates in radians with ATAN2 in TX Sheet Control: the range from -π to π, the #DIV/0! error and an example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > ATAN2 Function
- **199 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/atan2/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/atan2/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/atan2/llms-full.txt

---

Return the arctangent of the coordinates `x_num` and `y_num`, the angle between the x-axis and the line from the origin to the point. The angle is in radians, between -π and π: positive for a point above the x-axis, negative below it. When both coordinates are 0, ATAN2 returns `#DIV/0!`.

### Syntax

```text
ATAN2(x_num, y_num)
```

Category: Math. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=ATAN2(1,1)
```

The formula returns 0.7853981634 (π/4), the 45-degree angle of the point (1, 1).

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [ATAN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/atan/llms-full.txt)
- **Next:** [ATANH Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/atanh/llms-full.txt)
