Mathematics calculator

Complex Number Calculator

Add, subtract, multiply, or divide two complex numbers, or find the principal square root of one complex number.

Calculator inputs

Enter your values

a + bi
Enter complex-number coefficients
First number
Second number
Calculated output

Result summary

Your result will appear here

Complete the required fields and select the calculate button.

Complex number plotted with real and imaginary components on the complex plane
The real component lies on the horizontal axis and the imaginary coefficient on the vertical axis.

What Is a Complex Number?

This calculator adds, subtracts, multiplies, and divides complex numbers written as a + bi. It also finds a principal square root of a single complex number. Each operation treats i as the imaginary unit, for which i² = −1.

Enter coefficients rather than an entire typed expression. For example, 3 − 2i uses 3 in the real field and −2 in the imaginary field. The calculator returns a real component and an imaginary component, rounded to four decimal places. This makes it useful for checking a hand calculation while retaining the structure of a complex answer.

How to Calculate with Complex Numbers

  1. Choose Addition, Subtraction, Multiplication, Division or Principal square root in Operation.
  2. Enter the first number’s real component a and imaginary coefficient b. For 5 − 2i, enter 5 and −2, with no letter i in the fields.
  3. For an operation using two numbers, enter c and d for the second number c + di. Principal square root hides and ignores this second pair.
  4. Select Calculate. Read the combined result together with its real component, imaginary coefficient, operation and modulus.

Division requires a nonzero second complex number: c and d cannot both be zero. Root mode returns one principal square root, not every root and not an arbitrary root index. All result components and the modulus round to four decimals, so retain exact coefficients when checking an identity.

Complex Arithmetic and Square Root Formulas

Addition: (a + bi) + (c + di) = (a + c) + (b + d)i

Subtraction: (a + bi) − (c + di) = (a − c) + (b − d)i

Multiplication: (a + bi)(c + di) = (ac − bd) + (ad + bc)i

Division: (a + bi)/(c + di) = (ac + bd)/(c² + d²) + [(bc − ad)/(c² + d²)]i

For a root: M = √(a² + b²); u = √((M + a) ÷ 2)

Imaginary root magnitude |v| = √((M − a) ÷ 2)

Result modulus |u + vi| = √(u² + v²)

The imaginary unit satisfies i² = −1. For the principal square root, v takes the sign of b; if b = 0 and a is negative, the page chooses the positive imaginary root. Division requires c² + d² ≠ 0.

The OpenStax complex numbers chapter explains arithmetic and conjugates. The root formula follows by solving (u + vi)² = a + bi with u nonnegative. Result modulus uses the unrounded output components before four-decimal display rounding.

Real and Imaginary Components Explained

Operation
Selects one of four two-number arithmetic operations or the principal square root of the first number.
First number a + bi
a is its real component; b is the signed coefficient of i. Enter coefficients only.
Second number c + di
c and d supply the second real and imaginary coefficients. Both are ignored in root mode.
Complex result
Featured value written as real + signed imaginary coefficient × i, rounded to four decimals.
Real component
Real part of the result, rounded to four decimals.
Imaginary component
Signed coefficient of i in the result. A negative value belongs after a minus sign in standard notation.
Result modulus
Nonnegative magnitude of the unrounded complex result, rounded to four decimals. It is not an argument or phase angle.

Complex Number Calculation Examples

Illustrative example. Multiply z = 5 − 2i by w = −1 + 3i. Enter a = 5, b = −2, c = −1 and d = 3.

The real component is 5 × (−1) − (−2 × 3) = 1. The imaginary coefficient is 5 × 3 + (−2 × −1) = 17. The product is 1 + 17i, with modulus √290 ≈ 17.0294.

Using the same operands for division gives −1.1 − 1.3i. In a separate root example, 3 − 4i has principal square root 2 − i, since (2 − i)² = 3 − 4i.

Calculation check. These illustrative results were checked independently against the formula and calculator response. Keep unrounded intermediate values when repeating the calculation.

Complex Number Calculation Examples
Selected operationResult
z + w4 + i
z − w6 − 5i
z × w1 + 17i
z ÷ w−1.1 − 1.3i
Principal root of 3 − 4i2 − i

Principal Square Root and Both Equation Solutions

Principal square root selects one value. Solving x² = z usually requires its positive and negative counterparts. At z = 0 those two values coincide. These examples describe the distinction; the root mode returns the principal value only.

Principal Square Root and Both Equation Solutions
Input zPrincipal rootOther square root
3 − 4i2 − i−2 + i
−255i−5i
00Same zero

How to Check a Complex Result

The answer is a number with two components, not two competing answers. A result of 13 − 13i has real part 13 and imaginary coefficient −13. If one component is zero, you can simplify the notation: 4 + 0i is 4, and 0 + 6i is 6i.

Use an inverse operation to check your work. Adding w back to z − w should recover z. Multiplying a quotient by its denominator should recover the numerator, apart from rounding. For square roots, square the displayed result and compare with the original input.

The square-root result is one selected root. Except at zero, the negative of that result is the other square root. A request to solve x² = z therefore usually needs both values, even though the Root box displays just the principal one.

Common Complex Number Mistakes

Keep the order of subtraction and division: z − w differs from w − z, and z/w generally differs from w/z. Do not multiply corresponding coefficients alone; multiplication includes cross terms and the i² term.

Four-decimal rounding can hide a very small component. Retain exact fractions in formal work when available, especially if a later calculation subtracts nearly equal quantities. The calculator handles numeric coefficients, not symbolic expressions such as √2 entered directly into a number field.

Frequently Asked Questions

Can I calculate with ordinary real numbers here?

Yes. Enter zero for both imaginary coefficients. The arithmetic then reduces to the familiar real-number operation, although the display may retain a zero imaginary term.

Why does multiplying two imaginary terms change the real part?

Their product contains i², which equals −1. For example, (2i)(−5i) = −10i² = 10. That real contribution is essential in the worked multiplication example.

Does Root return both square roots?

No. It returns the principal selection. For 3 + 4i that is 2 + i; the other root is −2 − i. Both square to the same original number.

What happens when the divisor is purely imaginary?

Division is allowed provided its imaginary coefficient is nonzero. For example, 1/i = −i because multiplying −i by i gives 1. Only a divisor with both components zero is undefined.

What does the result modulus mean?

It is the nonnegative magnitude √(real² + imaginary²). The page computes it from the unrounded result components, then rounds it to four decimals.

Can the second number be zero?

It can for addition, subtraction or multiplication. It cannot be 0 + 0i for division. Root mode uses only the first number.

Can I enter a full expression such as 5 − 2i?

Enter the two numeric coefficients separately: 5 for the real part and −2 for the imaginary coefficient. Do not type i into a numeric field.

Does this calculator return polar form or phase?

No. It returns rectangular form, the component values and result modulus. It does not calculate an argument or polar phase angle.

Sources and References