Exponent calculator
Enter a base and an exponent to get x^y. Whole exponents are computed with exact integer arithmetic, so 2^100 shows all 31 digits. Negative, decimal and fractional exponents such as 1/3 are supported too.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Type the base. It can be negative or have decimals.
- Type the exponent as a whole number, a decimal or a fraction like 1/3.
- Read x^y. For big results you also get E-notation, the exact digits (the first 1,000 are shown; Copy takes all of them) and the digit count.
How it works
- Whole exponent: the base digits are raised to the power with arbitrary-precision integers and the decimal point is put back, so no rounding happens. For a negative exponent the reciprocal is taken, and the decimal is exact when the denominator only has the factors 2 and 5.
- Other exponents: the result uses double-precision floating point and is shown with 15 significant digits.
- Results beyond about 1.8 × 10³⁰⁸ cannot be computed in floating point and are reported as too large; exact whole-number results are limited by their length, not by size.
Worked example
2^100: 1,267,650,600,228,229,401,496,703,205,376. That is 31 digits, or 1.26765060022823 × 10³⁰ in scientific notation.
Rules worth remembering
- x^a × x^b = x^(a+b), and (x^a)^b = x^(a×b).
- x^0 = 1 for any x other than 0, here 0^0 = 1 as well.
- An even power of a negative number is positive: (-2)^4 = 16; an odd power is negative: (-2)^3 = -8.
Frequently asked questions
What does x to the power of y mean?
For a positive whole y, x^y is x multiplied by itself y times, so 2^10 = 1024. For y = 0 the result is 1. A negative y means a reciprocal, x^-y = 1 / x^y, so 2^-3 = 1/8 = 0.125.
How are fractional exponents handled?
A fractional exponent is a root: x^(1/2) is the square root and x^(1/3) the cube root. Type the exponent as 1/3 to avoid typing a rounded decimal. These results use floating point and carry about 15 significant digits.
When is the answer exact?
When the exponent is a whole number and the result has at most about 100,000 digits. The result is then computed with big-integer arithmetic, and a terminating decimal such as 1.5^2 = 2.25 or 2^-3 = 0.125 is shown in full. Results such as 3^-1 never terminate and are rounded to 15 digits.
What is 0 to the power of 0?
This calculator returns 1, the usual convention in algebra and in most programming languages, though in analysis 0^0 is sometimes treated as indeterminate. A zero base with a negative exponent is an error.
Why is a negative base with a fractional exponent an error?
For example (-8)^(1/3) has a real cube root, -2, but in general a negative number raised to a fractional power is not a real number. This calculator only returns real results and reports an error instead.