Contact

IMARGUMENT Function (LibreOffice Calc)

Engineering Intermediate LibreOffice Calc

Learn the IMARGUMENT function in LibreOffice Calc: Returns the argument theta, an angle expressed in radians.

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

IMARGUMENT returns the principal argument (direction angle) of a complex number in radians. For 3+4i, the result is approximately 0.927295218 radians, or 53.130102°. Use DEGREES to display degrees.

Function syntax and argument definition

=IMARGUMENT("ComplexNumber")

ComplexNumber (required): a complex numeric string in the form a+bi or a+bj, a cell holding that text, or a real number. LibreOffice Calc also accepts results of COMPLEX(real;imaginary) here. The function returns a numeric scalar, not a complex-number text string.

Version and locale: The displayed current English online documentation says LibreOffice 26.8 Help. All native examples below were executed in desktop LibreOffice Calc 25.2.3.2, not the documented 26.8 runtime. English Calc formula examples separate different function arguments with a semicolon (;); complex-number coefficients within one quoted string are not separate arguments. Actual separators and decimal marks can follow your locale. The documented IMCOSH/IMSINH entries specifically say the functions are available since LibreOffice 3.6; other two functions are confirmed in the Help and tested in 25.2 but no undocumented first-version claim is made.

How it works

For a complex number z=a+bi, its argument is the angle from the positive real axis to the point (a,b) in the complex plane. The atan2(b,a) convention selects the correct quadrant. The principal angle for the tested examples lies in approximately (-PI();PI()]. Positive real values have angle 0; negative real values have angle PI; negative imaginary values may have negative angles. z=0 has no defined mathematical direction.

Reproducible worksheet setup

Enter the text 3+4i into A2 (plain text, without an initial equals sign); put numeric 3 in B2 and 4 in C2. Both =IMARGUMENT(A2) and =IMARGUMENT(COMPLEX(B2;C2)) return approximately 0.927295218001612 in the native test.

To recreate the result, enter the indicated literal complex values as cell text (without a leading equals sign), insert the formula into a different empty cell, and allow Calc to recalculate. Values listed below reflect the actual observed Calc results rather than screenshots or hypothetical applications.

Worked formulas and observed results

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

Formula Observed result in Calc 25.2.3.2 Explanation
=IMARGUMENT("3+4i") 0.927295218001612 Angle of a point with real 3, imaginary 4.
=IMARGUMENT(-1) 3.14159265358979 Negative real axis: PI radians.
=IMARGUMENT("-i") -1.5707963267949 Downward direction: −PI/2.
=DEGREES(IMARGUMENT("i")) 90 Change the angle to degrees.
=IMARGUMENT(1) 0 Positive real axis.

Advanced example and interpretation

To report direction in degrees in an engineering sheet, use =ROUND(DEGREES(IMARGUMENT(COMPLEX(B2;C2)));2). With B2=3, C2=4, the expected result is 53.13 (independent calculation; this exact rounded wrapper was not executed in the test). Keep radians when feeding angles into SIN, COS, or other trigonometric calculations. To inspect the return type, =ISNUMBER(IMARGUMENT("3+4i")) was observed to return TRUE.

Errors, edge cases and limitations

=IMARGUMENT(0) and =IMARGUMENT("oops") both returned Err:502 in the native test (invalid argument). This is distinct from an angle of zero for positive real numbers. Check for both zero modulus and malformed complex text before calculating.

Type and precision: For the worked example, the numeric output is not the string "0.927...": use it directly in mathematical formulas. Floating-point computations should generally be checked by numeric tolerance rather than string exact-match. ODF/Excel/Sheets file-format round-trips can affect syntax, prefixes or formatting; export/import behaviour was not tested here.

Troubleshooting

Wrong quadrant? A direct ATAN(imaginary/real) is not a reliable substitute because it loses quadrant information; use IMARGUMENT or a correct two-argument arc-tangent. Unexpected unit? This formula returns radians, not degrees. Unexpected Err:502? Inspect whitespace, i/j suffixes and zero input. Different result sign? Verify the sign on each coefficient.

If you cannot reproduce the result, first confirm the exact formula in the formula bar, check the cell’s source value, inspect decimal and list separators for your locale, and compare the software version. Use simple examples before adding other nested formulas.

Cross-software compatibility

Microsoft Excel and Google Sheets document IMARGUMENT; their function argument display and locales may differ. The geometric meaning and radian output are portable, but exact error messages and formatting are not claimed to match across programs. See official cross-software references below; no native Excel or Google Sheets tests were performed.

Official evidence, check date, and test provenance

  • LibreOffice official function page: Documentation for IMARGUMENT — accessed 2026-10-11, current display LibreOffice 26.8 Help. Supports named function, purpose, syntax, argument form, and its documented examples.
  • LibreOffice official analysis-functions list: Add-in Functions, Part Two — accessed 2026-10-11. Explains COMPLEX, IMARGUMENT, IMLOG2 and related engineering functions.
  • Microsoft: Engineering functions reference — consulted 2026-10-11 for equivalent Excel function availability; no Excel execution claimed.
  • Google: Sheets function list — consulted 2026-10-11 for function availability; no Sheets execution claimed.
  • Native evidence: The accompanying native_calc_results.json and native_calc_test.py record observed Calc output, numeric/error types and independent Python math comparisons. 34/34 assertions passed across this four-page batch and 8 additional error observations were recorded; not every explanatory derivative formula was executed.

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 IMARGUMENT reference · Editorial standards