
Powers and roots
Calculate a power or an integer-degree root in the real numbers.
Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.
Method and assumptions
Method version 1.0.0 · Updated
Power
Formula: bˣ
Decimal exponents are accepted for positive bases. Negative bases require integer exponents; 0⁰ and negative powers of zero are rejected. Approximate real calculation, without complex numbers. Example: 2³ = 8.
- base
- Base
- exponent
- Exponent
Root
Formula: ⁿ√x
Principal real root for a positive number. For a negative number, only odd degrees are accepted. Example: the cube root of −27 is −3. Results outside the numeric range are reported.
- value
- Number
- degree
- Root degree
Approximate real floating-point calculation; at most 12 significant digits displayed. Results outside the domain or numeric range are reported.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const power = 3 ** 4;
const root = Math.sqrt(81);
console.log(power, root); // 81 9TypeScript
const power = 3 ** 4;
const root = Math.sqrt(81);
console.log(power, root); // 81 9Python
power = 3 ** 4
root = 81 ** 0.5
print(power, root) # 81 9.0Java
double power = Math.pow(3, 4), root = Math.sqrt(81);
System.out.println(power + " " + root); // 81.0 9.0C#
double power = Math.Pow(3, 4), root = Math.Sqrt(81);
Console.WriteLine($"{power} {root}"); // 81 9