Number.Atan
NumberReturns the arctangent (inverse tangent) of a number, in radians.
Syntax
Number.Atan(number as nullable number) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
number | number | Yes | The number whose arctangent is computed. |
Return Value
number — The arctangent in radians, in the range (-π/2, π/2).
Remarks
Number.Atan is the inverse of Number.Tan. Given any real number, it returns the angle in radians whose tangent equals that value. The result is always in the open interval (-π/2, π/2) — that is, between -90 and 90 degrees exclusive. All trigonometric functions in Power Query M work in radians, not degrees.
Unlike Number.Acos and Number.Asin, which require inputs in [-1, 1], Number.Atan accepts any real number and never returns NaN for real inputs. As the input approaches ±∞, the result approaches ±π/2 asymptotically.
The key limitation of Number.Atan is that it loses quadrant information: given only a ratio y/x, you cannot determine whether the original point was in the first quadrant (x>0, y>0) or the third quadrant (x<0, y<0). For computing angles of points in a 2D plane where quadrant matters — such as compass bearings — use Number.Atan2(y, x) instead, which takes the signs of x and y separately.
To convert the radian result to degrees, multiply by 180 / Number.PI.
Examples
Example 1: Arctangent of 1 is 45 degrees (π/4 radians)
Number.Atan(1) * 180 / Number.PIResult | |
|---|---|
| 1 | 45 |
Example 3: Compute slope angle from a rise/run ratio
Number.Atan(3 / 4) * 180 / Number.PIResult | |
|---|---|
| 1 | 36.87 |