Practice free

IMCOT function

IMCOT returns the cotangent of a complex number as text in complex number form. To get a plain number, wrap the result in IMREAL or IMAGINARY.

Example

Read it as a sentence: find the cotangent of the complex number 1+i, then keep only its real part, which gives 0.217621561854403.

Practice this in the app

Syntax

IMCOT(inumber)

inumber (required)
A complex number as text, like "3+4i".

Returns: The result as a complex number in text form.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=IMCOT("3+4i") -0.000187587737983659-1.00064439247156i "3+4i"
=IMCOT("3+4j") -0.000187587737983659-1.00064439247156j Suffix j
=IMCOT(5) -0.295812915532746 Pure real number 5
=IMCOT("5") -0.295812915532746 Pure real text "5"
=IMCOT("i") -1.31303528549933i Pure imaginary "i"
=IMCOT("-2i") 1.03731472072755i "-2i"
=IMCOT(0) #NUM! Zero
=IMCOT("3+4I") #NUM! Uppercase I

Watch out for

  • Result is text; wrap in IMREAL or IMAGINARY to get a number.

Where it works

Excel
IMCOT arrived in Excel 2013. Older versions do not have it.
Google Sheets
Same name, same behaviour for everyday use.

Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .