The ACOS function returns the arccosine of a number.
The result is an angle in radians in the range from 0 to π.
This function is often used in trigonometric calculations.
Syntax
ACOS(value)
Argument |
Description |
Permitted values |
|---|---|---|
value |
The value for which the arccosine needs to be calculated |
Number in the range from -1 to 1 inclusive. Can be specified as a number, formula, function, or cell reference |
Examples of use
Calculation for a positive value
=ACOS(0.5)
This formula will return the value π/3 (or 60 degrees), since the cosine of 60 degrees is 0.5.
Use with a negative value
=ACOS(-1)
This formula will return the value π (or 180 degrees), since the cosine of 180 degrees is −1.
Check for out-of-range values
If you try to use a value outside the range [−1, 1], for example:
=ACOS(2)
The error #NUM! will occur because the arccosine is undefined for values greater than 1 or less than −1.
Notes
–The result of the ACOS function is returned in radians. If you need to obtain the result in degrees, you can use the DEGREES function, for example, =DEGREES(ACOS(0.5)).
–Make sure that the value passed to the function is within the acceptable range, otherwise the function will return the #NUM! error.