What is TAN Function in Google Sheets?
The TAN function in Google Sheets returns the tangent of an angle. It is one of the important trigonometric functions. The input to the function is in radians, not degrees. Hence, if you have the value in degrees, you should first convert it to radians. The TAN function returns the tangent specified in radians. Mathematically, the tangent is the opposite side length divided by the adjacent side length in a right-angled triangle. This function is commonly used in many areas, such as construction, determining the elevation, etc.
For example, let’s say you have an angle of 45 degrees. First, we must convert 45 degrees to radians to calculate the angle’s tangent. For this, we use the RADIANS function. Enter the formula shown below.
=TAN(RADIANS(45))

It will return the TAN of 45 degrees, which is approximately 1.
Key Takeaways
- The TAN Google Sheets function returns the tangent of an angle, given in radians. It is a trigonometric function.
- The angle is given in radians and not degrees. If you use degrees, you must first convert them to radians.
- The syntax of the TAN Google Sheets function is as follows:
- =TAN(angle)
- where the angle is the angle in radians.
- The TAN function results in extremely large or small values if the angle is 90° or multiples of 90°.
- The TAN function can be used in physics and engineering for applications involving distance and angle calculations for right-angled triangles.
Syntax
We can apply the TAN formula with the syntax shown below.
It has one mandatory parameter:
=TAN(angle)
Here, the angle is given in radians.
How to Use TAN Function in Google Sheets?
We can enter the TAN function in Google Sheets in two ways.
- Enter TAN manually
- Access from the Google Menu bar
Entering TAN manually
Here’s a step-by-step guide on how to use the TAN Google Sheets function manually.
The trigonometric ratio of tangent is helpful as it helps us gauge information on the sides and angles of a right triangle that cannot be obtained otherwise. Here is where the TAN function is very useful.
Step 1: Go to Google Sheets and open a new spreadsheet. We enter an angle in radians.

Step 2: Now, we use the TAN function to find the tangent of the angle in radians. First, select the cell where we will display the result. Then, type “=TAN(.” Type the reference to the cell containing the angle in radians. Close the parentheses and press Enter.
=TAN(A1)

Step 3: It will calculate the tangent of the angle we entered in radians.

Access from the Google Menu Bar
Choose any cell where you wish to enter the TAN function.
Go to the “Insert” tab. Under Function, click on the “Math” option. Here, choose the TAN function by scrolling down and using it in any formula.

Examples
As seen earlier, the tangent is found when we divide the opposite side’s length by the adjacent one’s length. Then, we have the tangent in a right triangle. This calculation has many practical applications, such as in construction. For example, to construct two pillars at a fixed distance apart, we can use the tangent to find the distance between the two pillars. Let us look at some interesting examples of how to use the TAN Google Sheets function.
Example #1
Let us use a simple example of the TAN function in Google Sheets to calculate the slope of a hill. We can observe that the hill has a 30-degree angle of incline.
Step 1: Enter the details in a sheet as shown below.

Step 2: You can use the TAN function to calculate the slope of the hill. For a 30-degree angle of incline, you can use the following formula
=TAN(RADIANS(B1)). Press Enter.

Step 3: We get the result that the slope is approximately 0.577.

Example #2 – Using TAN with IF function
The TAN function is used in conjunction with the IF function in Google Sheets to perform certain conditional calculations based on specific criteria. Here’s how you can use the two functions together with an example. We are given a list of angles. Here, we wish to calculate the tangent of an angle only if the angle is greater than 30 degrees. If the angle is less than 30 degrees, we return the value “Invalid Input.”
Step 1: Enter the angles in a Google sheet in Column A in a cell.

Step 2: In cell B1, we use the IF function with TAN. It allows us to check if the angle is greater than 30 before we use the TAN function on it.
Enter the following formula:
=IF(A2>=30, TAN(RADIANS(A2)), “Invalid Input”)
Explanation:
IF(A2>30, …): Here, we use the IF function to check if the angle is greater than 30 degrees.
TAN(RADIANS(A2)): If the angle is greater than 30, it calculates the tangent of the angle. The RADIANS function first converts the angles to radians to give as an input to the TAN function.
“Invalid Input”: If the angle is less than 30 degrees, it returns “Invalid Input.”

Step 3: Press Enter. You will get the input accordingly. As the angle is equal to 30 degrees, you get its TAN value.

Step 4: Drag the function to get the results for the other values.

If A1 contains a value like 30, B1 will display the tangent of 30 degrees; otherwise, it will display “Invalid Input.” For angles like 90 or multiples of 90 degrees, the value is too large, as seen above.
Example #3 – Using TAN with SUM function
We can use the TAN Google Sheets function in combination with the SUM function. In this example, we have a list of angles and must find the total of their tangents.
Step 1: Enter the angles as shown below.

Step 2: Enter the following formula in cell C2.
=SUM(TAN(RADIANS(A2)), TAN(RADIANS(B2)))
This formula calculates the tangent for each angle given in the two columns and then sums them up. This combination is very useful when summing up data to analyze trends or patterns.

Step 3: Press Enter and observe the result.

Step 4: Drag the function for all the other values and check the result.

Important Things to Note
- The tangent function is said to be periodic with a period of 180°. It means that for every 180°, the values of the tangent repeat.
- The TAN function also works with negative angles. An interesting point is that the tangent of a negative angle is the negative value of the tangent of the same positive angle.
- For example: TAN(-45°) = -1 and TAN(45°) = 1
- The TAN function is often used in physics, engineering, and geometrical calculations, especially in slope calculations.
Frequently Asked Questions (FAQs)
Here are some of the common mistakes made when using the TAN function for calculations.
1. The TAN function uses radians as its parameter. If we supply an angle in degrees, we must first convert it to radians using the RADIANS function.
2. If the input is an angle that is a multiple of 90 degrees, the TAN function gives an error because the tangent of 90 degrees or its multiples is undefined .. If you Google Sheets may display an error in this case
The input to the TAN function is not in degrees; rather it is in radians. However, we can use the RADIANS function to convert it to radians.
Here’s how you can convert an angle from degrees to radians:
=RADIANS(degrees). For example, to convert an angle of 45 degrees to radians, use the formula:
=RADIANS(45)
For very small angles nearing zero, the result of the TAN Google Sheets function is approximately equal to the angle itself (in radians). For example, TAN(0.005) radians, the result is approximately 0.005.
The tangent function gives very small or large values for angle which are 90° or multiples of it. Here, the tangent of the angle tends toward infinity, which can lead to errors.
If you know the angle of elevation and the distance from the object, you can use the TAN function to calculate the height of the object. For example, if you measure a 30-degree angle of elevation to the top of a tree that is 50 feet away, you can use the formula =TAN(RADIANS(30))*50 to find that the tree is approximately 28.87 feet tall.
Download Template
This article must help understand TAN Function in Google Sheets with its formulas and examples. You can download the template here to use it instantly.
Recommended Articles
Guide to What Is TAN in Google Sheets. We learn syntax & how to use TAN function in google sheets with examples and a working template. You can learn more from the following articles.
Leave a Reply