Complex Number Calculator
Complex Number Calculator
Add, subtract, multiply and divide complex numbers, convert between a + bi and polar form, raise them to powers, find all the nth roots, and work with impedances written with j. Every result comes with the working and an Argand diagram.
Numbers may be typed as 3, −2.5, sqrt(3) or pi/4. Negative angles and moduli of 0 are fine; a modulus cannot be negative.
Argand diagram
A complex number a + bi has modulus r = √(a² + b²) and principal argument θ = atan2(b, a) in the range −180° to 180°, so the negative real axis has argument 180°. Product: multiply the moduli and add the arguments. Quotient: divide the moduli and subtract the arguments. De Moivre: zn = rn(cos nθ + i sin nθ). The nth roots are r1/n at angles (θ + 360° k) ÷ n. For a real exponent that is not a whole number the answer is the principal value. Values smaller than 1 × 10−12 of the size of the answer are rounding noise and are shown as 0. The CSV, image and printed report contain the values you entered, nothing preloaded.
How to use this tool
Pick a mode from the first menu: arithmetic on two numbers, conversion of one number, powers, roots, exp and ln with Euler’s identity, or engineering with j. Powers takes any real exponent, and Roots lists every nth root and draws them on a circle. Engineering writes numbers as resistance and reactance and combines two impedances in series or in parallel, or works out a series RLC circuit from its parts.
Type each part as a plain number, or as an expression such as sqrt(3) or pi/4, and switch “Enter numbers as” to polar when you have a length and an angle. The input people most often get wrong is the angle unit. An angle of 30 typed with radians selected is 1,718.87°, which points 81.13° below the positive real axis, not 30° above it. Two other slips are common: the imaginary part is entered as the number 4, not “4i”, and a modulus cannot be negative, so to point the other way add 180° to the angle.
What the calculation is doing
A complex number a + bi has a real part a and an imaginary part b, with i defined by i² = −1. Plot it as the point (a, b) and it becomes an arrow from the origin on the Argand plane. The arrow’s length is the modulus r = √(a² + b²). Its angle from the positive real axis is the argument θ, found with atan2(b, a) so that the quadrant comes out right, and then a = r cos θ and b = r sin θ.
Adding and subtracting work part by part, so rectangular form is the natural choice. Multiplying gives (a + bi)(c + di) = (ac − bd) + (ad + bc)i, which is ordinary expansion with i² = −1. In polar form the same product is easier to picture: multiply the moduli and add the arguments. Dividing multiplies top and bottom by the conjugate of the denominator, so (a + bi)/(c + di) = (a + bi)(c − di)/(c² + d²) and the denominator becomes a real number. In polar form you divide the moduli and subtract the arguments.
Powers use De Moivre’s theorem, zn = rn[cos nθ + i sin nθ], which also covers negative n because z−n is the reciprocal of zn. A power that is not a whole number is defined through the logarithm, zx = exp(x ln z), and the calculator gives the principal value. Roots come from the nth root theorem: the n roots all have modulus r1/n and arguments (θ + 360°k) ÷ n for k = 0 to n − 1. Finally ea+bi = ea(cos b + i sin b), and ln z = ln|z| + i arg z.

Why the argument has a range, and what that does to roots and powers
An angle has endless equivalent values: 45°, 405° and −315° all point the same way. The calculator reports the principal argument, the one in the range from −180° up to and including 180°, or −π to π in radians. The seam is the negative real axis. The number −1 has argument +180°, never −180°, while a point just below the axis such as −1 − 10⁻⁹i has an argument within a millionth of a degree of −180°. Cross the seam and the argument jumps by 360°, so a sum of arguments that leaves the range is brought back by subtracting 360°.
The same choice settles what “the” root of a number means. Every nonzero number has n nth roots, spread evenly around a circle of radius r1/n, and Roots mode shows all of them. The Powers mode returns one, the principal value, which uses the principal argument divided by n. That is why (−8)1/3 comes out as 1 + 1.7321i and not −2. Both are cube roots of −8, and Roots mode with n = 3 lists 1 + 1.7321i, −2 and 1 − 1.7321i. The real cube root you may expect from a school textbook is just one of the three.
Logarithms carry the same ambiguity. The principal value of ln(−1) is 3.1416i, and every other logarithm of −1 is that plus 2πk i for a whole number k, because adding a full turn does not change the number. That is the general logarithm Ln z = ln z + 2πk i in NIST’s Digital Library of Mathematical Functions. The ln mode prints the principal value and a table of neighbouring values so the multiple is visible. The exponent in Powers mode is a real number.
Common angles as complex numbers on the unit circle
Each entry is cos θ + i sin θ, so each has modulus 1. Multiplying any number by one of them turns it through that angle without changing its size. That is the quickest way to remember what multiplying by i does: i is the 90° row, so it turns a number a quarter turn anticlockwise. The −90° row is the same point as 270°.
| Angle | Radians | Exact form | Decimal form |
|---|---|---|---|
| 0° | 0 | 1 | 1 |
| 30° | π/6 | √3/2 + i/2 | 0.866 + 0.5i |
| 45° | π/4 | √2/2 + i√2/2 | 0.7071 + 0.7071i |
| 60° | π/3 | 1/2 + i√3/2 | 0.5 + 0.866i |
| 90° | π/2 | i | i |
| 120° | 2π/3 | −1/2 + i√3/2 | −0.5 + 0.866i |
| 135° | 3π/4 | −√2/2 + i√2/2 | −0.7071 + 0.7071i |
| 150° | 5π/6 | −√3/2 + i/2 | −0.866 + 0.5i |
| 180° | π | −1 | −1 |
| −90° | −π/2 | −i | −i |
A worked example you can check on paper
The default view multiplies z = 3 + 4i by w = 2 − i. Expand it: 3 × 2 = 6, 3 × (−i) = −3i, 4i × 2 = 8i, and 4i × (−i) = −4i² = +4. The real part is 6 + 4 = 10 and the imaginary part is −3 + 8 = 5, so the product is 10 + 5i.
Now check it in polar form. |z| = √(9 + 16) = 5 and arg z = atan2(4, 3) = 53.1301°. |w| = √5 = 2.236068 and arg w = atan2(−1, 2) = −26.5651°. Multiply the moduli: 5 × 2.236068 = 11.18034. Add the angles: 53.1301° + (−26.5651°) = 26.5651°. The rectangular answer agrees, since |10 + 5i| = √125 = 11.18034 and atan2(5, 10) = 26.5651°.
Division works the other way round. For (1 + 2i) ÷ (3 − 4i), multiply top and bottom by 3 + 4i. The top is (1 + 2i)(3 + 4i) = 3 + 4i + 6i + 8i² = −5 + 10i, and the bottom is 3² + 4² = 25. The answer is −5/25 + 10i/25 = −0.2 + 0.4i, which is one of the Try another buttons in the tool.
For roots, take the fourth roots of −16. The modulus is 161/4 = 2 and the arguments are (180° + 360°k) ÷ 4 = 45°, 135°, 225° and 315°. Each root has real and imaginary parts of size 2 cos 45° = √2 = 1.4142, so the roots are ±1.4142 ± 1.4142i, the four corners of a square.
Mistakes that catch people out
Dividing the parts separately. (1 + 2i) ÷ (3 − 4i) is not 1/3 + (2/−4)i, which would give 0.3333 − 0.5i. The correct answer is −0.2 + 0.4i. Use the conjugate, or divide the moduli and subtract the angles.
Forgetting that angles wrap. Multiplying a number at 120° by one at 90° gives 210°, but the principal argument is −150°. Both describe the same point, and the tool shows the principal one.
Expecting one square root. Every nonzero number has two square roots, and a calculator key gives only the principal one. The square roots of 3 + 4i are 2 + i and −2 − i. Roots mode shows both.
Confusing |z|² with z². For 3 + 4i, |z|² = 25 is a real length squared, while z² = −7 + 24i is a complex number.
Getting the sign of reactance wrong. An inductor adds +jωL and a capacitor adds −j/(ωC). With 250 Ω, 650 mH and 1.5 µF at 60 Hz, XL is 245.04 Ω and XC is 1,768.39 Ω, so the net reactance is −1,523.34 Ω. The circuit is capacitive and the current leads the voltage.
Popular calculations
Each link opens the calculator with those numbers filled in and the working shown. You can change any number once it is open.
Add and subtract
Multiply
Divide
Rectangular and polar form
Powers
Roots
Exponential, logarithm and Euler
AC circuits
How this was checked
The arithmetic was tested against independent routes. The identities |zw| = |z||w|, arg(zw) = arg z + arg w modulo 360°, z times its conjugate = |z|² and (z ÷ w)w = z held on thousands of random pairs, with a worst relative error of 5.9 × 10⁻¹⁶. De Moivre powers matched repeated multiplication for n = 1 to 40 within 1.6 × 10⁻¹⁴. For 1,500 random numbers with 1 to 60 roots, each root raised to the nth power returned the original within 8.6 × 10⁻¹⁴, and exp(ln z) = z held within 6.6 × 10⁻¹⁶. The parallel formula Z1Z2/(Z1 + Z2) matched 1/(1/Z1 + 1/Z2) within 1.9 × 10⁻¹⁵.
Published examples were reproduced. OpenStax Algebra and Trigonometry 2e, section 2.4, gives (4 + 3i)(2 − 5i) = 23 − 14i and (2 + 5i) ÷ (4 − i) = (3 + 22i)/17. OpenStax Precalculus 2e, section 8.5, gives 4 cis 80° × 2 cis 145° = −4√2 − 4√2i, which the tool returns as −5.656854 − 5.656854i. It also gives 2 cis 213° ÷ 4 cis 33° = −1/2, (1 + i)5 = −4 − 4i and the cube roots of 8 cis(2π/3), all matched. All About Circuits prints a series RLC example at 250 Ω, 650 mH, 1.5 µF and 60 Hz with Z = 1543.7 Ω at −80.68°, against the tool’s 1543.7218 Ω at −80.6801°. Its parallel case, 470 Ω with −j1523.35 Ω, prints 449.11 Ω at −17.147°, against 449.110 Ω at −17.1466°.
Conventions follow Wikipedia’s article on the argument of a complex number, which uses the range (−π, π], and section 4.2 of the NIST Digital Library of Mathematical Functions for the logarithm and general powers. The j convention and impedance formulas follow Wikipedia’s articles on the imaginary unit and electrical impedance. Numbers are double precision, about 15 to 16 significant digits, and a part smaller than 10⁻¹² of the larger part is shown as 0. A sweep of 9,000 random inputs across every mode, including blanks and text, never produced NaN or Infinity, and every address above was opened and checked for a distinct title and a chart that renders.
Common questions
What is a complex number?
A number of the form a + bi, where a and b are real numbers and i is defined by i² = −1. The real part a is the position along the horizontal axis and the imaginary part b is the position up the vertical axis, so every complex number is a point on a plane. Real numbers are the special case b = 0.
How do you divide complex numbers?
Multiply the top and bottom by the conjugate of the bottom, which turns the denominator into a real number. OpenStax works (2 + 5i) ÷ (4 − i) this way: (2 + 5i)(4 + i) = 3 + 22i on top and (4 − i)(4 + i) = 17 below, so the answer is (3 + 22i)/17, about 0.1765 + 1.2941i.
What are the modulus and argument of a complex number?
The modulus is the distance from the origin, √(a² + b²). The argument is the angle from the positive real axis, atan2(b, a). For 3 + 4i the modulus is 5 and the argument is 53.1301°, so the polar form is 5 ∠ 53.1301°. The calculator reports the principal argument, in the range −180° to 180° with 180° included.
How many nth roots does a complex number have?
Exactly n, unless the number is zero. They share one modulus, r to the power 1/n, and their arguments are spaced 360° ÷ n apart, so they form a regular polygon on a circle. The cube roots of 8 are 2, −1 + 1.7321i and −1 − 1.7321i, which sit 120° apart on a circle of radius 2.
Why do engineers write j instead of i?
Because i already means current in circuit work. An impedance is written Z = R + jX, with R the resistance and X the reactance, and the calculator has a switch that changes every i in the results to j. The mathematics is the same, and Wikipedia records the convention in its article on the imaginary unit.
What is e to the power iπ?
It equals −1, which is Euler’s identity, and it follows from e^(iθ) = cos θ + i sin θ with θ = π. A floating point calculation actually returns −1 + 1.2246 × 10⁻¹⁶i. The calculator shows −1, since it treats a part that is smaller than 10⁻¹² of the larger part as rounding noise and displays it as 0.
Related Calculators and Reference
- Quadratic Formula Calculator: a negative discriminant gives a conjugate pair of complex roots, which you can bring back here to add, multiply or convert.
- Trig Calculator: the sine, cosine and inverse tangent behind the polar form.
- Vector Calculator: two dimensional vectors add and scale in the same way as complex numbers.
- Ohm Law Calculator: the direct current case, before reactance turns resistance into impedance.
- Power Factor Correction Calculator: correcting the lagging power factor of an inductive load.
- OpenStax Precalculus 2e, section 8.5: the textbook chapter on polar form, products, De Moivre’s theorem and roots.
