Exponent Calculator

The Exponent Calculator raises any base to any exponent — positive, negative, integer, decimal, very large, very small. Type the base and the exponent. The result updates as you type. When the answer gets big enough that normal decimal display would be unreadable, the calculator switches to scientific notation automatically. Edge cases (0 to a negative power, negative base with a fractional exponent) get clear, helpful error messages instead of NaN.

Built by Bob Article by Lace QA by Ben Shipped
210 =
1,024
210 means “2 multiplied by itself 10 times.”

How to use

  1. 1

    Type the base — any real number. Negative bases work with integer exponents (like (-2)^3 = -8) but not with fractional exponents (which would give complex numbers).

  2. 2

    Type the exponent — any real number. Integer, decimal, negative, all fine.

  3. 3

    Read the result. For very large or very small numbers, the display switches to scientific notation (e.g., 1.234e+45) automatically.

  4. 4

    Below the result, a one-line explainer reminds you what the operation means — useful for double-checking homework or sanity-checking a calculation.

Frequently asked questions

Ratings & Reviews

Rate this tool

Sign in to rate and review this tool.

Loading reviews…

What is an exponent?

An exponent tells you how many times to multiply a number by itself. The expression 2^3 — read "two to the third" or "two cubed" — means 2 × 2 × 2 = 8. The number being multiplied (2) is the base. The number telling you how many times (3) is the exponent. Together they make a power.

Exponents are compact. Writing 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 is annoying. Writing 2^10 is fast. And the moment you start dealing with very large or very small numbers — populations, atoms, computer memory, compound interest — exponents become the only practical way to write them down.

The rules generalize. The base doesn't have to be an integer (1.5^4 works). The exponent doesn't have to be positive (2^(-3) = 1/8) or even a whole number (9^(1/2) = 3, the square root). All of these are the same operation, just stretched into new territory.

How to use the Exponent Calculator

Type a base and an exponent. The result updates as you type. For very large or very small numbers, the display switches to scientific notation automatically so you don't have to count zeros.

  1. Type the base — any real number. Negative bases work with integer exponents (so (-2)^3 = -8 is fine), but not with fractional exponents (which would give complex numbers).
  2. Type the exponent — any real number. Integer, decimal, negative, all fine.
  3. Read the result. Numbers above ~10¹⁵ or below ~10⁻⁴ display in scientific notation (like 1.234e+45).
  4. Below the result, a one-line explainer reminds you what the operation means — handy for double-checking homework.

Edge cases get useful error messages instead of cryptic NaNs. 0 to a negative power is rejected (it would be division by zero). Negative base with a fractional exponent is rejected (would require complex numbers). Inputs that overflow JavaScript's number range get a clear "result too large" notice.

The formula

x^n = x × x × x × … × x (n times)

That's the integer case. For non-integer exponents, the definition extends via the exponential and logarithm functions: x^n = e^(n ln x). You don't need to know that to use the calculator, but it's why fractional exponents work and why negative bases break under fractional exponents.

Worked example: compute 2^10.

  • 2^1 = 2
  • 2^2 = 4
  • 2^3 = 8
  • 2^4 = 16
  • … doubling each step …
  • 2^10 = 1024

This particular power shows up everywhere in computing. A kilobyte was originally 1024 bytes (2^10) before the industry standardized on 1000. A megabyte (under the old definition) was 2^20 = 1,048,576 bytes. The doubling pattern is why we have powers of two memorized at every scale.

Negative exponents

A negative exponent means "divide instead of multiply." The rule:

x^(-n) = 1 / x^n

So 2^(-3) = 1 / 2^3 = 1/8 = 0.125. The arithmetic flips: each step up in the exponent multiplies by x; each step down divides by x. Starting from x^1 = x, dividing by x gives x^0 = 1 (anything to the zero is 1 — yes, even weird numbers, with one exception we'll get to). Divide again and you get x^(-1) = 1/x. And so on.

This is why scientific notation works in both directions. 3 × 10^8 is 300,000,000 (the speed of light in meters per second). 3 × 10^(-8) is 0.00000003. Same magnitude information, opposite scale.

Fractional exponents (and roots)

A fractional exponent is a root. The rule:

x^(1/n) = n-th root of x

So 9^(1/2) is the square root of 9, which is 3. 27^(1/3) is the cube root of 27, also 3. 16^(1/4) is the fourth root of 16, which is 2. The denominator of the exponent tells you which root.

More generally, x^(a/b) is the b-th root of x raised to the a-th power. So 8^(2/3) = (cube root of 8)^2 = 2^2 = 4. Or you can do it the other way around: (8^2)^(1/3) = 64^(1/3) = 4. Same answer either way.

The reason negative bases don't work with fractional exponents: (-4)^(1/2) would be the square root of -4, which is imaginary (2i, in complex-number notation). The calculator stays in the real numbers and gives an error instead of a confusing partial answer. If you actually need complex arithmetic, you need a different tool — Python's cmath module, JavaScript's complex.js library, or a CAS like Mathematica.

Powers of two — a reference table

Powers of 2 come up so often in computing that having the first twenty memorized is genuinely useful. Networking limits, memory sizes, hash table capacities — they're almost always powers of two.

n2^nCommon use
12
24
38Octal base / byte = 8 bits
416Hex base / nibble values
532
664Chessboard squares / 64-bit registers
7128ASCII range / signed-byte max + 1
8256Byte values / IPv4 octet range
9512
101,024"Kilo" in computing (old definition)
112,048
124,096Page size on most CPUs
138,192
1416,384
1532,768Signed 16-bit max + 1
1665,53616-bit address space
17131,072
18262,144
19524,288
201,048,576"Mega" in computing (old)

Past 20, you start using shorthand: 2^32 is the IPv4 address space (~4.3 billion), 2^64 is the 64-bit address space (~18 quintillion), 2^256 is the SHA-256 hash space (a number with 78 digits). The calculator handles all of these — though anything past 2^1023 overflows to infinity because JavaScript's largest double-precision number is about 1.8 × 10^308.

Other useful powers

A few more bases worth knowing:

ExpressionValueNotes
10^2100"Hundred"
10^31,000"Thousand" / kilo (SI)
10^61,000,000Million / mega
10^91,000,000,000Billion / giga
10^12Trillion / tera
3^29
3^327"Three cubed"
5^225
5^3125
e^1≈ 2.718Euler's number (the base of natural log)
e^(iπ)-1Euler's identity (complex)

Where exponents actually show up

Outside math class, here's where you'll see exponents in the wild:

  • Compound interest. A balance growing at rate r per period over n periods is P × (1 + r)^n. The ^n is what makes compounding so different from simple interest — it's exponential growth, not linear.
  • Computer storage. Every memory size you've ever heard of (KB, MB, GB, TB) is a power of 2 or a power of 10, depending on which standard you follow.
  • Half-lives. Radioactive decay follows N(t) = N₀ × (1/2)^(t/T) where T is the half-life. After one half-life, half remains. After two, a quarter. After ten, about 0.1% — which is why "ten half-lives" is the rule of thumb for "essentially gone."
  • Earthquake magnitudes. The Richter scale is logarithmic, meaning each unit is a 10x increase in amplitude (and roughly a 32x increase in energy). A magnitude 7 quake releases ~1000× more energy than a magnitude 5.
  • Population growth. Anything growing at a constant percentage rate grows exponentially. "10% per year" sounds modest until you realize that's 1.1^t, which doubles every ~7 years.
  • Algorithm complexity. When a programmer says an algorithm is "O(2^n)," they mean it gets impractical fast. Doubling n doesn't double the work — it squares it.

The weird edge cases

Three corners of exponent math that trip people up:

  • 0^0. By the convention this calculator uses, 0^0 = 1. The argument: in combinatorics and discrete math, x^0 always means "the empty product," which is 1 by convention. In calculus, the function x^y is discontinuous at (0,0), so some textbooks call it undefined. For homework and most software, treat 0^0 as 1. For limit problems, treat it as undefined and apply L'Hôpital's rule.
  • Negative base with fractional exponent. (-4)^(1/2) is asking for the square root of -4, which is imaginary. The calculator gives an error. (-8)^(1/3) is technically -2 (the real cube root exists), but the way fractional exponents are usually computed under the hood goes through complex logarithms, which still produce a complex result. Different software handles this differently; the safest convention is "negative base with non-integer exponent → error."
  • Anything^0. Equals 1, including 1^0 and (-7)^0 and (π)^0. The only debated case is 0^0 above. Everything else is 1, full stop.

Floating point and precision

For integer base and integer exponent results that fit in JavaScript's safe-integer range (up to about 9 × 10¹⁵), the answer is exact. Past that, you start losing precision in the last few digits. For fractional exponents, the result is always a floating-point approximation — usually accurate to 15-17 significant digits, but with the usual floating-point caveats (0.1 + 0.2 isn't exactly 0.3, and similar small errors creep in).

For homework, the precision is more than enough. For financial settlement or cryptographic constants, you need a different tool — Python's decimal module, JavaScript's BigInt for integer cases, or an arbitrary-precision library like decimal.js.

Related calculators

Exponents live in a neighborhood with several other operations.

  • Root Calculator — the inverse operation. If x^n = y, then the n-th root of y is x. Same math, expressed the other way.
  • Square Root Calculator — the specific case n = 2, which is so common it gets its own tool.
  • Log Calculator — the other inverse. If x^n = y, then log_x(y) = n. Useful when you know the result and need the exponent.
  • Percentage Calculator — for compound-interest-style calculations where the exponent is the number of periods.

Frequently asked questions

What does x^n mean?

x multiplied by itself n times, when n is a positive integer. So x^3 = x × x × x. When n is 0, the result is 1 (anything to the zero is 1). When n is negative, x^(-n) = 1 / x^n. When n is fractional, x^(1/n) is the n-th root of x. The calculator handles all of these.

What does a negative exponent mean?

It's a reciprocal: x^(-n) = 1 / x^n. So 2^(-3) = 1/8 = 0.125. Each step down in the exponent divides by x. Going from x^1 to x^0 divides by x once (giving 1). Going one more step gives x^(-1) = 1/x. For bases bigger than 1, negative exponents always give values between 0 and 1.

What does a fractional exponent mean?

x^(1/n) is the n-th root of x. So 9^(1/2) is the square root of 9 (which is 3). 27^(1/3) is the cube root of 27 (also 3). More generally, x^(a/b) is the b-th root of x raised to the a-th power. This is why fractional exponents on negative bases give errors — you can't take a real square root of a negative number.

Why does my huge number display weirdly?

It switched to scientific notation. JavaScript can represent numbers up to about 1.8 × 10^308. Anything past about 10^15 in normal display would be a wall of digits, so the calculator switches to compact notation like 1.234e+45, which means 1.234 × 10^45. The precision is still about 15-17 significant digits.

Why is 0^0 = 1 here?

Because the discrete-math convention says so, and that's what most homework, calculators, and programming languages use. The argument: x^0 is the empty product, which by convention equals 1 regardless of x. Some calculus textbooks treat 0^0 as undefined because the function is discontinuous there. If you're doing a limit problem, treat it as undefined and use L'Hôpital. For everything else, 1 is the right answer.

Why does (-2)^0.5 give an error?

Because the answer is the square root of -2, which is imaginary (≈ 1.414i). This calculator works in the real numbers. Negative bases with integer exponents are fine — (-2)^3 = -8 computes without issue. Only non-integer exponents on negative bases trigger the error. If you need complex arithmetic, you need a different tool.

Why does my number say infinity?

You exceeded JavaScript's largest representable number, about 1.8 × 10^308. Examples that overflow: 10^310, 2^1024, anything beyond about 700 digits long. For genuinely huge integer powers — like 2^10000 for cryptography — you need a BigInt library. JavaScript's built-in BigInt handles arbitrary-size integers, but only for integer exponents.

How precise is the result?

For integer base and integer exponent within JavaScript's safe range (up to about 9 × 10¹⁵), the answer is exact. For fractional exponents, the result is a floating-point approximation accurate to 15-17 significant digits. For homework, that's plenty. For financial or cryptographic precision, use a decimal or arbitrary-precision library.