Complex Number Calculator
A complex number has a real part and an imaginary part, written a + bi. This calculator adds, subtracts, multiplies and divides two complex numbers, showing the FOIL expansion or conjugate trick, and reports the modulus of the result.
Arithmetic on a + bi
Complex numbers extend the reals by admitting a square root of −1, written i. Every complex number then has the form a + bi, with a real part and an imaginary part, and the four arithmetic operations follow from ordinary algebra plus the single rule i² = −1.
This calculator adds, subtracts, multiplies or divides two complex numbers, shows the expansion or the conjugate step that produces the answer, and reports the modulus of the result.
Addition and subtraction are componentwise and rarely go wrong. Multiplication and division are where mistakes live: multiplication needs i² = −1 applied at the right moment, and division needs the conjugate trick to clear the imaginary part from the denominator.
Both of those steps are shown separately rather than folded into the answer, so a disagreement with your own working can be traced to a particular line instead of restarted.
How to use this calculator
- Enter the real and imaginary parts of z₁ Two separate fields, both signed. For 3 + 2i enter 3 and 2; for 3 − 2i enter 3 and −2. The letter i is never typed — the field position carries that meaning.
- Enter the real and imaginary parts of z₂ The same convention. A purely real number has imaginary part 0; a purely imaginary number has real part 0.
- Choose the operation Add, subtract, multiply or divide. Order matters for the last two: the calculation is always z₁ operated on by z₂, so subtraction gives z₁ − z₂ and division gives z₁ ÷ z₂.
- Read the intermediate lines, not just the result Multiplication shows the real and imaginary parts computed separately; division shows the denominator it produced. Those are the two places hand-working usually diverges.
The formula, and where it comes from
(a+bi)(c+di) = (ac − bd) + (ad + bc)i (a+bi)/(c+di) = [(ac + bd) + (bc − ad)i] / (c² + d²)
Multiplication is ordinary expansion of two brackets. Four products appear, and the one carrying i² becomes −bd once the rule is applied, which is why the real part is a subtraction while the imaginary part is a sum. Getting that single sign wrong is the most common error in complex arithmetic.
Division multiplies numerator and denominator by the conjugate of the denominator, c − di. The denominator then becomes (c + di)(c − di) = c² + d², a real number with no imaginary part left, so the quotient can be split into a real and an imaginary component. The solver reports that denominator explicitly because it is the value the whole division is scaled by.
The modulus is √(re² + im²), computed with the hypotenuse function rather than by squaring and adding directly, which avoids overflow for very large components.
What each input means
- a Real part of z₁ — form field “z₁ real part”
- The component with no i attached. Any real number, positive, negative or zero.
- b Imaginary part of z₁ — form field “z₁ imaginary part”
- The coefficient of i, entered as a plain number. For 3 − 2i this is −2, not 2 with the sign handled elsewhere.
- c Real part of z₂ — form field “z₂ real part”
- As for a, but for the second operand.
- d Imaginary part of z₂ — form field “z₂ imaginary part”
- As for b. When dividing, c and d must not both be zero: that is division by zero and the solver refuses it.
Worked examples
Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.
Multiplication, and where i² does its work
Multiply 3 + 2i by 1 − 4i. Both operands have non-zero parts and the second is negative, which exercises the sign handling fully.
Inputs z₁ real part = 3, z₁ imaginary part = 2, z₂ real part = 1, z₂ imaginary part = -4, Operation = multiply
- Inputs z₁ = 3 + 2i, z₂ = 1 − 4i
- Multiply (FOIL) (ac − bd) + (ad + bc)i
- Real part 3·1 − 2·-4 = 11
- Imag part 3·-4 + 2·1 = -10
- Result 11 − 10i
- Modulus |z| = √(re² + im²) = 14.8661
Result 11 − 10i
The real part is computed as ac − bd. With b = 2 and d = −4 the product bd is −8, so subtracting it adds 8 — which is why the real part ends up larger than either input's real part. That double negative is exactly the step people drop.
The imaginary part is ad + bc, a straightforward sum with no sign rule applied. Comparing the two lines shows the asymmetry clearly: only the real part inherits the minus that i² introduces.
Division by the conjugate
Divide 5 + 5i by 1 + 2i. The result happens to come out with whole-number components, which makes the mechanics easy to follow.
Inputs z₁ real part = 5, z₁ imaginary part = 5, z₂ real part = 1, z₂ imaginary part = 2, Operation = divide
- Inputs z₁ = 5 + 5i, z₂ = 1 + 2i
- Multiply by conjugate denominator becomes c² + d² = 5
- Real part (ac + bd)/5 = 3
- Imag part (bc − ad)/5 = -1
- Result 3 − i
- Modulus |z| = √(re² + im²) = 3.16228
Result 3 − i
The denominator line shows c² + d² = 5. That single real number is what both components are divided by, and it is the square of the modulus of z₂ — a useful sanity check, since it must always be positive unless the divisor is zero.
The imaginary part is (bc − ad)/5, a subtraction, while multiplication's imaginary part was a sum. The two formulas look similar and are easy to interchange from memory; the labelled lines keep them apart.
Reading the result
How the result is written
The answer is given as a + bi with the sign folded into the display, so a negative imaginary part shows as a subtraction. A unit coefficient is written without the 1, so 3 − i means 3 − 1i, and a zero component is omitted entirely rather than shown as + 0i.
What the modulus tells you
The modulus is the distance from the origin to the point (re, im) in the complex plane — the size of the number, ignoring direction. It is always non-negative, and it is multiplicative: the modulus of a product equals the product of the moduli, which is a quick independent check on a multiplication.
Exactness
With whole-number inputs, addition, subtraction and multiplication give exact whole-number components. Division generally does not: results are shown to six significant figures, so a quotient with a repeating decimal appears rounded.
When you would use this
Checking roots of a quadratic
When the discriminant is negative the roots are a conjugate pair. Multiplying a candidate root by itself and substituting back into the equation verifies it, and this tool performs that multiplication with the i² rule applied correctly.
Impedance in AC circuit analysis
Alternating-current impedance is conventionally written as a complex number, with resistance as the real part and reactance as the imaginary part. Combining impedances in series is addition; the parallel case needs division, which is where the conjugate step earns its place.
Assumptions and limitations
What this calculator assumes
- Both operands are given in rectangular form a + bi; polar input, with a modulus and an argument, is not accepted.
- The operation is applied as z₁ then z₂, so subtraction and division are not commutative and the field order matters.
- For division the divisor must be non-zero: c and d cannot both be zero, and the solver reports that rather than returning infinity.
Where it stops being the right tool
- Two operands and one operation at a time. Longer expressions must be evaluated in stages, feeding each result back in by hand.
- Rectangular output only: the result is not converted to polar or exponential form, and no argument is reported alongside the modulus.
Common mistakes
Forgetting that i² = −1 in the real part
Why it happens. Expanding the brackets produces bd·i², and treating i² as if it were 1 leaves the real part as ac + bd instead of ac − bd. The answer still looks like a complex number, so nothing signals the error.
How to avoid it. Compare against the real-part line, which shows the subtraction explicitly. If your real part differs from the tool's by exactly 2bd, this is the reason.
Entering the imaginary part without its sign
Why it happens. Writing 3 − 2i as “3 and 2” feels natural because the minus reads as part of the expression rather than part of the coefficient.
How to avoid it. Enter −2. The inputs line echoes both numbers back in a + bi form, so checking it before reading the answer catches this immediately.
Using the multiplication sign pattern when dividing
Why it happens. The two formulas are near-mirror images: multiplication has ac − bd and ad + bc, division has ac + bd and bc − ad. Recalled from memory under pressure, the signs get swapped.
How to avoid it. Derive rather than recall: multiply top and bottom by the conjugate and expand. The labelled lines in the output show which combination belongs to which operation.
Key terms
Frequently asked questions
How do you multiply two complex numbers?
Expand the brackets and apply i² = −1: (a + bi)(c + di) = (ac − bd) + (ad + bc)i. The real part is a subtraction because the i² term contributes a negative; the imaginary part is a plain sum.
How does division work here?
Numerator and denominator are both multiplied by the conjugate of the denominator, c − di. That turns the denominator into the real number c² + d², so the quotient splits cleanly into real and imaginary components.
What is the modulus, and why is it reported?
It is √(re² + im²), the distance from the origin to the result in the complex plane. It measures size independently of direction, and because the modulus of a product equals the product of the moduli, it gives a quick independent check on a multiplication.
What happens if I divide by zero?
If both the real and imaginary parts of z₂ are zero the denominator c² + d² is zero, and the solver returns an explicit message rather than an infinity. Any other divisor, including a purely imaginary one, is fine.