# How to Use the IMCOT Function in Google Sheets

The IMCOT function in Google Sheets returns the cotangent or arctangent of a complex number.

The cotangent of a complex number is the inverse of a tangent (tan-2). If you are given the opposite side and adjacent side of an angle in a right triangle formatted as a complex number, you can find the measure of the angle using the `IMCOT` function.

To correctly input an `IMCOT` function, you must enter the correct format of a complex number, which is “a+bi” or “a+bj”. Here, a and b are real numbers, and i is the symbol for the imaginary number, such that i=√-1 or i2=−1

In some disciplines where the coefficient i can be confusing, the letter j can also be used to symbolize the imaginary number. The function returns “cot(a+bi)” or “cot(a+bj)”.

Here are some notes about to know when writing the complex number of the `IMCOT` function:

• You will get the #NUM! error value if it has an invalid format such as ‘i+2’, ‘4+i6’, and ‘j+i’.
• The coefficients i or j need to be in lower case for the formula to be valid.
• You will get the #VALUE! error value if it is a logical value.

To calculate the cotangent of the complex number, the formula goes: The coefficient t is the complex number.

Let’s take an example.

I’m trying to get the cotangent of 5+3i. The real part of my string equation is 5, while the imaginary part is 5. To calculate the cotangent value, the formula goes cot(“5+3i”)= -0.00268579840575853-0.995845318575854i.

Now, let’s learn how to write the `IMCOT` function in Google Sheets.

## The Anatomy of the IMCOT Function in Google Sheets

The syntax (the way we write) of the `IMCOT` function goes as follows:

`=IMCOT(inumber)`

Let’s dissect this thing and understand what each of these terms means:

• = the equal sign is just how we start any function in Google Sheets.
• IMCOT () is our `IMCOT` function.
• inumber is the complex value used to calculate the cotangent enclosed in parentheses with no spaces between characters such as ‘4+7i’.

Here are other accepted formats of the inumber:

• A simple numeric value like -4 where the imaginary coefficient is assumed as 0.
• A reference to a cell with a complex number or a simple value such as C4.
• A value returned from the COMPLEX function like COMPLEX(6,3).
• Fractional values in the real and imaginary parts like ‘45.67-56.4i’.

## Real Example of Using the IMCOT Function in Google Sheets

At this point, let’s examine some numbers I’m presenting to see how an `IMCOT` function will look like in Google Sheets with the different valid inumber formats. In the table, the `IMCOT` function calculates with the inumbers on column A. As you can see, the imaginary part can use i or j interchangeably. Also, the valid formats of a complex number mentioned in the previous section of this guide are exemplified.

Now, I’ll show you how you can use the `IMCOT` function in Google Sheets with comprehensive steps.

## How to Use the IMCOT Function in Google Sheets

1. First, select the cell where you wish to put the result of your `IMCOT` function. In this case, that’s A3. 2. Next, input the equal sign ‘=’ to begin the function. Then, follow it with the function’s name, which is ‘IMCOT’. Either uppercase or lowercase works. 3. At this point, either select the IMCOT option in the pop-out, hit Tab on your keyboard, or enter an open parenthesis ‘(’ to enable the function. 4. Now, proceed to enter your inumber. Remember to add quotation marks at the beginning and end of any string number with an imaginary part. In this case, we type down ‘27-1i‘. 5. Finally, simply input a close parenthesis ‘)’ and hit Enter on your keyboard. Awesome! You’ve just learned how to use the `IMCOT` function in Google Sheets.

Is there a Google Sheets function that returns the tangent of a complex number?

Yes, it’s called the IMTAN function. It’s formatted as follows: `=IMTAN(number)`, where inumber is a complex number you want the tangent of. For example, `=IMTAN(8i)`.

What is a `COMPLEX` function?

A `COMPLEX` function can serve as an inumber in an `IMCOT` function as well as other functions like the IMABS function since it returns a complex number. It’s formatted as follows: `=COMPLEX(real_part,imaginary_part)`. For example, `=COMPLEX(1,2)`.

That’s it! You’ve reached the end of this guide on how to use the `IMCOT` function in Google Sheets. If something is not clear, let us know in the comment section. Also, check out the other Google Sheets functions available to learn how to get the most from this powerful spreadsheet program. Our goal this year is to create lots of rich, bite-sized tutorials for Google Sheets users like you. If you liked this one, you'll love what we are working on! Readers receive ✨ early access ✨ to new content.

##### You May Also Like ## How to Use CUMPRINC Function in Google Sheets

The CUMPRINC function in Google Sheets is used to calculate the cumulative principal over a range of constant-amount… ## How to Use COLUMN Function in Google Sheets

The COLUMN function in Google Sheets is useful to get the column number of a specific cell. As… ## How to Use YEARFRAC Function in Google Sheets

The YEARFRAC function in Google Sheets is useful if you want to get a decimal value that represents… ## How to Use Z.TEST Function in Google Sheets

The Z.TEST function in Google Sheets is useful when you want to compare the mean of a sample… 