Contact

IMTAN in Excel: Check Complex Tangents with Sine and Cosine Ratios

Engineering Intermediate Microsoft Excel

Calculate complex tangent in Excel, verify independent component ratios and distinguish real poles, pure-imaginary values and documented input errors.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: IMTAN(inumber) returns the tangent of a complex value. For a nonzero complex cosine, the mathematical tangent equals complex sine divided by complex cosine, with both coefficients participating in the division.

Availability and version history

  • Introduced: the Microsoft function catalogue marks this identity as an Excel 2013 addition. An exact first build or preview date is not established.
  • Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Checked: October 14, 2026; official IMTAN reference. Documentation and independent models; no native Excel execution or wider platform certification.

Syntax and documented input errors

=IMTAN(inumber)

Inumber is required. Microsoft describes x+yi or x+yj text and recommends COMPLEX for separate numeric coefficients.

The dedicated reference documents #NUM! for a value outside the stated complex format and #VALUE! for a logical input. The logical case is explicitly identified; it should not be flattened into the broader invalid-format wording.

Those rules do not establish every accepted numeric-text shortcut, blank coercion or competing-error case. The fixtures below use explicit complex text, including a zero real or imaginary coefficient when needed.

Example 1: compare mixed and axis inputs

Enter the first column as text in A2:A5. In B2 use =IMTAN(A2) and fill down. Extract coefficients into C and D.

A, input text Expected real coefficient Expected imaginary coefficient
0.5+0.25i 0.504500703 0.312420693
1+i 0.271752585 1.083923327
1-i 0.271752585 −1.083923327
0+1i 0 0.761594156

The expected numbers are independent mathematical calculations, not native captures. Reversing the imaginary input sign conjugates the result in these models.

The fourth result is purely imaginary, with coefficient TANH(1). It is not ordinary TAN(1), which is approximately 1.557407725 for a real radian input.

This distinction is useful when reviewing imports: “1+0i” and “0+1i” describe different complex values even though both contain a one and a zero.

Example 2: verify the sine-over-cosine ratio

For each row, compare IMTAN with:

=IMDIV(IMSIN(A2),IMCOS(A2))

IMSIN and IMCOS provide complete complex numerator and denominator quantities. IMDIV performs complex division.

For z=1+i, the sine has coefficients approximately 1.298457581 and 0.634963915; the cosine has coefficients approximately 0.833730025 and −0.988897706. Their quotient has the components shown in the table.

Dividing only the real sine coefficient by the real cosine coefficient would give a different number. Both cross terms and the denominator’s squared magnitude are required.

Advanced example: a transparent component model

An independent complex-tangent identity uses denominator COS(2x)+COSH(2y). Its real numerator is SIN(2x), and its imaginary numerator is SINH(2y).

For x=y=1, calculate:

=SIN(2)/(COS(2)+COSH(2))
=SINH(2)/(COS(2)+COSH(2))

The expected coefficients are approximately 0.271752585 and 1.083923327. This supplies a second independent model, separate from dividing two complex function results.

The dedicated IMTAN page does not print this component identity; it is the mathematical derivation used to check the worked outputs. It is not a promise that manually evaluating the identity has the same native stability at every scale.

Advanced example: pure-imaginary inputs

For input iy, the model reduces to i×TANH(y). For y values 0.5, 1 and 2, independently expected imaginary coefficients are approximately 0.462117157, 0.761594156 and 0.964027580, with real coefficient zero.

Construct the inputs with =COMPLEX(0,y) using an actual cell reference in place of y. TANH on the numeric helper coefficient checks this special case.

These values approach one in magnitude as positive y increases, but the general mixed-input tangent need not obey that same bound. The 1+i fixture already has imaginary coefficient greater than one.

Advanced example: symmetry and periodicity

Negating both coefficients of 1+i gives −1−i. Its independently expected tangent is the negative of the original, with coefficients approximately −0.271752585 and −1.083923327.

Adding PI() to the real component leaves the mathematical tangent unchanged. A reproducible construction is =IMTAN(COMPLEX(1+PI(),1)), compared with IMTAN(“1+i”). Use a tolerance, rather than literal complex-string equality, because PI() and transcendental evaluations are approximate.

Poles and numerical caution

For a purely real input, tangent has mathematical poles at odd multiples of PI()/2, where cosine is zero. A floating-point representation of PI()/2 is not an exact symbolic pole, so this guide does not assign a universal native pole error or finite value to that formula.

Microsoft’s explicit 4+3i example has coefficients near 0.00490825806749606 and 1.00070953606723, consistent with the independent models. Native overflow, underflow and exact error precedence remain unverified. No native Excel execution was performed.

References and verification

Expected outputs are independently calculated examples or documented rules, not captured native Excel results. Formulas use English function names and comma argument separators. Locale, rendering and boundary restrictions are stated where relevant.