Number.Acos
NumberReturns the arccosine (inverse cosine) of a number, in radians.
Syntax
Number.Acos(number as nullable number) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
number | number | Yes | A value in the range [-1, 1] whose arccosine is computed. |
Return Value
number — The arccosine of the number in radians, in the range [0, π].
Remarks
Number.Acos is the inverse of Number.Cos. Given a cosine value in the range [-1, 1], it returns the corresponding angle in radians in the range [0, π] (0 to 180 degrees). All trigonometric functions in Power Query M work in radians, not degrees.
Input values outside [-1, 1] return NaN (Not a Number) rather than raising an error. Always validate inputs before calling Number.Acos on arbitrary data to avoid silently propagating NaN through downstream calculations. Use Number.IsNaN to detect NaN results.
To convert the radian result to degrees, multiply by 180 / Number.PI. To convert a degree angle to a cosine input, use Number.Cos(degrees * Number.PI / 180). A common use case is computing angles between vectors or calculating the angular distance between geographic coordinates using the haversine formula.