# cos() Function & Examples

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

## cos

#### cos(x)

Try it yourself:

```calculio
cos(2)
cos(pi / 4) ^ 2
cos(180 deg)
cos(60 deg)
sin(0.2)^2 + cos(0.2)^2
```

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

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

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

---

## Calculate cosine values with cos

**cos(x)** returns the cosine of an angle `x`, interpreted in radians. On the unit circle, cosine is the horizontal coordinate, making it a natural tool for periodic motion, rotations, projections, and triangles.

## Radian input and common values

`cos(0)` is 1, `cos(pi / 2)` is 0, and `cos(pi)` is -1. Convert degrees to radians before calling cosine: 60 degrees is `pi / 3`. The matching [sin](https://calcul.io/function/sin/index.md) function gives the vertical coordinate, while [tan](https://calcul.io/function/tan/index.md) is their ratio where cosine is not zero.

## Useful applications

For a point moving around a circle of radius r, the horizontal position can be written `r * cos(t)`. In vector work, cosine relates to angle and projection; combine [dot](https://calcul.io/function/dot/index.md), [norm](https://calcul.io/function/norm/index.md), and inverse [acos](https://calcul.io/function/acos/index.md) when calculating an angle between vectors.

## Domain and precision

Cosine accepts real and complex inputs, and for every real angle its result is between -1 and 1. Values very close to special angles may display tiny rounding residues rather than exact zero; use [round](https://calcul.io/function/round/index.md) for presentation, not to change the underlying model. Do not confuse `cos` with [cosh](https://calcul.io/function/cosh/index.md), the hyperbolic cosine, which has a different definition and behavior.

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