ACOS
Return the angle, in radians, whose cosine is the given number. Input must be between -1 and 1.
Syntax
ACOS(number) | Argument | Required | Description |
|---|---|---|
number | Required | A cosine value between -1 and 1. |
Examples
Every example below was executed against VisiGrid engine 0.54.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=ACOS(-1) | 3.14 | π radians, half a turn. |
=DEGREES(ACOS(0.5)) | 60.00 | |
=ACOS(2) | #NUM! | No angle has a cosine greater than 1. |
Rounding can push a valid input out of range
ACOS is the usual last step when computing an angle from a dot product, or a
distance on a sphere. Those calculations should produce a value between -1 and 1,
but floating-point rounding can leave it a hair outside:
=ACOS(1.0000000000000002) → #NUM!
The answer should have been 0. Clamping the argument with
MIN and MAX fixes it without changing
any value that was already in range:
=ACOS(MIN(1,1.0000000000000002)) → 0
Range of the result
ACOS returns between 0 and π radians — 0 to 180 degrees. It cannot tell a
clockwise angle from an anticlockwise one. When direction matters, use
ATAN2.
Excel compatibility
Matches Excel. Returns radians between 0 and π.