Complex number calculator

Add, subtract, multiply and divide complex numbers, raise them to powers, find nth roots, and convert a + bi to polar form, with an Argand diagram.

Drafted with AI writing toolsUpdated Checked examples: 7

Rectangular a + bi (j also works) or polar r∠θ; θ uses the angle unit from settings unless you add ° or rad
Try
Result
11 − 2i
Result: 11 − 2i
Real part
11
Imaginary part
−2
Modulus |z|
11.1803398875
Argument (angle)
−10.3048464688
Polar form
11.18034 ∠ −10.304846°

z₁ × z₂ = 11 − 2i, which is 11.18034 ∠ −10.304846° in polar form.

Argand diagram: zᵣ is the result (dashed: unit circle)

ReImz₁z₂zᵣ
How it's calculated S
  1. Multiply out, using i² = −1

    (ac−bd)+(ad+bc) i=(3⋅1−4⋅(−2))+(3⋅(−2)+4⋅1) i=11−2i(ac - bd) + (ad + bc)\,i = (3\cdot1 - 4\cdot(-2)) + (3\cdot(-2) + 4\cdot1)\,i = 11 - 2i
  2. Polar form of the result

    11.18033989 ∠ −10.30484647∘11.18033989\,\angle\,-10.30484647^\circ

About the complex number calculator

A complex number z = a + bi has a real part a and an imaginary part b, where i² = −1. Addition, subtraction and multiplication work in rectangular form; division multiplies top and bottom by the conjugate of the divisor. Powers and roots use polar form, z = r(cos θ + i sin θ): De Moivre's formula raises the modulus r to the power n and multiplies the angle θ by n.

Electrical engineers use complex numbers for AC impedance and phasors, and algebra students meet them as roots of polynomials. The default multiplies (3 + 4i)(1 − 2i) = 3 − 6i + 4i − 8i² = 11 − 2i, whose modulus is √125 ≈ 11.1803.

Inputs can be rectangular (3 + 4i, with j accepted for i) or polar (2∠90). Angles follow the degree, radian or gradian setting, and the argument is given between −180° and 180°. The Argand diagram draws each number as an arrow from the origin.

How to add, multiply and divide complex numbers

Treat i as a number with i² = −1. Add or subtract the real and imaginary parts separately. To multiply, expand and replace i² with −1: (3 + 4i)(1 − 2i) = 3 − 6i + 4i − 8i² = 11 − 2i. To divide, multiply the top and bottom by the conjugate of the divisor.

Worked examples

Operationz₁z₂ or nResult
Add3 + 4i1 - 2i4 + 2i
Subtract3 + 4i1 - 2i2 + 6i
Multiply3 + 4i1 - 2i11 − 2i
Divide3 + 4i1 - 2i−1 + 2i
Power1 + i816
nth roots-422i, −2i

Dividing by 1 − 2i uses its conjugate, 1 + 2i. The denominator becomes 1² + 2² = 5 and the numerator (3 + 4i)(1 + 2i) = −5 + 10i, so the quotient is −1 + 2i.

Multiply back to check a quotient: (−1 + 2i)(1 − 2i) = 3 + 4i. Division by 0 + 0i is undefined. The OpenStax complex numbers lesson covers these rules and the conjugate.

How to convert a complex number to polar form

The modulus r = √(a² + b²) is the distance from the origin, and the argument θ = atan2(b, a) is the angle from the positive real axis. For 3 + 4i, r = √(3² + 4²) = 5 and θ ≈ 53.130102°, so 3 + 4i = 5∠53.130102°.

Use atan2, not arctan(b/a), because the signs of both parts decide the quadrant. −3 − 4i also has modulus 5, but its principal argument is −126.869898°, while arctan(4/3) gives 53.130102° for both numbers.

The argument lies between −180° and 180°, in your chosen angle unit: 53.130102° is 0.927295 rad or 59.033447 gradians. The exponential form re^(iθ) always uses radians, so 3 + 4i = 5e^(0.927295i).

In AC circuits, a 3 Ω resistance in series with 4 Ω of inductive reactance has impedance 3 + 4j Ω: magnitude 5 Ω at a phase angle of 53.13°.

The number 0 has no defined argument, so an angle shown for it is only a placeholder.

Powers: De Moivre's formula

For a whole number n, zⁿ = rⁿ(cos nθ + i sin nθ): raise the modulus to the power and multiply the angle. (1 + i)⁸ has r = √2 and θ = 45°, so it equals (√2)⁸ = 16 at 8 × 45° = 360°, the real number 16.

Negative powers give reciprocals: (1 + i)⁻¹ = 0.5 − 0.5i. A non-integer power returns one principal value, using the argument between −180° and 180°, so (−4)^0.5 gives 2i alone. The exponent must be a real number.

How to find all nth roots of a complex number

A nonzero number has n distinct nth roots. They share the modulus |z|^(1/n) and are spaced 360°/n apart, starting from the principal root at angle θ/n. For z = 0, every root is 0.

The cube roots of 8 are 2 and −1 ± √3i (about −1 ± 1.732051i), at 0°, 120° and 240°; 240° is the same direction as −120°. The square roots of −4 are 2i and −2i, and 2i is the principal one.

Asking for (−4)^0.5 and asking for the square roots of −4 are different questions: the power gives one value, the roots give both. The OpenStax polar form lesson derives both from polar coordinates.

How to type complex numbers

  • Rectangular form. Write 3 + 4i, 3 - 4i, -2i or 1/2 + 3/4i; j works in place of i.
  • Polar form. Write the modulus, ∠ or cis, then the angle, as in 2∠90°.
  • Angle units. ° or deg means degrees and rad means radians. With no suffix the angle setting applies, so 2∠90 in radian mode means 90 radians, a different point from 2i.
  • Roots. n must be a whole number from 1 to 360.

For the roots of a polynomial, use the polynomial root finder, or the quadratic calculator for ax² + bx + c = 0. For real-number arithmetic and functions, use the scientific calculator.

Worked examples

(3 + 4i)(1 − 2i)

Operation
Multiply z₁ × z₂
z₁
3 + 4i
z₂
1 - 2i
Result
11 − 2i
Real part
11
Imaginary part
-2

Checked against: 3 − 6i + 4i − 8i² = 11 − 2i

(3 + 4i) ÷ (1 − 2i)

Operation
Divide z₁ ÷ z₂
z₁
3 + 4i
z₂
1 - 2i
Result
−1 + 2i
Real part
-1
Imaginary part
2

Checked against: Independent calculation

Polar form of 3 + 4i

Operation
Convert to polar form
z₁
3 + 4i
Modulus |z|
5
Argument (angle)
53.1301023542

Checked against: atan2(4, 3) in degrees via Machin-series arctangent

(1 + i)⁸

Operation
Power z₁ⁿ
z₁
1 + i
n
8
Result
16
Real part
16
Imaginary part
0

Checked against: (√2)⁸ = 16 at angle 8 × 45° = 360°

Questions

How do you multiply complex numbers?

Expand the brackets and replace i² with −1: (a + bi)(c + di) = (ac − bd) + (ad + bc)i. For (3 + 4i)(1 − 2i) that is (3 + 8) + (−6 + 4)i = 11 − 2i. In polar form the rule is shorter: multiply the moduli and add the angles, so 5∠53.13° × 2.236∠−63.43° = 11.18∠−10.30°.

How do you divide complex numbers?

Multiply the top and bottom by the conjugate of the divisor, which makes the denominator a real number. (3 + 4i)/(1 − 2i) = (3 + 4i)(1 + 2i)/(1² + 2²) = (3 + 6i + 4i + 8i²)/5 = (−5 + 10i)/5 = −1 + 2i. Division by 0 + 0i is undefined.

How do you convert a complex number to polar form?

The modulus is r = √(a² + b²) and the argument is θ = atan2(b, a), which picks the correct quadrant. For 3 + 4i, r = √(9 + 16) = 5 and θ ≈ 53.130°, so 3 + 4i = 5∠53.130°. Plain arctan(b/a) gives the wrong angle when the real part is negative: −3 − 4i has an argument of about −126.870°, not 53.130°.

What is De Moivre's theorem?

For z = r(cos θ + i sin θ) and a whole number n, zⁿ = rⁿ(cos nθ + i sin nθ). So (1 + i)⁸, with r = √2 and θ = 45°, equals (√2)⁸ = 16 at an angle of 8 × 45° = 360°, which is the real number 16. The same idea gives n evenly spaced nth roots: the cube roots of 8 are 2 and −1 ± 1.732051i, 120° apart.

What is the square root of −1?

The imaginary unit i, defined by i² = −1; −i is the other square root. Every negative number has two imaginary square roots, so √−4 = ±2i, and the principal root, the one with argument 90°, is 2i. Powers of i repeat every four steps: i, −1, −i, 1, then i again.

About this calculator

z=a+bi=r(cos⁡θ+isin⁡θ)r=a2+b2,θ=atan2⁡(b,a)zn=rn(cos⁡nθ+isin⁡nθ)\begin{gathered} z = a + bi = r(\cos\theta + i\sin\theta) \\[4pt] r = \sqrt{a^2+b^2},\quad \theta = \operatorname{atan2}(b, a) \\[10pt] z^n = r^n(\cos n\theta + i \sin n\theta) \end{gathered}

Sources

  1. Wolfram MathWorld — Complex Number
  2. Wolfram MathWorld — de Moivre's Identity

Checked against references

This calculator includes 7 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.