- Home
- /
- Math & Conversions
- /
- Core Math Algebra
- /
- Complex Number Calculator
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
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:
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:
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\):
Geometrically, addition corresponds to vector addition in the complex plane.
Multiplication
In rectangular form:
In polar form, multiplication is especially simple. If \(z_1 = r_1 \angle \theta_1\) and \(z_2 = r_2 \angle \theta_2\), then
Division
For non-zero \(z_2\), division in rectangular form is:
In polar form:
again highlighting why polar form is natural for division and phasor calculations.
Complex conjugate
The complex conjugate of \(z = a + bi\) is
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\).
- Compute the magnitude: \[|z| = \sqrt{(-3)^2 + 4^2} = \sqrt{9 + 16} = 5.\]
- Compute the argument using \(\operatorname{atan2}\): \[\theta = \operatorname{atan2}(4, -3) \approx 2.2143\ \text{rad} \approx 126.87^\circ.\]
- 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: