Mathematics · Complex and Fourier

Principal Complex Root Calculator

Calculate the principal nth root of a complex number in polar form.

Runs locally
Your numbers

Inputs and results stay in this browser. Change one value at a time to explore the relationship.

Your inputCalculatedPassed forward in chains
Principal root real part0
Principal root imaginary coefficient1
Root magnitude1
Root phase1.570796

Calculation steps

  1. Magnitude=1; principal phase=3.141592653589793.
  2. Root magnitude=1^(1/2)=1; phase=3.141592653589793÷2=1.5707963267948966.
  3. Principal root=6.123233995736766e-17+(1)i.

Understand Principal complex root

One idea, three depths

Choose how deeply to explain Principal complex root

Principal complex root: Calculate the principal nth root of a complex number in polar form.

Age 5Explain it to a 5-year-oldStart with a picture

Imagine using Principal complex root to answer this question: calculate the principal nth root of a complex number in polar form? Enter Real part a, Imaginary part b, Root degree n; the calculator shows Principal root real part. For example: The principal square root of −1 is i. The answer tells you Principal root real part.

Age 15Explain it to a 15-year-oldConnect it to the formula

Taking an nth root divides the phase by n and takes the ordinary nth root of the magnitude. The rule is z^(1/n)=r^(1/n)[cos(θ/n)+i sin(θ/n)]. Its input values are Real part a, Imaginary part b, Root degree n, and the main result is Principal root real part. For example: The principal square root of −1 is i.

CollegeExplain it at college levelState the model precisely

This calculator evaluates the stated principal complex root relation over the valid mixed integer and real-number domain stated below. The implemented relation is z^(1/n)=r^(1/n)[cos(θ/n)+i sin(θ/n)], evaluated from Real part a, Imaginary part b, Root degree n to produce Principal root real part. Taking an nth root divides the phase by n and takes the ordinary nth root of the magnitude. A nonzero complex number has n distinct nth roots; this tool displays the principal root only.

Inputs and valid domain

  • Real part a must be a finite real number.
  • Imaginary part b must be a finite real number.
  • Root degree n must be an integer, at least 1.

Important boundary: A nonzero complex number has n distinct nth roots; this tool displays the principal root only.

The formula

z^(1/n)=r^(1/n)[cos(θ/n)+i sin(θ/n)]

How the calculator works through it

It substitutes Real part a, Imaginary part b, Root degree n into the formula and exposes every numerical step above. The main output is Principal root real part, accompanied by Principal root imaginary coefficient, Root magnitude, Root phase.

Read the result correctly

The Principal root real part is the direct answer to “calculate the principal nth root of a complex number in polar form.” Read it with the units shown beside the inputs; a sign, angle, percentage or rate changes what the number means.

A worked check

The principal square root of −1 is i.

Where this model stops being reliable

A nonzero complex number has n distinct nth roots; this tool displays the principal root only.

Learn it by changing one value

Begin with the worked example, then change one value while keeping the others fixed. Compare the new result and calculation steps to identify which part of the formula changed.

Dictionary terms behind this calculator

Before studying the codeWhat you should know firstUse the calculator immediately, or check the foundations before reading the implementation.

These foundations help you understand why Principal complex root works. They never block the calculator, and “optional” means useful context rather than a hidden requirement.

Hard requirements

  • Reading formulas and substituting values

    Principal complex root uses z^(1/n)=r^(1/n)[cos(θ/n)+i sin(θ/n)]. You need to recognise what each side represents before substituting the stated inputs or rearranging the relationship.

    Review this foundation about 4 min

Strong support

Optional enrichment

Learn the missing foundationsI already know these — show the code

Mathematics → algorithm → program

Implement this calculation in code

These are direct reference implementations of the calculator's principal relationship and first output. They run locally and include a small known-answer check where the language supports it.

Algorithm

  1. Read Real part a, Imaginary part b, Root degree n.
  2. Evaluate the principal relationship: z^(1/n)=r^(1/n)[cos(θ/n)+i sin(θ/n)].
  3. Return Principal root real part and check the domain conditions described above.
Python
            from math import *

def complex_nth_root(a, b, n) -> float:
    return (pow(sqrt(((a * a) + (b * b))), (1.0 / n)) * cos((atan2(b, a) / n)))

assert abs(complex_nth_root(-1, 0, 2) - 6.123233995736766e-17) < 1e-6 * max(1.0, abs(6.123233995736766e-17))
          
Current calculator valuesUpdates when you change an input above.
              
            
C
            #include <assert.h>
#include <math.h>

double complex_nth_root(double a, double b, double n) {
    return (pow(sqrt(((a * a) + (b * b))), (1.0 / n)) * cos((atan2(b, a) / n)));
}

int main(void) {
    const double expected = 6.123233995736766e-17;
    const double actual = complex_nth_root(-1, 0, 2);
    assert(fabs(actual - expected) < 1e-6 * fmax(1.0, fabs(expected)));
}
          
Current calculator valuesUpdates when you change an input above.
              
            
C++
            #include <cassert>
#include <cmath>
#include <numbers>

double complex_nth_root(double a, double b, double n) {
    return (std::pow(std::sqrt(((a * a) + (b * b))), (1.0 / n)) * std::cos((std::atan2(b, a) / n)));
}

int main() {
    constexpr double expected = 6.123233995736766e-17;
    const double actual = complex_nth_root(-1, 0, 2);
    assert(std::fabs(actual - expected) < 1e-6 * std::fmax(1.0, std::fabs(expected)));
}
          
Current calculator valuesUpdates when you change an input above.
              
            
Linux x86-64 assembly

x86-64 NASM · System V ABI · Linux · SSE2 with libm where required

            ; double complex_nth_root(double a, double b, double n)
; Linux x86-64 NASM · System V ABI · first eight doubles in xmm0–xmm7
extern pow
extern atan2
extern cos
global complex_nth_root
section .text

complex_nth_root:
    push rbp
    mov rbp, rsp
    sub rsp, 112
    movsd [rbp-8], xmm0
    movsd [rbp-16], xmm1
    movsd [rbp-24], xmm2
    movsd xmm0, [rbp-8]
    mulsd xmm0, [rbp-8]
    movsd [rbp-64], xmm0
    movsd xmm0, [rbp-16]
    mulsd xmm0, [rbp-16]
    movsd [rbp-72], xmm0
    movsd xmm0, [rbp-64]
    addsd xmm0, [rbp-72]
    movsd [rbp-56], xmm0
    sqrtsd xmm0, [rbp-56]
    movsd [rbp-48], xmm0
    mov rax, 0x3ff0000000000000
    movq xmm0, rax
    movsd [rbp-88], xmm0
    movsd xmm0, [rbp-88]
    divsd xmm0, [rbp-24]
    movsd [rbp-80], xmm0
    movsd xmm0, [rbp-48]
    movsd xmm1, [rbp-80]
    call pow wrt ..plt
    movsd [rbp-40], xmm0
    movsd xmm0, [rbp-16]
    movsd xmm1, [rbp-8]
    call atan2 wrt ..plt
    movsd [rbp-112], xmm0
    movsd xmm0, [rbp-112]
    divsd xmm0, [rbp-24]
    movsd [rbp-104], xmm0
    movsd xmm0, [rbp-104]
    call cos wrt ..plt
    movsd [rbp-96], xmm0
    movsd xmm0, [rbp-40]
    mulsd xmm0, [rbp-96]
    movsd [rbp-32], xmm0
    movsd xmm0, [rbp-32]
    leave
    ret
          
Current calculator valuesUpdates when you change an input above.
              
            
MATLAB
            function result = complex_nth_root(a, b, n)
    result = ((sqrt(((a * a) + (b * b))) ^ (1.0 / n)) * cos((atan2(b, a) / n)));
end
          
Current calculator valuesUpdates when you change an input above.
              
            
Wolfram Language
            ClearAll[mwCalculate];
mwCalculate[a_, b_, n_] := ((Sqrt[((a * a) + (b * b))] ^ (1.0 / n)) * Cos[(ArcTan[a, b] / n)]);
          
Current calculator valuesUpdates when you change an input above.
              
            

Continue in mathematical software

The downloaded file includes your current inputs and first calculated result. It is created locally.

Floating-point answers can differ slightly by language, compiler and processor. Compare within a suitable tolerance rather than assuming every decimal representation will be identical.

Reuse the page responsiblyCite this pageAPA, MLA, Chicago, Harvard, BibTeX and RIS

These formats cite this calculator page itself. They are separate from the academic references above, which support the mathematical method and terminology.

APA 7

MW SysArc. (2026, July 21). Principal Complex Root Calculator. MW SysArc Tools. https://math.mwsysarc.com/complex-fourier/principal-complex-root

MLA 9

MW SysArc. “Principal Complex Root Calculator.” MW SysArc Tools, 21 July 2026, https://math.mwsysarc.com/complex-fourier/principal-complex-root. Accessed 31 Aug. 2026.

Chicago 17

MW SysArc. “Principal Complex Root Calculator.” MW SysArc Tools. Published July 21, 2026. Accessed August 31, 2026. https://math.mwsysarc.com/complex-fourier/principal-complex-root.

Harvard

MW SysArc (2026) ‘Principal Complex Root Calculator’, MW SysArc Tools. Published 21 July 2026. Available at: https://math.mwsysarc.com/complex-fourier/principal-complex-root (Accessed: 31 August 2026).

BibTeX and RIS records

BibTeX

@misc{mwsysarc_complex_nth_root_2026,
  author = {{MW SysArc}},
  title = {Principal Complex Root Calculator},
  howpublished = {MW SysArc Tools},
  year = {2026},
  url = {https://math.mwsysarc.com/complex-fourier/principal-complex-root},
  note = {Published July 21, 2026; accessed August 31, 2026}
}

RIS

TY  - ELEC
AU  - MW SysArc
TI  - Principal Complex Root Calculator
T2  - MW SysArc Tools
PY  - 2026
DA  - 2026-07-21
Y2  - 2026-08-31
UR  - https://math.mwsysarc.com/complex-fourier/principal-complex-root
N1  - Published July 21, 2026
ER  -

Clear answers

Frequently asked questions

What does the Principal complex root do?

Calculate the principal nth root of a complex number in polar form.

How does the Principal complex root work?

The calculator applies z^(1/n)=r^(1/n)[cos(θ/n)+i sin(θ/n)]. Taking an nth root divides the phase by n and takes the ordinary nth root of the magnitude.

What can I learn from the Principal complex root?

It connects the mathematical rule to your chosen numbers and shows each calculation step. Change one input at a time to see how the result responds.

Does MW SysArc receive or store what I enter?

No. The calculation runs locally in your browser. MW SysArc does not receive or store your calculation inputs.

How should I use the result?

Use the steps to understand the method, then verify important school or professional work using the notation and rounding rules required in your setting.

Last reviewed . Calculations tested .

MW SysArc Certified