Contact

IMSQRT Function (LibreOffice Calc)

Engineering Intermediate LibreOffice Calc

Learn the IMSQRT function in LibreOffice Calc: Returns the square root of a complex number.

Verification status: Selected examples were executed in LibreOffice Calc 25.2.3.2. This does not establish that every formula and edge case was tested. How formula examples are checked

Quick answer: what IMSQRT does

IMSQRT returns the principal square root of a complex number. For example, 3+4i has a principal square root of 2+i, because (2+i)² = 3+4i. It also handles negative real inputs that ordinary SQRT cannot return as real numbers.

The result is a text representation of the complex number, and Calc omits an imaginary coefficient of 1 in display: the official legacy function listing spells the worked result 2+1i, while actual Calc 25.2.3.2 returns 2+i. These represent the same value.

Syntax and arguments

=IMSQRT(Complex_number)

Complex_number — Required. One complex-number expression, a reference to a cell containing it, a formula returning one, or a real numeric value. Complex numbers are represented as text such as "4-3i", "3+4j", or values created with COMPLEX.

IMSQRT has one argument, not an optional second parameter. The real and imaginary coefficients use the suffix i or j. Numeric real-only arguments are permitted, although the function returns text. The English-US examples use a period as the decimal separator and semicolons between function arguments (only the nested COMPLEX and other multiargument formulas need separators); other locales or customized Calc formula separators may differ. Use Calc’s formula editor if an imported formula produces a separator error. LibreOffice’s official Help describes the complex-input text representation and textual output for complex trigonometric functions; the legacy analysis-function page covers IMSQRT.

Reproducible worked example

Enter this small dataset:

On a narrow screen, scroll this table sideways to see every column.

Cell Entry Type
A3 3+4i Complex-number text
B3 3 Numeric real coefficient
C3 4 Numeric imaginary coefficient

In D3 enter:

=IMSQRT(A3)

Expected and observed in Calc 25.2.3.2: 2+i (as text). The equivalent literal formula is:

=IMSQRT("3+4i")

Expected and observed: 2+i. Use ordinary real numbers when possible:

=IMSQRT(4)

Expected and observed: 2 (as text). Unlike SQRT(-4), the complex version can handle the negative real number:

=IMSQRT(-4)

Expected and observed in native Calc: 2i. A zero complex input returns the text 0:

=IMSQRT("0+0i")

Advanced example: verify the result by squaring it

If your inputs arrive as numeric columns B3 and C3, generate the complex value with COMPLEX, avoiding fragile manual string concatenation:

=IMSQRT(COMPLEX(B3;C3))

Expected and observed: 2+i for B3=3 and C3=4.

You can also verify the root without performing text parsing by multiplying it by itself as a complex value:

=IMPRODUCT(IMSQRT("3+4i");IMSQRT("3+4i"))

Expected and observed: 3+4i. Extract just the real coefficient of the root when your downstream cell expects an ordinary number:

=IMREAL(IMSQRT("3+4i"))

Expected and observed: numerical 2. The principal square root convention chooses one branch; the other square root of 3+4i is -2-i.

Mistakes, errors and limits

  • Wrong function for a negative input: SQRT(-4) attempts a real result and errors; IMSQRT(-4) returned 2i as complex text in the native Calc test.
  • Err:502 from malformed text: =IMSQRT("not-a-number") and =IMSQRT("1+2k") both returned Err:502 in Calc 25.2.3.2. Use i or j rather than an arbitrary suffix, and check the real/imaginary signs.
  • Unexpected 2+i rather than 2+1i: These strings denote the same complex number; Calc abbreviates the coefficient of one.
  • Unexpected #VALUE! after exchange: Different spreadsheet applications may map malformed-input errors differently. Do not translate Calc’s numeric error codes into another product’s code without testing there.
  • Cannot sum as a normal number: This function returns complex text even when the result has no imaginary coefficient. Use IMREAL or IMAGINARY, or complex arithmetic functions, as appropriate.
  • Rounding / branch concerns: Complex roots have two algebraic signs. IMSQRT selects the principal branch; do not interchange that with an arbitrary choice of square root when verifying equations.

Compatibility and version notes

  • LibreOffice Calc: The official 26.8 Help function catalogue lists this function. Native formula execution below was performed on LibreOffice Calc 25.2.3.2 using the actual UNO spreadsheet engine, not by evaluating the expression in Python. The targeted Help page can display a different version banner in cached views; no function-introduction version is asserted without explicit release evidence.
  • Excel: Microsoft’s current function inventory lists this function under Engineering. Formula argument separators and text formatting may differ with locale and software versions; no Excel formula was executed for this draft.
  • Google Sheets: Google’s published function inventory also lists this function. Text serialization, locale separators, and very small rounding differences should be verified after import; no Google Sheets formula was executed.
  • ODF: The LibreOffice function Help identifies these complex trigonometric functions as part of OpenDocument 1.2; the IMSQRT analysis-function reference supplies its syntax and example. Do not infer that every LibreOffice version or web/mobile implementation has been checked.

The following target slugs and source files were confirmed in the archived 2026-10-10 owner-source bundle; a current live-site link check is still required before publishing:

  • COMPLEX — create a complex number from real and imaginary coefficients.
  • IMREAL and IMAGINARY — inspect individual components.
  • IMPRODUCT and IMSUM — combine complex values.

Official evidence and testing disclosure

How this guide was checked

Selected example formulas were run in LibreOffice Calc 25.2.3.2 on Linux on October 12, 2026. The official Help may cover a newer version. Tests of selected formulas do not certify every locale, interactive array operation or file round trip. View the example-check record.

Official IMSQRT reference · Editorial standards