HomeMath › Complex Number Calculator

Complex Number Calculator

Performs arithmetic on two complex numbers written as strings such as '3+4i', or computes the modulus, conjugate or polar form of one, and reports the real and imaginary parts, modulus and argument of the result.

When to use

You need to combine complex numbers in rectangular form (a + bi), convert between rectangular and polar form, or find |z| and arg(z).

Do not use when: You want the complex roots of a polynomial (use quadratic-equation or cubic-equation) or trigonometric values of a real angle (use trigonometry).

Formula

(a+bi) ± (c+di) = (a±c) + (b±d)i; (a+bi)(c+di) = (ac − bd) + (ad + bc)i; (a+bi)/(c+di) = ((ac + bd) + (bc − ad)i) / (c² + d²); |z| = √(a² + b²); arg z = atan2(b, a); conj(z) = a − bi

Inputs

ParameterTypeUnitRequiredDescription
z1stringyesFirst complex number in rectangular form, e.g. '3+4i', '-2.5i', '7' or '1-i' (j is accepted for i).
z2stringnoSecond complex number; required for add, subtract, multiply and divide, ignored otherwise.
operationenum: add | subtract | multiply | divide | modulus | conjugate | polardefault addBinary operations use z₁ and z₂; modulus, conjugate and polar use z₁ only.

Outputs

OutputTypeUnitDescription
resultstringThe result in rectangular form, e.g. '-1+2i' (for polar: 'r∠θ°').
realnumberRe(result) (for polar: Re(z₁)).
imaginarynumberIm(result) (for polar: Im(z₁)).
modulusnumber√(real² + imaginary²) of the result.
argument_degreesnumber°atan2(imaginary, real) in degrees, in (−180°, 180°].
argument_radiansnumberradThe principal argument in radians.
polar_formstringThe result as 'r∠θ°' and 'r·e^(iθ)' with θ in radians (6 significant digits).
conjugatestringThe conjugate of the result (imaginary part negated).
expressionstringThe evaluated operation as text, e.g. '(3+4i) ÷ (1-2i) = -1+2i'.

Example

(3+4i) ÷ (1−2i): {"z1":"3+4i","z2":"1-2i","operation":"divide"}{"result":"-1+2i","real":-1,"imaginary":2,"modulus":2.236068,"argument_degrees":116.5651,"argument_radians":2.034444,"conjugate":"-1-2i","expression":"(3+4i) ÷ (1-2i) = -1+2i"}

Polar form of 3+4i: {"z1":"3+4i","operation":"polar"}{"result":"5∠53.1301°","real":3,"imaginary":4,"modulus":5,"argument_degrees":53.1301,"argument_radians":0.927295,"polar_form":"5∠53.1301° = 5·e^(0.927295i)"}

GET https://tttkmbb.com/api/v1/calculate/complex-numbers?z1=3%2B4i&z2=1-2i&operation=divide

Machine access

Sources

FAQ

How is division computed?

Numerator and denominator are multiplied by the conjugate of the divisor: (3+4i)/(1−2i) = (3+4i)(1+2i)/(1² + 2²) = (−5 + 10i)/5 = −1 + 2i.

Which range is the argument in?

The principal value from atan2, −180° < θ ≤ 180° (−π < θ ≤ π), measured counter-clockwise from the positive real axis.

Related calculators