HomeMath › Nth Root Calculator

Nth Root Calculator

Computes the principal n-th root of a number (value^(1/n)), returning the real negative root for odd n and the second, negative root for even n.

When to use

You need √x, ∛x or any integer-degree root, including odd roots of negative numbers.

Do not use when: You need a fractional power such as x^(2/3) (use exponent) or the solutions of a quadratic (use quadratic-equation).

Formula

root = |value|^(1/n) × sign(value); for even n and value > 0 the roots are ±root

Roots that are exact integers are snapped to the integer when |value|^(1/n) is within 10^-9 of it and the integer power reproduces value exactly.

Inputs

ParameterTypeUnitRequiredDescription
valuenumberyesThe number under the root sign. Negative values are allowed only for odd n. Range: ≥ -1e+300, ≤ 1e+300
nintegeryes2 for square root, 3 for cube root, etc. Range: ≥ 1, ≤ 1000

Outputs

OutputTypeUnitDescription
rootnumberThe real n-th root with the same sign as value.
negative_rootnumber−root: the second real root, present only for even n and positive value.
verificationnumberThe root raised back to the n-th power (should equal value).
expressionstringThe root as text, e.g. '16^(1/4) = 2'.

Example

Fourth root of 16: {"value":16,"n":4}{"root":2,"negative_root":-2,"verification":16,"expression":"16^(1/4) = 2"}

Fifth root of −32: {"value":-32,"n":5}{"root":-2,"verification":-32}

GET https://tttkmbb.com/api/v1/calculate/nth-root?value=16&n=4

Machine access

Sources

FAQ

Why does the square root of a negative number fail?

Even roots of negative numbers are imaginary (√−4 = 2i); only odd roots of negatives are real, e.g. ∛−27 = −3.

Why are there two answers for an even root?

Both 2 and −2 satisfy x⁴ = 16. The principal root is the positive one; negative_root gives the other.

Related calculators