Nth root calculator

Negatives are allowed - see the note below.
2 is the square root, 3 the cube root.
Result

Why negatives need care. Most calculators return an error for the cube root of −8, because the usual method goes through logarithms and the logarithm of a negative number is not real. But −2 × −2 × −2 is −8, so the answer exists. An odd root of a negative number is worked out on the magnitude and given its sign back. An even root of a negative number genuinely has no real answer - nothing multiplied by itself an even number of times comes out negative - and this says so rather than showing you NaN.


The case most calculators get wrong

Ask almost any calculator for the cube root of −8 and it returns an error. Ask it in a spreadsheet and you get #NUM!. In a browser, Math.pow(-8, 1/3) gives NaN.

But −2 × −2 × −2 = −8, so the answer plainly exists. The refusal is an artefact of how the calculation is done: raising to a fractional power goes through logarithms, and the logarithm of a negative number is not a real number. The mathematics is fine; the method is not.

This tool takes an odd root of a negative number on the magnitude and puts the sign back, which gives the answer you were asking for.

When there genuinely is no answer

An even root of a negative number has no real value, and that is not a limitation of the tool. Nothing multiplied by itself an even number of times comes out negative, because the minus signs pair off. The square root of −9 requires imaginary numbers. This says so in words rather than showing NaN and leaving you to guess whether it broke.

The same is true of a fractional root of a negative number, and of the 0th root of anything, which is undefined.

Negative roots

A negative n is a reciprocal: the −3rd root of 8 is 1 divided by the cube root of 8, which is 0.5. These are handled too.

Exact or rounded, and which

Most roots are irrational — they cannot be written exactly as a decimal. The result is raised back to the power you asked for and shown underneath, labelled exact or rounded. If it says rounded, the displayed digits are correct but the true value continues.

Related tools

See the percentage calculator for the other common everyday arithmetic job.