Facebook Page Twitter Page LinkedIn Page
× Python Tutorial Python Advanced Python Resources Python Libraries


The Python math.atan() function returns arc tangent of a value. The return value will be in the range -𝜋/2 through 𝜋/2.

Note: atan() is the inverse of tan().

Syntax

math.atan(x)

Parameters

x Required. Specify the value.

Return Value

Returns the arc tangent of the value.

Example:

In the below example, atan() function is used to find out the arc tangent of a given value.

import math

print(math.atan(0.5))
print(math.atan(1))
print(math.atan(2))

The output of the above code will be:

0.4636476090008061
0.7853981633974483
1.1071487177940904

❮ Python Math Module