This guide will explain how to use the IMTAN function in Google Sheets.
Table of Contents
Complex numbers is a type of number system that extends the one-dimensional number line into two dimensions. These numbers exist in what is known as a complex plane where the x-axis is formed with real numbers and the y-axis is formed by imaginary numbers.
This type of number system is useful in various fields, including engineering and physics. Since working with complex numbers involves using a 2-D number line, various trigonometric functions can be applied to a given complex number.
To find the tangent of a complex number, we can use the IMTAN function in Google Sheets .
In this guide, we will provide a step-by-step tutorial on how to use the IMTAN function to calculate the tangent of a given complex number.
The Anatomy of the IMTAN Function
The syntax of the IMTAN function is as follows:
=IMTAN(number)
Let’s look at each argument to understand how to use the IMTAN function.
- number refers to the number for which you want to find the tangent.
- The number argument can either be the result of the
COMPLEXfunction, a real number, or a string that follows the format “x+yi” where x and y are valid numbers. - the
IMTANfunction will return an error if the given number is not a valid complex number. - the function may also return an error if the tangent function is undefined for the given argument.
The Anatomy of the COMPLEX Function
The syntax of the COMPLEX function is as follows:
=COMPLEX(real_part, imaginary_part, [suffix])
Let’s look at each argument to understand how to use the COMPLEX function.
- real_part refers to the real coefficient of the complex number.
- imaginary_part refers to the imaginary coefficient of the complex number
- suffix is an optional argument that determines the suffix to use for the imaginary coefficient. By default, the value for this argument is “i”.
A Real Example of Using the IMTAN Function
Let’s explore a few simple examples where we can use the IMTAN function in Google Sheets.
Using a cell reference
We can use the IMTAN function to find the tangent of a complex number given a cell reference.
Given a complex number in cell A2, we can output the tangent using the following formula:
=IMTAN(A2)

In the table above, we determined that the tangent of the complex number 3+2i is -0.00988437503832249+0.965385879022133i.
Using the COMPLEX Function
We can also use the output of the COMPLEX function as input for the IMTAN function. This is useful if you’re given the value for a and b for a complex number a+bi.

In the example above, we have a table with the coefficients of our complex numbers’ real and imaginary parts.
We can use the following formula to get the tangent of each complex number:
=IMTAN(COMPLEX(A2,B2))

This formula works because the COMPLEX formula uses the coefficients in columns A and B to create a valid complex number.

In the example above, we can see the result of the COMPLEX function. Cell C2 uses the formula COMPLEX(A2,B2) to convert the coefficients 3 and 2 into the valid complex number 3+2i.
Click on the link below to create your own copy of our examples.
Head to the next section to read our step-by-step guide on how to use the IMTAN function in Google Sheets.
How to Use the IMTAN Function in Google Sheets
- Select the cell where you want to output the result of the
IMTANfunction.
- Type the
IMTANfunction and enter a valid complex number as the sole argument. You may write down a complex number in the form “a+bi” or a cell reference of one.
In this example, we’ll use the formula IMTAN(A2) to find the tangent of the complex number 3+2i. - Hit the Enter key to evaluate the
IMTANfunction.
- Use the AutoFill feature to find the tangents of the remaining complex numbers.

- We can use the
COMPLEXfunction to generate a valid complex number when given the coefficients of the complex number.
In this example, we’ll use the formula IMTAN(COMPLEX(A2,B2)). TheCOMPLEXfunction converts the coefficients 3 and 2 into 3+2i before using it as an argument for theIMTANfunction.
These steps are all you need to know to start using the IMTAN function in Google Sheets.
FAQs
- Why is my IMTAN function not working?
TheIMTANfunction may not work for a variety of reasons. Ensure that the complex number you’re using as an argument is in the proper format. If your complex number is missing the imaginary unit “i”, your function may result in an error. - How do I find the other trigonometric functions given a complex number?
BesidesIMTAN, Google Sheets includes several other functions to help you perform trigonometric functions on complex numbers. You can use theIMCOSfunction to find the cosine of a complex number and theIMSINfunction to find the sine of a complex number.
If you wish to find the hyperbolic tangent instead of the tangent, you can use theIMTANHfunction instead.
To learn more about using Google Sheets to perform trigonometric functions on complex numbers, you can read our post on how to find the inverse hyperbolic tangent of a complex number.
That’s all for this guide! Be sure to check out our library of spreadsheet resources, tips, and tricks!