Excel TAN Function: Find the Tangent of an Angle

The trigonometric function tangent, like the sine and the cosine, is based on a right-angled triangle (a triangle containing an angle equal to 90 degrees) as shown in the image above.

In math class, the tangent of an angle can be found using the ratio comparing the length of the side opposite the angle (o) to the length of the side adjacent to the angle (a).

The formula for this ratio can be written:

Tan Θ = o/a

where Θ is the size of the angle under consideration (45o in this example)

In Excel, finding the tangent of an angle can be simplified by using the TAN function for angles measured in radians.

 

01
of 05

Degrees vs. Radians

Find the Tangent of an Angle with Excel's TAN Function
Find the Tangent of an Angle with Excel's TAN Function. © Ted French

Using the TAN function to find the tangent of an angle may be easier than doing it manually, but, as mentioned, the angle needs to be in radians rather than degrees - which is a unit most of us are not familiar with.

Radians are related to the radius of the circle with one radian being approximately equal to 57 degrees.

To make it easier to work with TAN and Excel's other trig functions, use Excel's RADIANS function to convert the angle being measured from degrees to radians as shown in cell B2 in the image above where the angle of 45 degrees is converted into 0.785398163 radians.

Other options for converting from degrees to radians include:

  • nesting the RADIANS function inside the TAN function - as shown in row 3 in the example;
  • using Excel's PI function in the formula: angle(degrees) * PI()/180 as shown in row 4 in the example.
02
of 05

The TAN Function's Syntax and Arguments

A function's syntax refers to the layout of the function and includes the function's name, brackets, and arguments.

The syntax for the TAN function is:

= TAN ( Number )

Number - (required) the angle being calculated - measured in radians;
- the size of the angle in radians can be entered for this argument or, alternatively, the cell reference to the location of this data in the worksheet.

Example: Using Excel's TAN Function

This example cover the steps used to enter the TAN function into cell C2 in the image above to find the tangent of a 45 degree angle or 0.785398163 radians.

Options for entering the TAN function include manually typing in the entire function =TAN(B2), or using the function's dialog box - as outlined below.

03
of 05

Entering the TAN Function

  1. Click on cell C2 in the worksheet to make it the active cell;
  2. Click on the Formulas tab of the ribbon menu;
  3. Choose Math & Trig from the ribbon to open the function drop down list;
  4. Click on TAN in the list to bring up the function's dialog box;
  5. In the dialog box, click on the Number line;
  6. Click on cell B2 in the worksheet to enter that cell reference into the formula;
  7. Click OK to complete the formula and return to the worksheet;
  8. The answer 1 should appear in cell C2 - which is the tangent of a 45 degree angle;
  9. When you click on cell C2 the complete function = TAN( B2 ) appears in the formula bar above the worksheet.

 

04
of 05

#VALUE! Errors and Blank Cell Results

The TAN function displays the #VALUE! error if the reference used as the function's argument points to a cell containing text data - row five of the example where the cell reference used points to the text label: Angle (Radians);

If the cell points to an empty cell, the function returns a value of one - row six above. Excel's trig functions interpret blank cells as zero, and the tangent of zero radians is equal to one.

05
of 05

Trigonometric Uses in Excel

Trigonometry focuses on the relationships between the sides and the angles of a triangle, and while many of us do not need to use it on a daily basis, trigonometry has applications in a number of fields including architecture, physics, engineering, and surveying.

Architects, for example use trigonometry for calculations involving sun shading, structural load, and, roof slopes.