Exponent Calculator
Show the math
What Your Result Means
- xn: The result of raising the base to the given power. For positive integer exponents, this is the base multiplied by itself n times (e.g., 2³ = 2 × 2 × 2 = 8).
- Negative exponents: A negative exponent means the reciprocal — x⁻ⁿ = 1/xⁿ. For example, 2⁻³ = 1/8 = 0.125.
- Fractional exponents: A fractional exponent represents a root — x^(1/n) is the nth root of x. For example, 27^(1/3) = 3 (the cube root of 27).
- Special cases: Any number to the power of 0 equals 1. Zero to any positive power equals 0. Zero to the power of 0 is conventionally defined as 1.
How This Calculator Works
You enter a base (x) and an exponent (n). The tool computes x^n using JavaScript's Math.pow function, which follows IEEE-754 double-precision floating-point arithmetic. It handles negative bases, negative exponents, and fractional exponents. Results are displayed with up to 12 significant digits. Very large results overflow to Infinity and very small results may underflow to 0.
Quick Questions
Why does a negative base with a fractional exponent show "undefined"?
In real number arithmetic, a negative number raised to a fractional power (like (−8)^(1/3)) may not have a real result depending on the denominator. JavaScript's Math.pow returns NaN for negative bases with non-integer exponents, so this calculator displays "undefined" in those cases.
What is the largest number this can compute?
JavaScript doubles can represent numbers up to about 1.8 × 10³⁰⁸. Beyond that, the result overflows to Infinity. For example, 10³⁰⁹ will display as ∞.
Is 0⁰ really equal to 1?
Mathematically, 0⁰ is sometimes considered indeterminate, but by convention (and in JavaScript's Math.pow), it returns 1. This convention is standard in combinatorics, set theory, and most programming languages.
How precise are the results?
Results use IEEE-754 double-precision, which provides about 15–17 significant decimal digits. The display is capped at 12 significant digits to avoid showing floating-point rounding artifacts.
Sources
- Wikipedia — Exponentiation (definitions, rules, and special cases)
- MDN — Math.pow() (JavaScript implementation details)
Method & review
Estimate only. Results reflect your inputs and standard formulas. Double-check important decisions independently.