CitectVBA Programming Reference > CitectVBA Function Reference > Math/Trigonometry Functions > Atn


Calculates the trigonometric Arctangent value of a Tangent number.

The Atn function expects the argument (Num) to be a valid tangent value between the range of - Pi/2 to + Pi/2 (representing the ratio of the two sides of a right-angle triangle), and calculates the corresponding angle in radians.

Atn is the inverse trigonometric function of Tan (which takes an angle as its argument, and returns the ratio of two sides of a right-angle triangle). Do not confuse Atn with the Cotangent, which is the inverse of a Tangent (1/tangent).




An integer or expression representing a valid numeric value.

Return Value

Returns the Arctangent value of the angle (Num) provided in the argument.

Related Functions

Cos | Sin | Tan


Dim Msg, Pi' Declare variables.
Pi = 4 * Atn(1)' Calculate Pi