cos

cos(x)

Try it yourself:

See also:

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 function gives the vertical coordinate, while tan 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, norm, and inverse acos 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 for presentation, not to change the underlying model. Do not confuse cos with cosh, the hyperbolic cosine, which has a different definition and behavior.

Try Cos in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions