IMREAL Function (LibreOffice Calc)
Extract real coefficients in LibreOffice Calc with IMREAL. Handle signed, pure-real and pure-imaginary complex text, audit a dataset and distinguish a component from magnitude.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: IMREAL returns the signed numeric real coefficient of complex text. For -8+6j it returns -8, not the magnitude10.
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 IMREAL function in LibreOffice Calc is used for this task: Returns the real coefficient of a complex number. Extract the real 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
IMREAL(complex_number)
| Argument | Required? | Meaning |
|---|---|---|
Complex number |
Yes | Required complex-number text, such as “-8+6j”, or a reference containing it. |
Calc formulas normally use semicolons (;) between arguments in common configurations; the displayed separator may depend on settings or locale.
Worked example
=IMREAL("3+4i")
Expected result: 3.
Why it works: Extract the real 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
Representation and numeric output
The required argument is complex-number text or a reference containing it. Use quoted literals such as "-8+6j", lowercase i or j, and unquoted cell references. The reviewed parser also accepts pure imaginary text such as "4i" and pure real text such as "7".
IMREAL returns the numeric real coefficient. It does not strip all nonnumeric characters or calculate the magnitude. For -8+6j, the result is -8, while the magnitude is10. The sign is retained.
Stepwise example: separate real components
Enter -8+6j, 5-12i, 4i, 7 and 0 as text in A2:A6. Enter =IMREAL(A2) in B2 and copy down.
| Input | Independently expected real coefficient |
|---|---|
| -8+6j | -8 |
| 5-12i | 5 |
| 4i | 0 |
| 7 | 7 |
| 0 | 0 |
The pure imaginary input has real component zero. That is a valid extraction result rather than an error. Keep the original complex text alongside the extracted column so that the imaginary information is not accidentally discarded.
Second example: convert a purely real complex result
=IMPRODUCT("1+i";"1-i") is mathematically2 and is formatted as complex text. Wrapping it in =IMREAL(IMPRODUCT("1+i";"1-i")) returns the numeric real coefficient 2.
Use this conversion only when the real component is actually the quantity you need. IMREAL applied to a non-real result silently selects its real component; it is not a test that the imaginary part was zero. Inspect IMAGINARY separately when that condition matters.
Advanced application: audit the real part of a sum
Put 3+4i in D2 and -2+6i in D3. =IMREAL(IMSUM(D2:D3)) is independently expected to return 1. Extracting the two real coefficients separately and adding3+(−2) provides the same control.
To reconstruct a value from separate numeric columns, use COMPLEX rather than manual string concatenation. For B2=-8 and C2=6, =COMPLEX(B2;C2;"j") represents -8+6j. This preserves the sign rules without accidentally producing strings such as -8+-6j.
Parsing and precision checks
Uppercase I/J and arbitrary labels are rejected by the inspected Calc parser. A text fragment such as “8 ohms” is not a valid complex literal merely because it starts with a number. Keep measurement units and comments in separate cells.
A tiny real component can display as zero because of number formatting, while a tiny nonzero residual can arise from earlier floating-point calculations. Compare against a tolerance appropriate to the model rather than using display rounding as proof of exact cancellation.
This unary function parses one complex input. It has no aggregation, suffix-conversion or phase argument. Functions with similar names in other products may have different coercion rules; the representations shown here are tied to LibreOffice’s documentation and reviewed source.
- Calc complex parsing and real-component implementation, 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.