Contact

IMCOT in Excel: Verify Complex Cotangent with Complete Quotients

Engineering Intermediate Microsoft Excel

Calculate complex cotangent in Excel, inspect signed components and verify reciprocal, periodicity and cosecant-square controls.

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

Quick answer: IMCOT(inumber) returns complex cotangent. For =IMCOT("1+0.5i"), independently expected coefficients are approximately 0.464110186 and −0.599828867. Cotangent divides complete cosine by complete sine; it does not divide corresponding coordinates separately.

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 2021, Excel 2021 for Mac, Excel 2019, Excel 2019 for Mac, Excel 2016.
  • Checked: October 14, 2026; official IMCOT reference. Documentation and independent models; no native Excel execution or wider platform certification.

Syntax and input construction

=IMCOT(inumber)

The required argument uses x+yi or x+yj complex text. If the coefficients already occupy numeric cells, build the argument with COMPLEX instead of manually joining signs and the imaginary unit.

This guide constructs real-axis controls with an explicit zero imaginary coefficient too. The dedicated reference does not establish a complete plain-number, blank or text-number coercion matrix, so those cases are not inferred from another spreadsheet program.

Cotangent is reciprocal trigonometry, not an inverse tangent that recovers an angle. The real coordinate uses radians in the mathematical model.

Example 1: keep both coefficients visible

Enter the two numeric columns below in A2:B5. In C2 enter =COMPLEX(A2,B2) and in D2 enter =IMCOT(C2). Fill down. The final two table columns are expected outputs, not additional input data.

A, real input B, imaginary input Expected real output Expected imaginary output
1 0.5 0.464110186 -0.599828867
1 2 0.032797756 -0.984329226
-1 0.5 -0.464110186 -0.599828867
0 0.5 0 -2.163953414

Use =IMREAL(D2) in E2 and =IMAGINARY(D2) in F2, filling down. The printed expectations are rounded to nine decimals; retain the complete calculated results for later checks.

The fourth row is purely imaginary, yet the output has a negative imaginary coefficient. Applying ordinary COT to B2 would calculate a different quantity and miss this directional distinction.

Example 2: compare cosine divided by sine

In G2 enter:

=IMDIV(IMCOS(C2),IMSIN(C2))

Fill down. Each expected quantity matches D for these nonzero-sine inputs. IMDIV combines the numerator and denominator through complex division, including cross terms and the denominator magnitude.

Compare extracted real and imaginary coefficients, rather than display strings. For example, =ABS(IMREAL(D2)-IMREAL(G2))<1E-9 and the corresponding IMAGINARY comparison should both be TRUE in the independent model. This is a declared tolerance for this moderate dataset, not a universal native accuracy guarantee.

Advanced example: reconstruct cotangent from real functions

For input a+bi, an independent double-angle model uses denominator COSH(2b)−COS(2a). Its real numerator is SIN(2a); its imaginary numerator is negative SINH(2b).

For the first row, calculate:

=SIN(2)/(COSH(1)-COS(2))
=-SINH(1)/(COSH(1)-COS(2))

Expected results are 0.464110186 and −0.599828867. This algebraic check is independently derived; the dedicated Microsoft page names cotangent and gives a control, but does not print this expanded equation.

The denominator and the imaginary minus sign both matter. Substituting the superficially similar tangent expression changes the result.

Advanced example: retain the complete square identity

Cotangent and cosecant satisfy a square identity where their denominators are nonzero. For C2 compare:

=IMSUM(IMPRODUCT(IMCOT(C2),IMCOT(C2)),COMPLEX(1,0))
=IMPRODUCT(IMCSC(C2),IMCSC(C2))

Both independent quantities have coefficients approximately 0.855603596 and −0.556773374. The cotangent square before adding one is approximately −0.144396404−0.556773374i.

IMCSC supplies complex cosecant. A magnitude square would discard the cross term and cannot replace either complete complex square here.

A simpler reciprocal check multiplies IMCOT(C2) by IMTAN(C2). Its mathematical target is one with zero imaginary coefficient, using this nonsingular fixture.

Signs, periodicity and mathematical poles

Negating both coordinates negates cotangent. Conjugating the input instead conjugates the result. These are different transformations; the third primary row negates only the real coordinate.

Adding PI() to the real coefficient should preserve the mathematical cotangent. Compare C2 with =COMPLEX(A2+PI(),B2) using component tolerances, because PI() is a numerical approximation.

On the imaginary axis, inputs i and 2i have expected imaginary coefficients approximately −1.313035285 and −1.037314721, with real coefficient zero. These equal negative one divided by TANH(1) and TANH(2).

Real integer multiples of pi are mathematical poles. The dedicated page does not specify native zero-input or approximate-PI pole behavior, so this guide assigns no error code to those boundary formulas.

Documented errors and source control

Microsoft specifies #NUM! for an argument outside the supported complex-text format and #VALUE! for a logical argument. It does not provide a full mixed-suffix or numerical-overflow matrix.

Its documented =IMCOT("4+3i") control has coefficients approximately 0.00490118239430447 and −0.999266927805902. Independent complete division corroborates that result. Keep malformed-input errors separate from untested mathematical singularities.

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.