acos

acos(x)

Try it yourself:

See also:

acos(): Finding an Angle from Its Cosine

The acos() function returns the principal angle whose cosine is a supplied value. It is the inverse counterpart of cos(): where cosine turns an angle into a horizontal ratio, acos turns a valid ratio back into an angle. This is useful when a calculation gives a direction, similarity score, or side ratio and the angle is the value you need to interpret.

Range, domain, and examples

For real-number input, acos(x) requires x to be between −1 and 1, inclusive. Its result is in radians from 0 to π. For example, acos(1) is 0, acos(0) is π/2, and acos(-1) is π. Inputs outside that interval do not represent a real cosine; use complex-number calculations only when that is intended.

A common geometry pattern is to normalize two vectors and use acos of their dot() product to obtain the angle between them. Small floating-point rounding errors can push a theoretical value such as 1 slightly above 1, so clamping the input with min() and max() is often sensible before calling acos.

Working with inverse trigonometry

acos chooses one principal answer, so it cannot recover every angle that has the same cosine. If the quadrant matters, combine known signs with another measurement, or consider atan2(), which accepts two coordinates and retains directional information. For the corresponding inverse relationships, see asin() and atan().

Calcul.io displays angles in radians unless you explicitly convert them. Keep units consistent: pass radians to cos when checking an acos result, and convert only at the presentation boundary. This simple discipline avoids the most frequent trigonometric error.

Try Acos 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