Complex Number Calculator

Add, subtract, multiply, divide, power, and convert complex numbers instantly.

Results are calculated automatically as you enter data.

z1

z1 = 3 + 4i

z2

Operation
Formula and details
Result 4 + 2i

Ready

Re Im

Drag z1 (blue) and z2 (amber). Result is green.

▼ See explanations and tips below ▼

What Are Complex Number Arithmetic and Rectangular-Polar Conversion?

A complex number is a number with two parts: a real part and an imaginary part. It is usually written in rectangular form as \(a + bi\), where \(a\) is the real part, \(b\) is the imaginary coefficient, and \(i\) is the imaginary unit with:

$$ i^2 = -1 $$

Complex numbers can also be understood as points or vectors on the complex plane. The horizontal coordinate is the real part, and the vertical coordinate is the imaginary part. For example, \(3 + 4i\) is the point \((3, 4)\) on the complex plane.

Rectangular form is useful when adding, subtracting, multiplying, and dividing by separating real and imaginary parts. Polar form is useful when thinking about distance and direction. In polar form, a complex number is written using a radius \(r\) and an angle \(\theta\):

$$ z = r(\cos \theta + i\sin \theta) $$

The same number can be written in either form. Rectangular form tells you “how far right or left” and “how far up or down.” Polar form tells you “how far from the origin” and “in what direction.”


Why Complex Numbers Matter

Complex numbers make it possible to work with quantities that cannot be represented on the real number line alone. They appear in algebra, trigonometry, electrical engineering, signal processing, control systems, quantum mechanics, and many other areas where rotation, oscillation, waves, or two-dimensional transformations are important.

For students, complex numbers connect several topics that may otherwise feel separate: coordinate geometry, vectors, trigonometry, powers, roots, and exponential notation. Seeing the same number as both \(a + bi\) and \(r(\cos \theta + i\sin \theta)\) helps explain why some operations are easier in rectangular form and others are easier in polar form.


Key Terms to Know

  • Complex number: A number of the form \(a + bi\), where \(a\) and \(b\) are real numbers.
  • Imaginary unit: The number \(i\), defined by \(i^2 = -1\).
  • Real part: The \(a\) in \(a + bi\); it is the horizontal coordinate on the complex plane.
  • Imaginary part: The \(b\) in \(a + bi\); it is the vertical coordinate on the complex plane.
  • Complex plane: A coordinate plane where the horizontal axis is the real axis and the vertical axis is the imaginary axis.
  • Modulus or magnitude: The distance from the origin to the complex number, written \(|z|\).
  • Argument: The angle of a nonzero complex number measured from the positive real axis. The argument of \(0\) is undefined.
  • Complex conjugate: The number formed by changing the sign of the imaginary part. The conjugate of \(a + bi\) is \(a - bi\).
  • Rectangular form: The form \(a + bi\).
  • Polar form: The form \(r\angle\theta\) or \(r(\cos \theta + i\sin \theta)\).
  • Euler form: The form \(re^{i\theta}\), which is another way to write polar form.
  • Principal angle: A commonly chosen representative angle for a nonzero complex number, since adding full turns such as \(360^\circ\) or \(2\pi\) gives the same direction.

How Complex Number Arithmetic and Conversion Work

Let:

$$ z_1 = a + bi $$

and:

$$ z_2 = c + di $$

Addition and subtraction are component-by-component operations. Add or subtract the real parts, then add or subtract the imaginary parts:

$$ z_1 + z_2 = (a + c) + (b + d)i $$
$$ z_1 - z_2 = (a - c) + (b - d)i $$

Multiplication works like multiplying binomials, with the important rule \(i^2 = -1\):

$$ z_1z_2 = (a + bi)(c + di) $$
$$ z_1z_2 = (ac - bd) + (ad + bc)i $$

Division uses the conjugate of the denominator. Multiplying by the conjugate turns the denominator into a real number:

$$ \frac{z_1}{z_2} = \frac{a + bi}{c + di} $$
$$ \frac{z_1}{z_2} = \frac{(ac + bd) + (bc - ad)i}{c^2 + d^2} $$

This formula only works when \(z_2 \ne 0 + 0i\), because division by zero is undefined.

The modulus of a complex number is its distance from the origin:

$$ |z| = \sqrt{a^2 + b^2} $$

The conjugate reflects the complex number across the real axis:

$$ \overline{z} = a - bi $$

To convert from rectangular form to polar form, find the radius and angle:

$$ r = \sqrt{a^2 + b^2} $$
$$ \theta = \operatorname{atan2}(b, a) $$

For every nonzero value, this calculator uses the principal angle returned by atan2, normally in \((-180^\circ, 180^\circ]\). On the negative real axis it preserves the signed-zero branch side: \(-1 + 0i\) displays \(180^\circ\), while \(-1 - 0i\) can display \(-180^\circ\). At the origin, \(r = 0\) and the argument is undefined, so the calculator reports the angle as undefined rather than assigning a direction.

Then write:

$$ z = r(\cos \theta + i\sin \theta) $$

To convert from polar form back to rectangular form, use:

$$ a = r\cos \theta $$
$$ b = r\sin \theta $$

so that:

$$ z = r\cos \theta + i(r\sin \theta) $$

Mathematics often uses radians for formulas, while many calculator inputs use degrees for polar angles. To convert between them:

$$ \theta_{\text{degrees}} = \theta_{\text{radians}} \times \frac{180}{\pi} $$
$$ \theta_{\text{radians}} = \theta_{\text{degrees}} \times \frac{\pi}{180} $$

Polar form makes multiplication, division, and integer powers especially compact. If \(z_1 = r_1\angle\theta_1\) and \(z_2 = r_2\angle\theta_2\), then:

$$ z_1z_2 = r_1r_2\angle(\theta_1 + \theta_2) $$
$$ \frac{z_1}{z_2} = \frac{r_1}{r_2}\angle(\theta_1 - \theta_2) $$

For integer powers, De Moivre’s theorem gives:

$$ z^n = r^n(\cos(n\theta) + i\sin(n\theta)) $$

For negative integer powers, the base must be nonzero because a negative power means taking a reciprocal.


Examples of Complex Numbers in Practice

Example 1: Adding and Multiplying in Rectangular Form

Let:

$$ z_1 = 3 + 4i $$

and:

$$ z_2 = 1 - 2i $$

For addition, combine matching parts:

$$ (3 + 4i) + (1 - 2i) = (3 + 1) + (4 - 2)i $$
$$ (3 + 4i) + (1 - 2i) = 4 + 2i $$

For multiplication, distribute and use \(i^2 = -1\):

$$ (3 + 4i)(1 - 2i) = 3 - 6i + 4i - 8i^2 $$

Since \(i^2 = -1\), the term \(-8i^2\) becomes \(+8\):

$$ 3 - 6i + 4i + 8 = 11 - 2i $$

The sum is \(4 + 2i\), and the product is \(11 - 2i\).


Example 2: Converting \(3 + 4i\) to Polar Form and Squaring It

Start with:

$$ z = 3 + 4i $$

Find the modulus:

$$ r = \sqrt{3^2 + 4^2} $$
$$ r = \sqrt{9 + 16} = \sqrt{25} = 5 $$

Find the angle:

$$ \theta = \operatorname{atan2}(4, 3) \approx 53.130102^\circ $$

So the polar form is approximately:

$$ z \approx 5\angle 53.130102^\circ $$

To square the number using De Moivre’s theorem, square the radius and double the angle:

$$ z^2 \approx 5^2\angle(2 \times 53.130102^\circ) $$
$$ z^2 \approx 25\angle 106.260204^\circ $$

In rectangular form, this is:

$$ (3 + 4i)^2 = -7 + 24i $$

Both forms describe the same result: rectangular form gives coordinates, while polar form gives distance and direction.


Example 3: Division and a Zero-Division Edge Case

Divide:

$$ \frac{2 + 3i}{4 - i} $$

Use the conjugate of the denominator, \(4 + i\):

$$ \frac{2 + 3i}{4 - i} \times \frac{4 + i}{4 + i} $$

The denominator is:

$$ (4 - i)(4 + i) = 4^2 + 1^2 = 17 $$

The numerator is:

$$ (2 + 3i)(4 + i) = 8 + 2i + 12i + 3i^2 $$
$$ 8 + 14i - 3 = 5 + 14i $$

So:

$$ \frac{2 + 3i}{4 - i} = \frac{5 + 14i}{17} $$
$$ \frac{2 + 3i}{4 - i} = \frac{5}{17} + \frac{14}{17}i $$

If the denominator were \(0 + 0i\), the denominator formula \(c^2 + d^2\) would equal \(0\). That is why division by \(0 + 0i\) is undefined.


How to Interpret the Result

A rectangular result such as \(11 - 2i\) gives the real and imaginary coordinates directly. The real part \(11\) is the horizontal coordinate, and the imaginary coefficient \(-2\) is the vertical coordinate.

A polar result such as \(5\angle 53.13^\circ\) gives a distance and a direction. The radius \(5\) means the point is 5 units from the origin. The angle \(53.13^\circ\) gives the direction measured from the positive real axis.

A modulus result is always nonnegative because it is a distance. A larger modulus means the point is farther from the origin. A modulus of \(0\) means the complex number is exactly at the origin.

A conjugate result changes only the sign of the imaginary part. For example, the conjugate of \(3 + 4i\) is \(3 - 4i\). On the complex plane, this is a reflection across the real axis.

For arithmetic operations, the graph helps you see the numbers as vectors from the origin. Addition can be visualized with a parallelogram-style idea, while subtraction can be understood as the vector difference between two points.

If a result is shown as invalid, the issue is usually a validation problem such as division by \(0 + 0i\), a negative polar radius, a non-integer power, an exponent outside the allowed range, or a non-finite input.


Common Mistakes and Misconceptions

  • Confusing the imaginary part with the full term \(bi\): In \(3 + 4i\), the imaginary part is \(4\), not \(4i\).
  • Forgetting that \(i^2 = -1\): This is the most common source of multiplication errors.
  • Treating the modulus as the real part: The modulus of \(3 + 4i\) is \(5\), not \(3\).
  • Using radians when the input expects degrees: Polar angle inputs use degrees. Formula explanations may use radians, so check the angle unit before entering a value.
  • Expecting \(z_2\) to affect every operation: Addition, subtraction, multiplication, and division use both \(z_1\) and \(z_2\). Modulus, conjugate, polar conversion, and power use \(z_1\) only.
  • Trying to divide by \(0 + 0i\): Division by zero is undefined for complex numbers, just as it is for real numbers.
  • Using a decimal exponent for the power operation: The power operation uses integer exponents only.
  • Entering a negative radius in polar mode: Standard polar input uses a nonnegative radius. A negative radius can be represented by changing the angle, but it is not accepted as a radius input here.
  • Rounding too early: Rounding the radius, angle, or rectangular components too soon can change the final result, especially for powers and division.
  • Assuming a polar angle is unique: Angles that differ by full turns represent the same direction. For example, \(30^\circ\) and \(390^\circ\) point in the same direction. The argument of \(0\) is not an angle and is undefined.

When to Use Complex Number Arithmetic and Conversion

Use complex number arithmetic when you need to:

  • add, subtract, multiply, or divide numbers of the form \(a + bi\);
  • convert a complex number between rectangular and polar form;
  • find the modulus, argument, or conjugate of a complex number;
  • visualize complex numbers as points or vectors on the complex plane;
  • raise a complex number to an integer power;
  • check hand calculations for algebra, trigonometry, precalculus, or introductory engineering work;
  • understand rotations, magnitudes, and phase angles in a mathematical setting.

Rectangular form is usually easiest for addition and subtraction. Polar form is usually easiest for multiplication, division, powers, and understanding rotations.


Limitations and Things to Keep in Mind

Complex-number calculations here are dimensionless. The calculator does not infer physical units, electrical units, or engineering context. If your complex number represents a physical quantity such as impedance, voltage, or a signal amplitude, interpret the result using the rules and units of that subject.

Angles in polar input are degrees. Some mathematical formulas and detailed explanations use radians because radians are standard in trigonometric and exponential formulas. The calculator reduces finite degree inputs modulo \(360^\circ\) before trigonometric conversion, so coterminal angles use the same direction even when the entered angle is very large. Always check which angle unit you are using.

The power operation is limited to integer exponents from \(-30\) to \(30\). It does not evaluate fractional powers, general complex exponentials, logarithms, or all possible complex roots. Those operations can be multi-valued and require additional choices about branches or root indexing.

Negative integer powers require a nonzero base in the usual mathematical sense, because they involve reciprocals. The zero exponent returns \(1\); for the special case \(0^0\), this is a calculator convention and should not be treated as a universal mathematical rule.

Division by \(0 + 0i\) is undefined and is blocked. Negative polar radius inputs are also blocked. Empty numeric fields are treated as \(0\), so an empty field is not the same as an ignored field. Numeric fields accept finite decimal or exponent notation, including comma decimals such as \(1,5\); malformed or partial entries such as \(1e\) are rejected rather than treated as \(0\).

Displayed results may be rounded to significant precision, but a fixed absolute display threshold does not turn small finite inputs or results into \(0\). When graph handles are dragged, coordinates snap to one decimal place, so the graph is best understood as a visual aid rather than an exact symbolic proof.

Very large inputs or results may be too large to calculate safely. If a mathematically valid result cannot be graphed at a safe scale, the result remains available and the graph is marked unavailable. The downloadable graph image also depends on browser support for image export features.


How to Use This Calculator

  1. Choose rectangular mode to enter real and imaginary parts, or polar mode to enter radius and angle in degrees.
  2. Enter \(z_1\). For addition, subtraction, multiplication, or division, also enter \(z_2\).
  3. Choose an operation: add, subtract, multiply, divide, power, modulus, conjugate, or polar.
  4. For the power operation, enter an integer \(n\) from \(-30\) to \(30\).
  5. Review the main result, status message, and formula details.
  6. Use the complex-plane graph to compare \(z_1\), \(z_2\) when used, and the result vector.
  7. Drag the graph handles or use arrow keys to adjust values visually. Small keyboard moves change coordinates by \(0.1\), and larger shifted moves change them by \(1\).
  8. Use presets for sample problems, swap \(z_1\) and \(z_2\) when needed, reset to the default values, or download the graph as a PNG.

Frequently Asked Questions

What is the difference between rectangular form and polar form?

Rectangular form, \(a + bi\), gives the horizontal and vertical coordinates of the complex number. Polar form, \(r\angle\theta\), gives the distance from the origin and the direction angle. They are two ways to describe the same point on the complex plane.


Why is the modulus always nonnegative?

The modulus is a distance from the origin, so it cannot be negative. For \(z = a + bi\), the modulus is \(\sqrt{a^2 + b^2}\), which is zero only when both \(a\) and \(b\) are zero.


Why does the conjugate help with division?

Multiplying a complex number by its conjugate removes the imaginary part from the product. For \(c + di\), the product with \(c - di\) is \(c^2 + d^2\), a real number. That makes it possible to rewrite a complex quotient in rectangular form.


Why do two different polar angles sometimes represent the same number?

Angles repeat every full turn. Adding \(360^\circ\) or \(2\pi\) radians to an angle points in the same direction, so a complex number has many equivalent polar angle descriptions. A calculator usually displays one convenient representative angle.


Can this calculator find complex roots or fractional powers?

No. The power operation is for integer powers only, within the allowed exponent range. Complex roots and fractional powers can have multiple values, so they require a method that accounts for all branches or all roots.


Why does \(z_2\) not change the modulus, conjugate, polar, or power result?

Those are unary operations, which means they use only one complex number. In this calculator, unary operations use \(z_1\). The second complex number \(z_2\) is used only for addition, subtraction, multiplication, and division.


Sources and References

Books and Textbooks

  1. Jay Abramson. Precalculus 2e. OpenStax, Rice University, 2021. Sections 3.1 “Complex Numbers” and 8.5 “Polar Form of Complex Numbers”.
  2. Ted Sundstrom and Steven Schlicker. Trigonometry. Grand Valley State University, via Mathematics LibreTexts. Chapter 5, Section 5.3 “DeMoivre’s Theorem and Powers of Complex Numbers”.

Online and Educational Sources

  1. Massachusetts Institute of Technology OpenCourseWare. “Complex Numbers and Euler’s Formula.” 18.03SC Differential Equations, Fall 2011. Accessed June 28, 2026.