Exact arithmetic on fractions — and an honest account of the two quantities that cannot be.
Complex arithmetic, exactly
Fractions stay fractions; a zero is a true zero.
Operation
Write i or j. Fractions like 1/2 are exact. Polar input is not accepted — it would make the answer inexact without saying so.
(3 + 4i) × (1 − 2i)
11 − 2i
Real part 11, imaginary part −2.
|z|² (exact)
125
always a rational number
|z|
5√5
exact
arg z
−10.30485°
−0.179853 rad, the fourth quadrant
Conjugate
11 + 2i
inverse 11/125 + (2/125)i
The working
Expand as you would any two binomials.(a + bi)(c + di) = ac + adi + bci + bd·i²
Use i² = −1, which turns the last product into a REAL term.= (ac − bd) + (ad + bc)i = (3×1 − 4×−2) + (…)i = 11 − 2i
The same answer in polar form
11.1803(cos −10.3048° + i sin −10.3048°)
11.1803e^(−0.179853i)
These are decimals, and deliberately so: the modulus and argument of a general complex number are irrational, and rendering them as exact would be a lie.
The i² = −1 substitution is the whole difference from ordinary FOIL: the fourth product moves from the imaginary part to the real one, with its sign flipped.
|z|² = 125 is exact, but its square root is not a rational number — so the modulus is written as the surd 5√5, with the decimal beside it.
The rectangular result above is exact: both parts are fractions, computed on integers. Only the polar figures are approximations.
Decimal check: 11 − 2i
What this tool shows
Exact arithmetic on fractions — including division, where the conjugate is the working rather than a trick.
The four operations and integer powers, all exact on rational parts
Division worked through the conjugate, with the real denominator shown
Polar form beside rectangular, with the approximation marked as one
|z|² exact and |z| as a surd wherever it is not rational
Exact, on fractions The conjugate step shown Powers without drift Free, no signup
Free, no signup — rectangular results are exact fractions.
Updated 6 September 2026 · Works in any browser, no installation
Complex arithmetic is ordinary algebra plus one substitution: i² = −1. (3 + 4i) × (1 − 2i) = 11 − 2i, and (1 + i)^8 = 16exactly — not 15.999999999999996, which is what a decimal route gives.
At a glance
Formula shown
(a + bi)(c + di) = (ac \u2212 bd) + (ad + bc)i, and (a + bi) \u00f7 (c + di) = (a + bi)(c \u2212 di) \u00f7 (c\u00b2 + d\u00b2).
Scenario support
Complex numbers with rational parts, and integer exponents from \u221220 to 20.
Educational estimate
Planning support from the values you enter — not professional advice.
Why exactness is the point of this page
Most complex calculators work in floating point, and for most purposes that is fine. It stops being fine the moment an answer is supposed to be exact and comes out nearly so.
(1 + i)^8 is 16. A decimal route gives 15.999999999999996, and a reader checking their working sees a discrepancy that is not there. (i)^4 is exactly 1, closing the four-step cycle i, −1, −i, 1 rather than approximately closing it.
(1/2 + (1/3)i) × (2 − i) = 4/3 + (1/6)i keeps its fractions rather than turning into 1.3333333 + 0.16666667i. When that result feeds a further step, the difference compounds; when it is the answer, the fraction is what was asked for.
i² = −1 is the whole difference
Multiplying two complex numbers is the same four products as multiplying two binomials. The only new thing is what happens to the fourth one.
In (a + bi)(c + di) the last product is bd·i², and since i² = −1 it becomes −bd — a REAL term, with its sign flipped. So it moves out of the imaginary part and into the real one, which is why the formula reads (ac − bd) + (ad + bc)i with that minus in front.
The i² = −1 substitution is the whole difference from ordinary FOIL: the fourth product moves from the imaginary part to the real one, with its sign flipped.
Addition has no such interaction: (3 + 4i) + (1 − 2i) = 4 + 2i, real with real and imaginary with imaginary. It is only multiplication where the two parts mix.
Division needs the conjugate, and that is not a trick
Multiply top and bottom by the conjugate of the denominator, 3 + 4i. The bottom becomes (3 − 4i)(3 + 4i) = 25, a REAL number — which is the entire point of the manoeuvre, because a real denominator can be divided into both parts.
The step is not a shortcut for complex division — it IS complex division. Every method reduces to making the denominator real, because dividing by a real number is the only division you can actually perform componentwise.
It is also why the complex numbers are a FIELD: every non-zero z has an inverse, z̄/|z|², and that expression is available because z·z̄ is always real and never zero. (1 + 2i) ÷ (3 − 4i) = −1/5 + (2/5)i, an exact fraction in both parts.
The Complex Conjugate Calculator works through what else the conjugate does — the sum and difference identities, the reflection geometry, and the conjugate root theorem.
Powers, and what De Moivre actually says
De Moivre reads the same answer geometrically: the modulus is raised to the power and the argument is multiplied by it. Here |z| = √2 becomes 16, and arg z = 45° becomes 360°. This engine multiplies out instead, because that keeps the answer exact — De Moivre through a decimal argument would not.
De Moivre is the right way to UNDERSTAND a power — raising to the nth stretches the modulus by the nth power and multiplies the argument by n, which is a rotation and a scaling — and the wrong way to compute one when exactness matters, because the argument is irrational for almost every input.
Negative powers invert: (i)^4 closes the cycle at 1, and (1+i)⁻² is the reciprocal of (1+i)². Both stay exact, because inverting an exact Gaussian rational gives another one.
Polar form, and where exactness genuinely stops
Two quantities on this page are not exact, and the distinction is worth being clear about:
|z|² is exact. It is a² + b², a rational number. For 11 − 2i it is 125.
|z| usually is not. Its square root is irrational unless |z|² happens to be a perfect square. Where a surd form exists, the page gives it: 5√5.
arg z almost never is. It is an arctangent, irrational for all but a handful of angles, and is given as a decimal.
So the rectangular answer is exact and the polar figures beside it are approximations, and the page labels them that way rather than printing both to the same number of decimals and letting the reader assume.
Why complex numbers are not an optional extra
They are often introduced as a device for handling √−1, which makes them sound like a convenience. They are not. Once admitted, EVERY polynomial of degree n has exactly n roots — the fundamental theorem of algebra — and the exceptions vanish.
The consequences reach back into problems with no complex numbers in them. Cardano’s formula for a cubic with three real roots passes through complex numbers on the way, unavoidably; that is the casus irreducibilis. Real answers, complex route, no alternative.
And they are the natural language for anything rotating. Multiplying by a unit complex number is a rotation of the plane, which is why they run alternating-current analysis, signal processing and quantum mechanics. The Quaternion Calculator covers the four-dimensional extension that does the same job in three dimensions.
Sources and methodology
Complex arithmetic and De Moivre are standard; the reference below carries the canonical statements.
Method. Every figure on this page comes from src/lib/complex-number.ts over the exact Gaussian-rational arithmetic in src/lib/algebra/complex.ts, which stores each part as a fraction of big integers. Division multiplies by the conjugate and divides by the exact rational norm; powers are computed by repeated multiplication rather than through De Moivre, so no decimal enters the rectangular result at any point. That engine is verified on every change against 59 hand-written assertions, including that (1+i)⁸ comes out as exactly 16 and that division followed by multiplication returns the original number exactly. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Complex ConjugateThe conjugate, and everything it does: the sum, difference, product and quotient identities computed on your number, the reflection geometry, and the real quadratic behind conjugate root pairs.
Complex RootAll n roots of any complex number by De Moivre, exact wherever a root is a Gaussian rational, arranged as the regular n-gon they form, with the sum and product checked.
QuaternionExact quaternion arithmetic showing both pq and qp every time, both quotients rather than one, and the rotation a unit quaternion represents with axis, angle, matrix and the gimbal-lock case named.
Quadratic FormulaSolve any quadratic with exact roots — surds stay surds and a negative discriminant gives the complex pair — plus the vertex, the factored form and every step of the working.
Cubic EquationSolve any cubic exactly when it has a rational root — deflate and finish with the quadratic formula — and by the trigonometric form when it does not, with the discriminant saying which case you are in.
DiscriminantEvaluate b² − 4ac, the cubic and quartic discriminants, or D = f_xx·f_yy − (f_xy)² for the second-derivative test, in exact arithmetic so the sign is never a rounding artefact.
This calculator performs exact arithmetic on complex numbers with rational real and imaginary parts, including integer powers from −20 to 20. The rectangular results are exact fractions. The polar figures — modulus and argument — are decimals, because they are irrational for most inputs; the page marks which is which rather than presenting both as equally precise.
Published the complex number page: the four operations and integer powers on exact Gaussian rationals, so (1 + i)⁸ is 16 rather than 15.999999999999996.
Shows the conjugate trick as the working for division — the denominator becoming real is the whole reason complex division is closed — rather than hiding it in a result.
States where exactness genuinely ends: |z|² is exact, its square root usually is not, and the argument is an arctangent.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.