IMSQRT in Excel: Find the Principal Complex Square Root
Calculate principal complex square roots in Excel, verify both components by squaring and understand the branch convention and the second algebraic root.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: IMSQRT(inumber) returns the principal square root of a complex value. The reference uses a principal argument greater than −pi and at most pi, then halves that angle to choose one of the two algebraic roots.
Availability and version history
- Introduced: the first introduction version is not established by the reviewed official history.
- 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 IMSQRT reference. Documentation and independent models; no native Excel execution or wider platform certification.
Syntax and the documented branch
=IMSQRT(inumber)
Inumber is required. Microsoft describes the output in complex i or j text notation and gives a polar-form equation: take the square root of the magnitude, then use cosine and sine of half the principal angle.
Its reference images specify magnitude as the square root of x²+y² and the angle interval (−pi,pi]. Another image abbreviates angle calculation as inverse tangent of y/x; that abbreviation needs quadrant handling. A plain quotient-based ATAN is not a complete angle algorithm for every complex input.
The examples below use the principal branch and independently check it by squaring. The dedicated page does not give a complete malformed-input, zero or error-code matrix.
Example 1: roots with exact integer components
Enter only the first column as text in A2:A5. Put =IMSQRT(A2) in B2 and fill down.
| A, complex input | B, principal root |
|---|---|
| 3+4i | 2+i |
| 3-4i | 2-i |
| -3+4i | 1+2i |
| -3-4i | 1-2i |
For 2+i, squaring gives real coefficient 2²−1²=3 and imaginary coefficient 2×2×1=4. For 1+2i, the real coefficient is 1−4=−3 and the imaginary coefficient is four.
All four chosen roots have positive real coefficients, consistent with halving a principal angle from the documented interval. The sign of the imaginary component follows the sign of the original imaginary component in these non-axis examples.
Example 2: verify the entire result by squaring
In C2 use =IMPRODUCT(B2,B2) and fill through C5. Expected reconstructed quantities are 3+4i, 3−4i, −3+4i and −3−4i.
For a component-level check, extract a=IMREAL(B2) and b=IMAGINARY(B2), then calculate a²−b² and 2ab. These should reproduce the original real and imaginary coefficients for the exact fixture.
IMPRODUCT, IMREAL and IMAGINARY expose the two parts of this check. Comparing only magnitudes would miss a sign or quadrant error.
Advanced example: understand the second root
If w squared equals z, then −w squared also equals z. For 3+4i, the two roots are 2+i and −2−i. IMSQRT chooses the principal one rather than returning an array containing both.
Construct the other root with =IMPRODUCT(IMSQRT("3+4i"),-1), which has expected quantity −2−i. Squaring it again gives 3+4i.
A complete algebraic solution may need both roots even though a spreadsheet function returns only one branch. State whether the application needs a principal value or the full solution set before discarding the second root.
Advanced example: the negative real axis
For input −9+0i, the principal argument is pi under the reference convention. Half the angle is pi/2, so the principal square root has real coefficient zero and imaginary coefficient three: 3i.
=IMSQRT("-9+0i") is therefore an independently modeled principal-branch control. The other algebraic root is −3i. Native signed-zero parsing and branch-cut behavior for alternate encodings were not executed here.
This is different from applying the ordinary real SQRT function to a negative real number. The complex representation and the principal branch are essential parts of the problem.
Advanced example: a noninteger root and a polar check
For 1+i, the magnitude is the square root of two and the principal angle is pi/4. The root therefore has magnitude 2^(1/4) and angle pi/8.
The independently expected coefficients are approximately 1.098684113468 and 0.455089860562. Their squared difference is one, and twice their product is one before display rounding. Microsoft publishes a matching 1+i example with more displayed digits.
Use the actual formula result when squaring back, rather than retyping rounded coefficients. The root’s magnitude is approximately 1.189207115, which squared returns the original magnitude approximately 1.414213562.
A root of a square need not recover the original sign
Let z=−2−i. Its square is 3+4i, whose principal root is 2+i. Thus taking a principal square root after squaring can return −z rather than z.
This is a branch-selection issue, not an arithmetic error. The original sign information was not uniquely recoverable from the square alone. A workflow requiring that original branch needs additional context outside IMSQRT.
Source and numeric limits
The reference recommends COMPLEX for constructing complex inputs from numeric coefficients. Keep those coefficients and the chosen branch convention visible in reproducible examples.
Malformed strings, unspecified zero behavior, mixed suffix errors, overflow and underflow remain unverified. All roots and square-back checks here were independently calculated from the documented branch model; 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.