IMABS in Google Sheets: Measure Complex Magnitudes and Distances
Calculate complex magnitudes in Google Sheets, verify numeric component checks and distinguish a vector total from the sum of individual magnitudes.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: IMABS(number) returns the magnitude of a complex value. For a+bi, the documented equation is the square root of a squared plus b squared.
Availability and version history
- Introduced: first introduction date is not established by the reviewed official history; no desktop release number is inferred.
- Availability: documented in the rolling Google Sheets service; these examples use the web worksheet workflow.
- Checked: October 14, 2026; official IMABS reference. Documentation and independent models, with no native Sheets execution or wider client certification.
Syntax and what the magnitude means
=IMABS(number)
Google’s equation image defines a nonnegative distance from the origin. Its examples show the same magnitude for 3+4i and a value constructed with COMPLEX using j notation.
The reference image labels the mathematical operation ABS(a+bi), while the page’s actual function name and syntax are IMABS. Use IMABS in the worksheet; the image is the mathematical modulus definition, not evidence that the ordinary ABS function accepts arbitrary complex text.
Magnitude discards direction and component signs. It is neither the real coefficient nor the sum of the absolute values of both coefficients. The dedicated page does not establish every malformed-input error or numeric-coercion behavior.
Example 1: calculate a magnitude column
Enter only the first column as Plain text in A2:A5. In B2 use =IMABS(A2) and fill down.
| A, complex text | B, expected magnitude |
|---|---|
| 6+8i | 10 |
| -6+8i | 10 |
| 7-24i | 25 |
| -9-12i | 15 |
For 7−24i, the sum of squared coefficients is 49+576=625, whose square root is 25. For −9−12i, 81+144=225 and the square root is 15.
The first two records have different real coefficients but equal magnitudes. A magnitude report cannot tell which side of the imaginary axis the original value occupied.
Example 2: check both components independently
In C2 use =IMREAL(A2) and in D2 use =IMAGINARY(A2), filling down. Enter =SQRT(C2^2+D2^2) in E2 and fill through E5.
Expected component pairs are (6,8), (−6,8), (7,−24) and (−9,−12); expected helper magnitudes are 10,10,25,15. IMREAL and IMAGINARY expose the numeric inputs to this check.
This direct square-and-square-root calculation is an independent moderate-value model. It is not proof that its floating-point overflow or rounding behavior matches IMABS’s internal implementation at extreme scales.
Advanced example: distance between two complex values
Take P=5+6i and Q=2+2i. Their difference is 3+4i, so their distance is five:
=IMABS(IMSUB("5+6i","2+2i"))
Reversing the subtraction produces −3−4i and the same distance five. IMSUB keeps the directional difference; IMABS then retains only its length.
A distance model also needs meaningful coordinates. If the two coefficients represent different measured quantities or units, the application must justify comparing them in this geometric way rather than assuming the formula supplies that interpretation.
Advanced example: normalization preserves direction
For the first record 6+8i, divide both coefficients by its magnitude ten. The numeric results are 0.6 and 0.8, whose squares sum to one.
With the first record in A2 and its magnitude in B2, construct:
=COMPLEX(IMREAL(A2)/B2,IMAGINARY(A2)/B2)
The independently expected normalized components are 0.6 and 0.8, and the mathematical magnitude is one. Use the numeric formula result rather than a shortened display when checking an irrational or more complicated normalization.
Normalization requires a nonzero magnitude. The zero complex value has no direction to preserve; the guide does not assign a native parsing or division-error code to every possible zero representation.
Advanced example: two different meanings of total size
The values 6+8i and 6−8i each have magnitude ten. Adding their magnitudes gives twenty. Their complex sum has real coefficient twelve and imaginary coefficient zero, whose magnitude is twelve.
Thus =IMABS(IMSUM("6+8i","6-8i")) has expected result twelve, while =IMABS("6+8i")+IMABS("6-8i") gives twenty. IMSUM combines components before the magnitude is taken.
For aligned values 6+8i and 12+16i, the sum is 18+24i, whose magnitude 30 equals 10+20. Equality in that example is not a general rule for differently directed inputs.
Product identity and scope
Multiplying 6+8i by 1−i gives 14+2i. Its magnitude is the square root of 200, approximately 14.142135624. The separate magnitudes are ten and the square root of two, whose product agrees mathematically.
This provides an independent IMPRODUCT check. Compare a stated tolerance for irrational results rather than requiring rounded output strings to match exactly.
The reference’s modulus equation and explicit examples support these component models. Invalid strings, general blank/coercion behavior, native precision extremes and exact errors remain unverified. No native Sheets execution was performed.
References and verification
Examples use fictional data, English function names and comma separators. Expected outputs are independent mathematical calculations or explicitly documented rules, not native Sheets captures. Check the spreadsheet locale when reproducing punctuation-sensitive formulas.