Home › Math › 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
z1 | string | yes | First complex number in rectangular form, e.g. '3+4i', '-2.5i', '7' or '1-i' (j is accepted for i). | |
z2 | string | no | Second complex number; required for add, subtract, multiply and divide, ignored otherwise. | |
operation | enum: add | subtract | multiply | divide | modulus | conjugate | polar | default add | Binary operations use z₁ and z₂; modulus, conjugate and polar use z₁ only. |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
result | string | The result in rectangular form, e.g. '-1+2i' (for polar: 'r∠θ°'). | |
real | number | Re(result) (for polar: Re(z₁)). | |
imaginary | number | Im(result) (for polar: Im(z₁)). | |
modulus | number | √(real² + imaginary²) of the result. | |
argument_degrees | number | ° | atan2(imaginary, real) in degrees, in (−180°, 180°]. |
argument_radians | number | rad | The principal argument in radians. |
polar_form | string | The result as 'r∠θ°' and 'r·e^(iθ)' with θ in radians (6 significant digits). | |
conjugate | string | The conjugate of the result (imaginary part negated). | |
expression | string | The 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
- API:
GET https://tttkmbb.com/api/v1/calculate/complex-numbers(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/complex-numbers · Markdown: https://tttkmbb.com/math/complex-numbers.md · JSON definition: https://tttkmbb.com/math/complex-numbers.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="complex-numbers" - OpenAPI operationId:
calculate_complex_numbers - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
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
- Quadratic Equation Solver — Source of complex conjugate roots.
- Cubic Equation Solver — Cubics with a complex root pair.
- Trigonometry Calculator — cos θ and sin θ used in the polar form.