Complex Root Calculator
Find the principal nth root of a real number, negative or positive, as a complex number: its magnitude, real part and imaginary part, e.g. √−16 = 4i.
Complex Root Calculator
Background.
No real number multiplied by itself gives −16. A positive times a positive is positive, and so is a negative times a negative. Mathematicians got past the impasse by introducing i, defined by i² = −1, and with it the complex numbers a + bi. In that larger system the square root of −16 is simply 4i, because (4i)² = 16 × i² = −16.
Roots of negative numbers stop feeling strange once you picture numbers as points on a plane. A complex number has a size, its distance from zero, and a direction, its angle measured from the positive real axis. Positive numbers point at 0° and negative numbers at 180°. Taking an nth root does two things at once: it takes the ordinary nth root of the size, and it divides the angle by n. That is De Moivre's theorem run in reverse.
There is a catch that surprises most people the first time. Every nonzero number has exactly n different nth roots, spaced evenly around a circle 360° ÷ n apart. The number −8 has three cube roots: −2 and the pair 1 ± 1.732i. A calculator has to pick one, and the convention is the principal root, the one you get by dividing the input's own angle by n. For a negative input that angle is 180° ÷ n, so the principal cube root of −8 is 1 + 1.732i, not −2.
Here you enter a real number and a whole-number degree from 1 to 50, and get back the principal root's magnitude, real part and imaginary part. Complex inputs and the other n − 1 roots are left out, though the circle rule makes the others easy to find by hand.
What is complex root calculator?
The principal nth root of a real number x is the complex number whose nth power is x and whose angle is x's angle divided by n, taking 0° for positive x and 180° for negative x. Its magnitude is the ordinary nth root of |x|. For positive x it is the familiar positive real root. For negative x it lies at 180° ÷ n: purely imaginary when n is 2, and off both axes for any larger n, odd or even, which is why the principal cube root of a negative number is not a negative real number.
How to use this calculator.
- Enter the real radicand, the number under the root sign. Negative values are the interesting case; a positive value returns the ordinary positive root with an imaginary part of zero.
- Enter the root degree as a whole number from 1 to 50: 2 for a square root, 3 for a cube root, and so on. Fractional degrees are refused.
- Read the magnitude, then the real and imaginary parts, and write the root as real part + (imaginary part) i.
- To list the other roots, keep the same magnitude and keep adding 360° ÷ n to the angle, which for a negative input starts at 180° ÷ n.
The formula.
The principal root is |x|^(1/n) × [cos(θ ÷ n) + i sin(θ ÷ n)], where |x| is the absolute value of the input and θ is its angle in the complex plane: 0 for a positive number and π radians, 180°, for a negative one. The first factor is the magnitude of the root, an ordinary real nth root. The bracket sets its direction at θ ÷ n, and the cosine and sine of that angle, multiplied by the magnitude, give the real and imaginary parts. This is De Moivre's formula, (cos φ + i sin φ)^n = cos nφ + i sin nφ, used backwards: raising the answer to the nth power multiplies the angle back up to θ and the magnitude back up to |x|. As the degree rises the magnitude creeps toward 1 and the angle toward 0°, so the 50th root of −16 is about 1.0549 + 0.0664i.
A worked example.
Take x = −16 and n = 2. The magnitude is the ordinary square root of |−16|, √16 = 4. A negative number sits at 180° in the complex plane, so its principal square root sits at 180° ÷ 2 = 90°. The real part is 4 × cos 90° = 0 and the imaginary part is 4 × sin 90° = 4, so the root is 0 + 4i, or simply 4i. Checking: (4i)² = 16 × i² = −16. The other square root, a further 180° round the circle at 270°, is −4i. Change the degree to 4 and the magnitude becomes 16^(1/4) = 2, with an angle of 180° ÷ 4 = 45°. That gives 2 × cos 45° = 1.4142 for both parts, so the root is √2 + √2 i. Squaring it gives 4i, and squaring 4i gives −16 again.
Frequently asked questions.
Why is the principal cube root of −8 given as 1 + 1.732i instead of −2?
How do I find all n of the roots, not just the principal one?
Why does my code return NaN, or a complex number, for a negative number raised to 1/3?
Where do square roots of negative numbers come up in practice?
Can I use the same idea for a complex input such as 3 + 4i?
Is √−4 × √−9 equal to √36?
References& sources.
- [1]OpenStax, Rice University. College Algebra 2e, 2021. Algebra and function chapters. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- Principal n-th root: |z|^(1/n)[cos(arg(z)/n)+i sin(arg(z)/n)]
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled