IMCOT Function
Returns the cotangent of a complex number.
Category
Engineering
Available in
Excel 2013+, Microsoft 365
Returns
Complex number text
Overview
IMCOT returns cot(z) = cos(z) ÷ sin(z) — the reciprocal of IMTAN.
Angles are in radians. For a real number the answer matches the ordinary function (for example IMSIN("1") equals SIN(1)), but these versions also accept complex inputs.
The result is text, shown to 15 significant digits. Wrap it in IMREAL or IMAGINARY to get a number you can format or round.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| inumber | Yes | A complex number as text, like "3+4i" — or a plain number. |
Examples
Example 1 — Worked examples
Each row applies the function to the value in column A.
| A | B | |
|---|---|---|
| 1 | Complex | cot(z) |
| 2 | 1 | 0.642092615934331 |
| 3 | i | -1.31303528549933i |
| 4 | 2 | -0.457657554360286 |
Common mistakes
- #NUM! The text isn't a valid complex number — for example a space ("3 + 4i"), a capital I, or a letter other than i or j.
- #NUM! for zero. cot(0) is undefined.
Notes

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.