IMARGUMENT Function (Gnumeric)
Learn the IMARGUMENT function in Gnumeric: Returns the argument theta, an angle expressed in radians.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked
What IMARGUMENT does
For a complex number z = x + yi, IMARGUMENT(z) returns the direction (phase) of the point (x,y) measured from the positive real axis in radians, not degrees. Magnitude and direction answer different questions: IMABS returns the distance from the origin; IMARGUMENT returns the angle [1, IMARGUMENT / IMABS]. Its sign and quadrant matter in signal analysis, mechanical vibration comparisons, and complex-valued models.
Version-specific error distinction: The online 1.12 manual describes malformed complex inputs as
#VALUE!. The official 1.12.62 source instead returns#NUM!when parsing a malformed complex string; other unsupported value types can still return#VALUE!. Any#VALUE!expectations below are the manual’s older documented rule, not verified 1.12.62 output. No native error test was performed.
Exact Gnumeric syntax and arguments
=IMARGUMENT(z)
| Position | Parameter | Required | Input and meaning | Default |
|---|---|---|---|---|
| 1 | z |
Yes | A valid complex number, for example "3+4i", a COMPLEX(x,y) formula, or a cell containing compatible complex notation. |
None; the manual documents no optional arguments. |
Gnumeric documents #VALUE! for invalid complex input. Gnumeric-specific exception: if z is zero, Gnumeric documents a result of 0; the manual explicitly says Excel instead returns an error [1, IMARGUMENT]. That difference must not be silently overridden by a cross-application assumption.
Reproduce a five-cell phase calculation
In a new worksheet, enter these values and formulas. The =COMPLEX input avoids relying on free-form text parsing.
| Cell | Enter | Purpose |
|---|---|---|
| A1 | Real component |
Heading |
| B1 | Imaginary component |
Heading |
| C1 | Complex number |
Heading |
| D1 | Phase in radians |
Heading |
| E1 | Phase in degrees |
Heading |
| A2 | 3 |
x component |
| B2 | 4 |
y component |
| C2 | =COMPLEX(A2,B2) |
Represents 3+4i [1, COMPLEX] |
| D2 | =IMARGUMENT(C2) |
Angle returned in radians [1, IMARGUMENT] |
| E2 | =D2*180/PI() |
Degrees derived from a radian value; arithmetic transformation |
The independently calculated expectation is atan2(4,3) = 0.9272952180... radians, equivalent to 53.1301023542... degrees. IMARGUMENT itself returns radians; the degrees column is deliberately a separate expression. Gnumeric’s reference documents the meaning but not a fixed number of displayed decimal places [1].
Additional expected outcomes and interpretation
| Formula | Independently expected value | What it checks |
|---|---|---|
=IMARGUMENT(COMPLEX(0,1)) |
π/2 ≈ 1.5707963268 radians |
Positive imaginary axis. |
=IMARGUMENT(COMPLEX(0,-1)) |
-π/2 ≈ -1.5707963268 radians |
Negative imaginary axis. |
=IMARGUMENT(COMPLEX(3,-4)) |
-0.9272952180... radians |
Fourth-quadrant phase. |
=IMARGUMENT(COMPLEX(1,0)) |
0 radians |
Positive real axis. |
=IMARGUMENT(COMPLEX(0,0)) |
0 radians documented by Gnumeric |
Gnumeric/Excel zero-input distinction [1]. |
=IMARGUMENT("not-a-complex-number") |
#VALUE! documented |
Invalid input [1]. |
The signs above follow ordinary atan2(imaginary,real) mathematics; the manual does not promise a particular display format such as +0i, sign of zero, or precision. At negative-real-axis branch boundaries, floating-point signed zero and convention details should be tested natively rather than presented as unconditional display guarantees.
Applied example: direction of an impedance measurement
Suppose an instrument yields A2=8 for a real component and B2=6 for an imaginary component. In C2, use =COMPLEX(A2,B2), in D2 use =IMARGUMENT(C2), and in E2 convert radians to degrees with =D2*180/PI(). Independently: magnitude √(8²+6²)=10 and phase atan2(6,8)=0.6435011088... radians, or about 36.86989765°. Add =IMABS(C2) in F2 to keep both magnitude and phase visible. This simple complex-plane example does not stand in for calibrated electrical engineering measurements.
Advanced use: reconstruct the original Cartesian components
For a nonzero complex value, if r = IMABS(C2) and θ = IMARGUMENT(C2), the mathematical identities are x = r cos θ and y = r sin θ. Put =IMABS(C2)*COS(D2) in F2 and =IMABS(C2)*SIN(D2) in G2. For 3+4i these should be approximately 3 and 4; compare with IMREAL(C2) and IMAGINARY(C2) [1, IMABS / IMREAL / IMAGINARY]. This is an independent trigonometric consistency check, not a claim of measured Gnumeric output.
For changing measurements, phase angles can jump at a branch boundary even if the signal changes smoothly. A chart of raw angles should therefore not be mistaken for an automatically unwrapped phase trend. If you need continuous phase, design and verify an explicit unwrapping algorithm; IMARGUMENT alone is not documented to unwrap sequential values.
Errors, limitations, and troubleshooting
| Symptom | Cause or next check |
|---|---|
#VALUE! |
The function’s manual documents this for an invalid complex value. Use COMPLEX(real,imaginary) for a predictable input structure [1]. |
Expected degrees but see about 0.9273 |
Output is radians; multiply by 180/PI() in a separate formula. |
Input 0 returns 0, not an error |
This is Gnumeric’s documented zero behaviour, different from Excel [1]. |
| Positive/negative sign seems flipped | Check imaginary-part sign and which axis/quadrant the complex value occupies. |
Output changes abruptly near -Ï€/Ï€ |
Branch-cut/phase-wrapping issue; compare neighboring real and imaginary components. Exact boundary-sign behavior remains a native-test gate. |
| Formula is not accepted after pasting | Confirm correct Gnumeric name, argument syntax, actual locale, and the cell’s formula-entry mode [5,6]. |
Empty cell, "", "i"-only or mixed suffix |
No blanket coercion claim is supported by the reference; test the specific installation. |
Version, software, locale and compatibility boundaries
This is a guide to Gnumeric, based on the Gnumeric 1.12 manual [1]. Gnumeric’s own function catalogue [2] lists IMARGUMENT as Complete / Exhaustive: the first term reports catalogue implementation classification; the second is the project’s test-suite category. Neither is a record of running the examples in this tutorial. The 1.12.62 release announcement [3] mentions improved compatibility for complex-number functions generally, but does not assert this tutorial’s examples were tested, nor identify every supported older release.
The official Gnumeric manual does not give IMARGUMENT a blanket Excel-compatible label in its own entry. Instead, it expressly documents a zero-input difference from Excel [1, IMARGUMENT]; it is not proof of byte-for-byte identical imports, worksheet display, coercion of blanks, text-number conversion, or localized formula entry in Microsoft Excel. Do not infer compatibility from another spreadsheet’s identically named function.
The formulas here use Gnumeric’s English-language function names, a period for the decimal separator, and commas between arguments. The Gnumeric 1.12 manual illustrates commas as function-argument separators [5]; its locale documentation explains that numeric conventions are influenced by system locale [6]. Confirm the actual installation’s formula editor and locale before pasting examples or changing separators. Gnumeric’s download guidance describes Linux/BSD distributor packages as the usual installation route and says the project does not currently distribute Windows binaries [4]. This does not prove a function works on every platform or build.
A complex number such as "3+4i" is passed as text notation to the complex-function family. A different unit suffix (i versus j), case, spaces, Unicode minus signs, explicit empty strings, missing cells, and errors are possible parsing or coercion edge cases; the official function reference is not a complete acceptance matrix. This page does not claim those cases were executed. Use COMPLEX(real,imaginary) to construct consistently formed values when possible [1, COMPLEX].
Related Gnumeric function guides
Official references and claim provenance — checked 2026-10-13
- Gnumeric 1.12: Complex-function reference — canonical signature, specific argument meanings and documented errors; function sections noted inline above.
- Gnumeric function catalogue — presence, implementation label and upstream test-suite classification; not independent execution of this guide.
- Gnumeric 1.12.62 release announcement — announced release context and general complex-number compatibility improvements.
- Gnumeric official download and platform guidance — distribution routes and lack of currently distributed Windows binaries.
- Gnumeric 1.12: types of cell elements / using functions — documented function-form and comma argument separator for the English examples.
- Gnumeric 1.12: languages and locales — locale behaviour and numeric formatting context.
Evidence boundary: The examples were independently calculated and checked against official documentation and the Gnumeric 1.12.62 source. Native execution, locale checks and file round-trips were not performed.