Complex Number Calculator

Work with complex numbers in rectangular and polar form. Add, subtract, multiply, divide, convert between forms, and compute magnitude, argument and conjugate – with clear numeric output and step-by-step explanation.

Interactive complex number calculator

Use operations mode for arithmetic with two complex numbers. Use the conversion modes for a single complex number z.

z₁ = a₁ + b₁i and z₂ = a₂ + b₂i

First complex number z₁

Second complex number z₂

You can enter decimals or scientific notation (e.g. -2.5e-3). The calculator formats results with a reasonable number of significant figures for clarity.

What is a complex number?

A complex number is a number of the form

\[ z = a + bi, \]

where \(a\) and \(b\) are real numbers and \(i\) is the imaginary unit with \(i^2 = -1\). The real part is \(\Re(z) = a\), and the imaginary part is \(\Im(z) = b\).

Complex numbers can be represented as points or arrows (vectors) on the complex plane: the horizontal axis corresponds to the real part, and the vertical axis corresponds to the imaginary part.

Rectangular form and polar form

The form \(z = a + bi\) is called rectangular (or Cartesian) form. For many operations, especially addition and subtraction, rectangular form is the most natural.

Complex numbers can also be written in polar form:

\[ z = r (\cos \theta + i \sin \theta) = r \angle \theta, \]

where the modulus (or magnitude) \(r = |z|\) and the argument \(\theta = \arg(z)\).

Using Euler's formula \(e^{i\theta} = \cos \theta + i \sin \theta\), we can also write

\[ z = r e^{i\theta}. \]

Magnitude and argument

If \(z = a + bi\), then:

\[ |z| = \sqrt{a^2 + b^2} \] \[ \theta = \arg(z) = \operatorname{atan2}(b, a) \]

Here \(\operatorname{atan2}(b,a)\) is the two-argument arctangent that automatically selects the correct quadrant. The principal argument is usually taken in the interval \((-\pi, \pi]\) (in radians) or \((-180^\circ, 180^\circ]\) (in degrees).

For the special case \(z = 0\), we have \(|z| = 0\) and the argument is undefined, since the zero vector has no direction.

Basic operations with complex numbers

Addition and subtraction

For \(z_1 = a_1 + b_1 i\) and \(z_2 = a_2 + b_2 i\):

\[ z_1 + z_2 = (a_1 + a_2) + (b_1 + b_2)i \] \[ z_1 - z_2 = (a_1 - a_2) + (b_1 - b_2)i \]

Geometrically, addition corresponds to vector addition in the complex plane.

Multiplication

In rectangular form:

\[ z_1 z_2 = (a_1 + b_1 i)(a_2 + b_2 i) = (a_1 a_2 - b_1 b_2) + (a_1 b_2 + a_2 b_1)i. \]

In polar form, multiplication is especially simple. If \(z_1 = r_1 \angle \theta_1\) and \(z_2 = r_2 \angle \theta_2\), then

\[ z_1 z_2 = (r_1 r_2) \angle (\theta_1 + \theta_2). \]

Division

For non-zero \(z_2\), division in rectangular form is:

\[ \frac{z_1}{z_2} = \frac{a_1 + b_1 i}{a_2 + b_2 i} = \frac{(a_1 + b_1 i)(a_2 - b_2 i)}{a_2^2 + b_2^2} = \frac{a_1 a_2 + b_1 b_2}{a_2^2 + b_2^2} + \frac{b_1 a_2 - a_1 b_2}{a_2^2 + b_2^2} i. \]

In polar form:

\[ \frac{z_1}{z_2} = \left(\frac{r_1}{r_2}\right) \angle (\theta_1 - \theta_2), \]

again highlighting why polar form is natural for division and phasor calculations.

Complex conjugate

The complex conjugate of \(z = a + bi\) is

\[ \overline{z} = a - bi. \]

The product \(z \overline{z} = a^2 + b^2 = |z|^2\) is always real and non-negative, which is used in the formula for division and in many engineering derivations.

Worked example: rectangular to polar

Take \(z = -3 + 4i\).

  1. Compute the magnitude: \[ |z| = \sqrt{(-3)^2 + 4^2} = \sqrt{9 + 16} = 5. \]
  2. Compute the argument using \(\operatorname{atan2}\): \[ \theta = \operatorname{atan2}(4, -3) \approx 2.2143\ \text{rad} \approx 126.87^\circ. \]
  3. Write the polar form: \[ z = 5 \angle 126.87^\circ. \]

Good practice when using complex number calculators

  • Always double-check the sign of the imaginary part when entering rectangular form.
  • Be clear about whether angles are in radians or degrees; converting incorrectly is a common source of error.
  • For engineering phasors, prefer degrees if that is the convention in your field, but radians in advanced mathematics and physics.
  • When results matter for safety or design (e.g. control systems, power systems), validate with a second method or software package.

Related complex and algebra tools

For more advanced work with algebra and complex quantities, explore: