IMTAN function
IMTAN returns the tangent 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 tangent of the complex number 1+i, then keep only its real part, which gives 0.271752585319512.
A
B
C
D
1
0.271752585319512
2
3
Syntax
IMTAN(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.
| Formula | Excel shows | Case |
|---|---|---|
=IMTAN("3+4i") | -0.000187346204629478+0.999355987381473i | "3+4i" |
=IMTAN("3+4j") | -0.000187346204629478+0.999355987381473j | Suffix j |
=IMTAN(5) | -3.38051500624659 | Pure real number 5 |
=IMTAN("5") | -3.38051500624659 | Pure real text "5" |
=IMTAN("i") | 0.761594155955765i | Pure imaginary "i" |
=IMTAN("-2i") | -0.964027580075817i | "-2i" |
=IMTAN("3+4I") | #NUM! | Uppercase I |
=IMTAN("abc") | #NUM! | Invalid text |
Watch out for
- Result is text; wrap in IMREAL or IMAGINARY to get a number.
Where it works
- Excel
- IMTAN 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 .