Syntax math.tan(num) The tan() method calculates the tangent of a number.It returns a value representing the tangent of an angle. This example calculates the tanget of the entered number. Enter Number: The tangent is: