Math
Square root & nth root calculator
Enter a number and the root degree (2 for square root, 3 for cube root, any positive integer for nth root). The calculator shows the value at 12-digit precision and tells you whether the result is an exact integer.
Formula
The nth root of x is the number r such that r^n = x. The square root (n=2) is the most familiar — square roots of 1, 4, 9, 16, 25 are perfect integers; anything else is irrational and the calculator shows a decimal approximation.
For negative inputs, odd roots are defined (cube root of −8 is −2) but even roots are not real numbers — they'd require complex arithmetic, which this calculator skips. We use Math.pow(x, 1/n) internally, which is accurate to full double precision (~15 significant digits) and handles the sign correctly for odd roots.
'Exact' detection rounds the result and checks whether r^n equals x exactly. It's correct for any input that fits in a double, which covers numbers up to about 2^53 (~9 × 10^15).
Examples
- 01√256→ 16 (exact — 16 × 16 = 256)
- 02√2→ 1.414213562373… (irrational)
- 03Cube root of 1000→ 10 (exact — 10³ = 1000)
- 044th root of 16→ 2 (exact — 2⁴ = 16)
- 05Cube root of −27→ −3 (exact)
FAQ
- √2 is irrational — it cannot be expressed exactly as a fraction or terminating decimal. The first 10 digits are 1.4142135623, and the digits continue forever without repeating. Our display is accurate to floating-point precision (~15 digits).