Complex Number Calculator

Complex number calculator to add, subtract, multiply and divide complex numbers, compute magnitude and argument, and convert between rectangular and polar form.

Complex number controls

Operations mode expects z₁ and z₂ (a + bi). Conversion modes only use the relevant fields below.

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

You can enter decimals, scientific notation (e.g. -2.5e-3), or integers. The calculator rounds results for readability and avoids NaN/Infinity by validating each input.

How to Use This Calculator

Choose a mode, enter the requested values, and click Calculate. Operations mode handles two complex numbers, while conversion modes focus on a single rectangle or polar expression. The interface prevents invalid entries and rounds every display to keep NaN/Infinity off the screen.

The calculator performs arithmetic in rectangular coordinates by handling real and imaginary parts separately. Polar forms leverage trigonometric relationships so multiplication, division, and conversions stay deterministic across browsers.

All results use a consistent rounding strategy (6 significant digits for magnitudes, 4 decimal places for angles) so every user sees the same values regardless of environment.

Full original guide (expanded)

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 (−π, π] in radians or (−180°, 180°] 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:

Formulas

Key formulas preserved from the original guide:

  • \(z = a + bi\)
  • \(z = r (\cos\theta + i \sin\theta) = r \angle \theta = r e^{i\theta}\)
  • \(|z| = \sqrt{a^2 + b^2}\), \(\theta = \arg(z) = \operatorname{atan2}(b, a)\)
  • \(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\)
  • \(z_1 z_2 = (a_1 a_2 - b_1 b_2) + (a_1 b_2 + a_2 b_1)i\)
  • \(\frac{z_1}{z_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\)
Citations

Algebra calculators hub — calcdomain.com · Accessed 2026-01-19
https://calcdomain.com/subcategories/core-math-algebra-calculator

Statistics Calculator — calcdomain.com · Accessed 2026-01-19
https://calcdomain.com/statistics

Hyperbolic Functions Calculator — calcdomain.com · Accessed 2026-01-19
https://calcdomain.com/hyperbolic-functions

Square Calculator — calcdomain.com · Accessed 2026-01-19
https://calcdomain.com/square-calculator

Percent Error Calculator — calcdomain.com · Accessed 2026-01-19
https://calcdomain.com/percent-error-calculator

Changelog
  • 0.1.0-draft — 2026-01-19: Initial inspection draft generated from extracted legacy HTML.
  • 0.1.1 — 2026-02-01: Refactored to the canonical layout with improved validation and deterministic rounding.
Verified by Ugo Candido Last Updated: 2026-01-19 Version 0.1.1
Version 1.5.0