Tan Function

Named Arguments



Tan (number)


Use: Required

Data Type: Double

An angle in radians.

Return Value

A Double containing the tangent of an angle.


Returns the ratio of two sides of a right angle triangle.

Rules at a Glance

The returned ratio is derived by dividing the length of the side opposite the angle by the length of the side adjacent to the angle.

Programming Tips and Gotchas

  • You can convert radians to degrees using the following formula:

    radians = degrees * (pi/180)
  • You can convert degrees to radians using the following formula:

    degrees = radians * (180/pi)

Get VB & VBA in a Nutshell: The Language now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.