# tan() Function & Examples

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

## tan

#### tan(x)

Try it yourself:

```calculio
tan(0.5)
sin(0.5) / cos(0.5)
tan(pi / 4)
tan(45 deg)
```

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

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

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

---

## tan(): tangent of an angle

**tan(x)** returns the tangent of angle x, normally measured in radians. In a right triangle it is opposite side divided by adjacent side.

## Examples and asymptotes

`tan(0)` is 0. Tangent becomes undefined at odd multiples of π/2, where cosine is zero, and values grow rapidly near those angles.

## Related trigonometry

Use [sin()](https://calcul.io/function/sin/index.md) and [cos()](https://calcul.io/function/cos/index.md) for the component functions, [atan()](https://calcul.io/function/atan/index.md) for the inverse, and [pi](https://calcul.io/function/pi/index.md) for exact angle forms. [atan2()](https://calcul.io/function/atan2/index.md) finds an angle from coordinates.

## Caveat

Convert degree inputs before calling tan, and avoid evaluating extremely close to an asymptote without a numerical plan.

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