IMAGINARY Function (LibreOffice Calc)
Extract an imaginary coefficient with LibreOffice IMAGINARY. Work with i/j text, pure-real values and signed components, then reconstruct and check a complex dataset.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: IMAGINARY returns the signed numeric coefficient of i or j. For 5-12j it returns -12, while a purely real input has coefficient0.
Availability and version history
- Introduced: Documented by LibreOffice 26.8.1.1; original introduction not established.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
The IMAGINARY function in LibreOffice Calc is used for this task: Returns the imaginary coefficient of a complex number. Extract the imaginary coefficient of a complex number.
This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.
Syntax and arguments
IMAGINARY(complex_number)
| Argument | Required? | Meaning |
|---|---|---|
Complex number |
Yes | Required complex-number text or a cell reference containing it. |
Calc formulas normally use semicolons (;) between arguments in common configurations; the displayed separator may depend on settings or locale.
Worked example
=IMAGINARY("3+4i")
Expected result: 4.
Why it works: Extract the imaginary coefficient of a complex number.
How to use it in your own spreadsheet
- Identify the cells or inputs that correspond to the sample values above.
- Enter the formula in an empty cell, changing the references or literal values to match your sheet.
- Compare the output with a manual check on a small known example.
- Extend the formula to a larger dataset only after you understand the result.
Common problems and practical checks
- Check the accepted numeric domain, units and array dimensions for the specific operation.
- If an error appears, check that the function arguments are of the expected type.
- A pasted formula may produce an error when it uses the other program’s argument separator or unsupported options.
Additional worked application and edge cases
Accepted representation and result type
The required input is complex-number text, supplied as a quoted literal or a cell reference. Examples include "5-12j", "-4i", "i" and pure real text "7". The reviewed Calc parser recognizes lowercase i and j, not uppercase I or J.
The output is the numeric coefficient of the imaginary unit. For 5-12j, it is -12, not the text -12j and not the magnitude12. The imaginary unit is a notation for the square root of -1; it is not included in the returned scalar.
Stepwise example: extract a signed component column
Enter the following text values in A2:A6, then enter =IMAGINARY(A2) in B2 and copy down.
| Input | Independently expected numeric coefficient |
|---|---|
| 5-12j | -12 |
| -3+4i | 4 |
| i | 1 |
| -4i | -4 |
| 7 | 0 |
A pure real value has an imaginary coefficient of zero; that is a valid result, not evidence that the formula failed. A negative coefficient retains its sign because this function extracts rather than takes an absolute value.
Second example: create and then extract
Put real coefficient 2 in D2 and imaginary coefficient -3 in E2. =COMPLEX(D2;E2;"j") creates 2-3j. Applying =IMAGINARY(COMPLEX(D2;E2;"j")) has independently expected result -3.
This pattern is safer than manually concatenating a plus sign in front of a negative coefficient, which can create malformed text such as 2+-3j. It also makes the chosen unit suffix explicit.
Advanced application: audit a complex sum through components
For text 3+4i in G2 and -2+6i in G3, =IMAGINARY(IMSUM(G2:G3)) is expected to return 10. Independently, extracting each imaginary coefficient and adding 4+6 gives the same value.
The real coefficient of that sum is 1, so its magnitude is SQRT(101), approximately10.04987562. The imaginary component10 is neither the whole complex sum nor its magnitude. Keeping separate component columns makes those distinctions visible in a signal or vector worksheet.
Errors, portability and precision
A missing coefficient can be valid when it represents an implied1, as in i, but arbitrary words and unsupported suffixes are not accepted complex representations. Keep labels in a separate column. A numeric-looking value stored as malformed complex text is still a parsing problem.
The same mathematical imaginary coefficient can be written with i or j. This unary function only parses one value, so multi-input suffix consistency is not an additional argument rule here. Do not generalize another application’s complex parsing behavior to Calc without checking it.
Very small coefficients may display as zero under limited number formatting. Increase displayed precision before concluding that a component is mathematically absent. Conversely, a small rounding residual from an earlier complex calculation may be a floating-point artifact rather than a meaningful measured component.
- Pinned Calc complex parser and formatter, inspected October 17, 2026.
- Pinned Calc component operations, inspected October 17, 2026.
Verification scope for this addition: These added results were independently calculated or derived from the cited documentation/source. They were not newly tested in LibreOffice Calc. The original example-specific Calc 25.2.3.2 claims elsewhere on this page remain historical and apply only to those original examples. The cited 26.8.1.1 source tag is a code reference, not a claim of a new run in that release.
Related functions
Documentation and verification
- LibreOffice Calc Help
- The standalone example was calculated using LibreOffice Calc 25.2.3.2 on October 9, 2026 and its computed result matched the expected value. This does not certify every option, version, or other example.