Engineering functions

IMSUB

Matches all 1,220 recorded answers

Recorded: 1,216 in the answer bank and 4 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicIMSUB
BulgarianIMSUB
CzechIMSUB
DanishIMAGSUB
GermanIMSUB
GreekIMSUB
English (Australia)IMSUB
English (United Kingdom)IMSUB
English (United States)IMSUB
SpanishIM.SUSTR
EstonianIMSUB
FinnishKOMPLEKSI.EROTUS
FrenchCOMPLEXE.DIFFERENCE
HebrewIMSUB
CroatianIMSUB
HungarianKÉPZ.KÜL
IndonesianIMSUB
ItalianIMSUB
JapaneseIMSUB
KoreanIMSUB
LithuanianIMSUB
LatvianIMSUB
NorwegianIMSUB
DutchC.VERSCHIL
PolishRÓŻN.LICZB.ZESP
Portuguese (Brazil)IMSUB
Portuguese (Portugal)IMSUBTR
RomanianIMSUB
RussianМНИМ.РАЗН
SlovakIMSUB
SlovenianIMSUB
Serbian (Latin)IMSUB
SwedishIMDIFF
ThaiIMSUB
TurkishSANTOPLA
UkrainianIMSUB
VietnameseIMSUB
Chinese (Simplified)IMSUB
Chinese (Hong Kong)IMSUB
Chinese (Traditional)IMSUB

Names from Microsoft's support site.

What it does

IMSUB(inumber1, inumber2)

IMSUB(inumber1, inumber2) subtracts its second complex argument from its first. Both arguments are required.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=IMSUB("5+2i","1+5i") returns "4-3i": subtract real coefficients and imaginary coefficients separately. Reversing the arguments returns "-4+3i".

Quirks

Operand order matters: subtraction is neither commutative nor associative. Both arguments are required. Complex text may use lowercase i or j, but two written suffixes must agree or the current wrapper gives #VALUE!. A malformed complex number gives #NUM!. The result is complex text; extracting its coordinates with IMREAL and IMAGINARY returns ordinary numbers.

How to implement

Parse the two coefficients and suffix before doing arithmetic; use the common complex formatter afterward. Retain suffix consistency, suppress a zero component and omit the coefficient one before the imaginary unit. Formatting and parsing have their own fifteen-significant-digit rules, so testing only the algebra misses observable behaviour.

Compute (a,b)-(c,d)=(a-c,b-d). The example gives 5-1=4 and 2-5=-3. Preserve operand order; subtraction is not commutative. The current implementation uses ordinary binary64 component arithmetic. Keep error propagation and traversal of range arguments consistent with the worksheet call model; flattening values without their error policy can change which result is returned.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

IMSUB · 5 lines · calc-func/src/catalogue/engineering.rs on GitHub
53 imsub "IMSUB" (2, 2) [V "inumber1", V "inumber2"] |s, a, sv| {
    let x = complex_of(s, 0, &a[0])?;
    let y = complex_of(s, 1, &a[1])?;
    complex_text(Ok(x.sub(y)), &[x, y])
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1,216

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,216 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

COMPLEX constructs each input; IMDIV divides; IMPOWER raises one input to a real power.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents