Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Tan Function


In Excel, the Tan function returns the tangent of an angle.

The syntax for the Tan function is:

Tan( number )

number is a numeric value.


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For example:

Let's take a look at an example:

Based on the Excel spreadsheet above:

=Tan(A1) would return -0.142546543
=Tan(A2) would return -1.885641878
=Tan(A3) would return 1.885641878
=Tan(2) would return -2.185039863

VBA Code

The Tan function can also be used in VBA code. For example:

Dim LNumber As Double

LNumber = Tan(2)

In this example, the variable called LNumber would now contain the value of -2.185039863.