# atan() Function & Examples

Use the atan() trigonometry function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## atan

#### atan(x)

Try it yourself:

```calculio
atan(0.5)
atan(tan(0.5))
```

[tan](https://calcul.io/function/tan/index.md)

[acos](https://calcul.io/function/acos/index.md)

[asin](https://calcul.io/function/asin/index.md)

---

## atan(): Recovering an Angle from a Tangent

**atan()** returns the principal angle whose tangent equals the input. It reverses [tan()](https://calcul.io/function/tan/index.md) on the interval from −π/2 to π/2. atan is common when a slope or a ratio of vertical to horizontal change must be turned into an angle.

## Examples and limits

atan(0) is 0; positive inputs return positive angles and negative inputs return negative angles. Every finite real number is valid, but the output approaches ±π/2 as magnitude increases and never reaches those values for finite input. This makes atan useful for smoothly mapping an unbounded quantity into a bounded angular range.

For a slope m, atan(m) gives the angle from the horizontal. However, a slope alone loses quadrant information and cannot represent a vertical line. If you have separate y and x components, use [atan2()](https://calcul.io/function/atan2/index.md) instead. It handles signs and zero components directly.

## Working with other inverse functions

Use [asin()](https://calcul.io/function/asin/index.md) for a sine ratio and [acos()](https://calcul.io/function/acos/index.md) for a cosine ratio. Verify a result with tan(atan(x)), allowing for normal floating-point precision. Keep values in radians when combining them with [sin()](https://calcul.io/function/sin/index.md) or [cos()](https://calcul.io/function/cos/index.md).

In numerical code, avoid calculating atan(y/x) when x may be zero or very small. atan2 is designed for that case and communicates the intended geometry more clearly.

[All functions](https://calcul.io/functions/index.md)
