Type =0^0 into a cell in Excel and it answers #NUM!. Type the identical operation into Excel’s own VBA console and it answers 1. The two engines ship in the same product, written by the same company, and they disagree about the same arithmetic. Python answers 1. Wolfram Mathematica answers Indeterminate. The IEEE 754 floating-point standard answers 1 twice and NaN once, depending on which of its three power functions you call.

So: what is 0 to the power of 0? The honest answer is that 00=10^0 = 1 as the value of the expression, and that this is the near-universal convention in algebra, combinatorics, and set theory, where it is not so much chosen as forced. In analysis, 000^0 is an indeterminate form, which is a statement about limits and not about values: knowing that f(x)→0f(x) \to 0 and g(x)→0g(x) \to 0 tells you nothing about where f(x)g(x)f(x)^{g(x)} is heading. These two claims are not in conflict. They are answers to different questions, and every argument about 000^0 that has ever gone in circles has gone in circles because the two questions were not separated first.

Counting functions: where the value 1 comes from

Start with what an exponent means before calculus gets involved. For a positive integer nn, the expression bnb^n is a product of nn copies of bb. That definition extends downward by one very natural step: b0b^0 is the product of no copies of bb at all, and the product of an empty collection is the multiplicative identity, 11. This is the empty product convention, and it is the same convention that makes 0!=10! = 1 and makes the sum of an empty collection equal to 00. Notice that nothing in that argument cared what bb was. The familiar schoolbook derivation, b0=bm/bm=1b^0 = b^m / b^m = 1, does care: it divides by bmb^m, so it silently excludes b=0b = 0. The empty-product argument does not.

The sharper version is combinatorial. For finite sets SS and TT, the number of functions from TT to SS is exactly ∣S∣∣T∣\lvert S\rvert^{\lvert T\rvert}. A function from TT to SS is a rule assigning one element of SS to each element of TT; with ∣T∣\lvert T\rvert independent choices from ∣S∣\lvert S\rvert options each, the count is a product of ∣T∣\lvert T\rvert copies of ∣S∣\lvert S\rvert. This is the definition of cardinal exponentiation, and Bourbaki states it in exactly this form.

Now take S=T=∅S = T = \varnothing. How many functions are there from the empty set to the empty set? A function is a set of ordered pairs satisfying a condition on its domain, and the empty set of ordered pairs satisfies that condition vacuously: there is no element of the domain for which it fails to assign a value, because there is no element of the domain. So the empty function exists, it is unique, and it is the only function from ∅\varnothing to ∅\varnothing. The count is 1. Therefore

00=∣∅∣∣∅∣=1.0^0 = \lvert \varnothing\rvert^{\lvert \varnothing\rvert} = 1.

If you want ∣S∣∣T∣\lvert S\rvert^{\lvert T\rvert} to count functions in general, you have already committed to 00=10^0 = 1. The same conclusion arrives from the tuple interpretation: b0b^0 counts the 00-tuples drawn from a bb-element set, and there is exactly one empty tuple regardless of bb.

What indeterminate form actually means

Switch questions. In analysis we are usually not asking what the symbol 000^0 denotes; we are asking about a limit of the shape

lim⁡x→af(x)g(x),f(x)→0,g(x)→0,f(x)>0.\lim_{x \to a} f(x)^{g(x)}, \qquad f(x) \to 0, \quad g(x) \to 0, \quad f(x) > 0.

Calling this an indeterminate form is a statement about how much information the hypotheses carry. For a determinate form the hypotheses settle the answer: if f(x)→3f(x) \to 3 and g(x)→5g(x) \to 5 then f(x)+g(x)→8f(x) + g(x) \to 8, full stop, no further information needed. For 000^0 the hypotheses settle nothing. Different pairs (f,g)(f, g) satisfying exactly the same hypotheses produce different limits. That is the whole content of the word.

The cleanest demonstration is xxx^x as x→0+x \to 0^+. Write it through the exponential:

xx=exln⁡x.x^x = e^{x \ln x}.

The exponent is a product of something going to 00 and something going to −∞-\infty, so it needs its own argument. Substitute x=e−tx = e^{-t}, so that x→0+x \to 0^+ corresponds to t→+∞t \to +\infty:

xln⁡x=e−t⋅(−t)=−tet.x \ln x = e^{-t} \cdot (-t) = -\frac{t}{e^{t}}.

Since ete^t grows faster than any polynomial, t/et→0t/e^t \to 0, hence xln⁡x→0x \ln x \to 0 and xx=exln⁡x→e0=1x^x = e^{x\ln x} \to e^0 = 1. The convergence is visible but slow, because ln⁡x\ln x fights back:

xxln⁡x\ln xxln⁡xx \ln xxxx^x
0.50.5−0.693147-0.693147−0.346574-0.3465740.7071070.707107
0.10.1−2.302585-2.302585−0.230259-0.2302590.7943280.794328
0.010.01−4.605170-4.605170−0.046052-0.0460520.9549930.954993
0.0010.001−6.907755-6.907755−0.006908-0.0069080.9931160.993116
10−510^{-5}−11.512925-11.512925−0.000115-0.0001150.9998850.999885
10−1010^{-10}−23.025851-23.025851−2.303×10−9-2.303\times 10^{-9}0.999999997700.99999999770

At x=0.1x = 0.1 the value is still under 0.80.8, and you have to go to x=10−5x = 10^{-5} before the first four decimal places settle. Anyone who has plotted xxx^x near the origin and concluded from the picture that it obviously goes to 1 was looking at a curve that commits itself very late.

Now the second example, which requires no work at all. Take f(x)=0f(x) = 0 and g(x)=xg(x) = x with x→0+x \to 0^+. Then f(x)→0f(x) \to 0, g(x)→0g(x) \to 0, and

f(x)g(x)=0x=0for every x>0,f(x)^{g(x)} = 0^x = 0 \quad \text{for every } x > 0,

so the limit is 00. Two pairs of functions, identical hypotheses, limits 11 and 00. The form is indeterminate. (This is also why the two-variable function xyx^y cannot be extended continuously to the origin from the region x>0x > 0: the two coordinate approaches already disagree, so no assignment of a value at (0,0)(0,0) can repair continuity.)

A limit engineered to land anywhere you like

It gets worse than two answers, and the construction is worth doing explicitly because it is short and it makes the point unarguable. Fix any constant c>0c > 0 and set

f(x)=e−1/x,g(x)=−xln⁡c,x→0+.f(x) = e^{-1/x}, \qquad g(x) = -x \ln c, \qquad x \to 0^{+}.

Check the hypotheses. As x→0+x \to 0^+, −1/x→−∞-1/x \to -\infty, so f(x)=e−1/x→0f(x) = e^{-1/x} \to 0, and f(x)>0f(x) > 0 throughout. And g(x)=−xln⁡c→0g(x) = -x\ln c \to 0 because it is a constant multiple of xx. Both conditions hold. Now compute:

f(x)g(x)=exp⁡ ⁣(g(x)ln⁡f(x))=exp⁡ ⁣((−xln⁡c)⋅(−1x))=exp⁡(ln⁡c)=c.f(x)^{g(x)} = \exp\!\big(g(x)\ln f(x)\big) = \exp\!\Big(\big(-x\ln c\big)\cdot\Big(-\frac{1}{x}\Big)\Big) = \exp(\ln c) = c.

The function is identically equal to cc for every x>0x > 0. It does not merely approach cc; it never leaves it. So by choosing cc you choose the limit, and cc ranges over all of (0,∞)(0, \infty). Taking g(x)=xg(x) = x instead gives f(x)g(x)=e−1f(x)^{g(x)} = e^{-1} , and g(x)=−1/ln⁡xg(x) = -1/\ln x pushes the limit to +∞+\infty. Every non-negative real number and +∞+\infty are attainable.

This is precisely the calculation Cauchy described in 1821, and precisely the counterexample that an anonymous correspondent signing himself “S” published in Crelle’s Journal in 1834 to refute a proof that 000^0 must equal 1. It has been settling the analytic side of the argument for two hundred years.

Three formulas that break if the value is left undefined

Here is the part that is often skipped, and it is the reason the convention is not merely convenient. Several completely standard pieces of notation stop being true if 000^0 is not 11.

The binomial theorem. The statement is

(x+y)n=∑k=0n(nk)xkyn−k.(x+y)^n = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k}.

Evaluate at x=0x = 0, y=1y = 1, n=3n = 3. The left side is (0+1)3=1(0+1)^3 = 1. The right side is

(30) 00 13+(31) 01 12+(32) 02 11+(33) 03 10=00+0+0+0=00.\binom{3}{0}\,0^0\,1^3 + \binom{3}{1}\,0^1\,1^2 + \binom{3}{2}\,0^2\,1^1 + \binom{3}{3}\,0^3\,1^0 = 0^0 + 0 + 0 + 0 = 0^0.

So the theorem holds at x=0x = 0 if and only if 00=10^0 = 1. If the symbol is undefined, the binomial theorem acquires a footnote excluding x=0x = 0, y=0y = 0, and x=−yx = -y — three cases people actually substitute. Graham, Knuth, and Patashnik make exactly this argument in Concrete Mathematics and conclude that the binomial theorem is too important to restrict arbitrarily, while the function 0x0^x, the only thing that would benefit from the opposite convention, is of no importance at all.

Power series. Every power series is written ∑n≥0anxn\sum_{n \ge 0} a_n x^n, and the whole point of the notation is that you may substitute any xx inside the radius of convergence, including 00. But the n=0n = 0 term is a0x0a_0 x^0, which at x=0x = 0 is a0⋅00a_0 \cdot 0^0. Take the exponential series:

ex=∑n=0∞xnn!=000!+011!+022!+⋯at x=0.e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = \frac{0^0}{0!} + \frac{0^1}{1!} + \frac{0^2}{2!} + \cdots \quad \text{at } x = 0.

We need this to be e0=1e^0 = 1, so we need 00=10^0 = 1. Without the convention, every power series identity would need its constant term split out by hand, and the geometric series ∑n≥0xn=1/(1−x)\sum_{n\ge 0} x^n = 1/(1-x) would fail at x=0x = 0, where it should be the least controversial thing in the subject. The same applies to Taylor expansions, generating functions, and the characteristic polynomial written in summation form.

Polynomials as ring elements. In the polynomial ring R[x]R[x] the monomial x0x^0 is the multiplicative identity. Evaluation at a real number rr is the unique unital ring homomorphism evr:R[x]→R\mathrm{ev}_r : R[x] \to R sending x↦rx \mapsto r, and a unital homomorphism sends 11 to 11; since x0=1x^0 = 1 in R[x]R[x], we get r0=1r^0 = 1 for every rr including r=0r = 0. Making 000^0 undefined would mean the constant polynomial 11 fails to define a function at the point 00. Relatedly, the power rule ddxxn=nxn−1\frac{d}{dx}x^n = n x^{n-1} is valid at n=1n = 1, x=0x = 0 only if 00=10^0 = 1, since it claims the derivative of xx at zero is 1⋅001 \cdot 0^0.

What your computer actually returns

This is where the topic stops being philosophical. The table below records documented behaviour, not folklore.

SystemExpressionResult
Python 30 ** 0, 0.0 ** 0.0, math.pow(0,0)1, 1.0, 1.0
Python 3Decimal(0) ** Decimal(0)raises an exception
JavaScript0 ** 0, Math.pow(0,0)1
C, C99 Annex Fpow(0.0, 0.0)1.0
C, C99 Annex Gcpow(0, 0) complexnan + nan i
Java, .NET, Julia, Rpower of zero by zero1
IEEE 754-2008pown(0,0) / pow(0,0) / powr(0,0)1 / 1 / NaN
Mathematica, Wolfram Alpha0^0Indeterminate
Maple0^0 vs 0^0.01 vs Float(undefined)
PARI/GP0^0 vs 0^0.1 vs domain error
Excel worksheet vs Excel VBA=0^0 vs 0 ^ 0#NUM! vs 1
MATLAB, Octave0^01

Two patterns run through the whole table, and they are the same two questions from the opening.

Systems whose exponentiation is fundamentally discrete return 1. Python’s documentation says so in as many words, noting that it defines both the operator and pow to give 1 for zero to the zero as is common for programming languages. Java, .NET, R, Julia, and the C library all land in the same place.

Systems whose exponentiation is fundamentally continuous — implemented as exp⁡(yln⁡x)\exp(y \ln x) — have nothing to return, because ln⁡0\ln 0 does not exist. That is why complex cpow(0,0) gives NaN in C while real pow(0,0) gives 1 in the same standard library: the complex branch genuinely goes through the logarithm, and there is no branch of log⁡z\log z defined at z=0z = 0.

The systems that are aware of both questions expose both answers, and those are the most interesting rows. Maple, PARI/GP, and Mathematica all discriminate on the type of the exponent. An exact integer zero means an empty product, so the answer is 1. A floating-point zero means a point on the real line approached by a continuous function, so the answer is undefined. Excel’s split between worksheet and VBA is the same distinction arrived at by accident rather than design.

Handheld calculators inherit whichever philosophy their firmware was built on, and they do not agree with each other. Community-maintained test results report the TI-83 family returning a domain error, the HP-48G returning 1, and later HP RPL models returning an undefined marker instead.

Why IEEE 754 deliberately provides three answers

The floating-point standard is the most thoughtful actor in this story, because it refused to pretend there was one question. IEEE 754-2008 recommends three distinct power operations:

  • pown(x, n), whose exponent is an integer, treats 000^0 as 11. An integer exponent is a repeated-multiplication count, so the empty product argument applies directly.
  • powr(x, y), whose exponent is real and which is specified to behave as a continuous power function computed through exp⁡(yln⁡x)\exp(y\ln x), returns NaN for 000^0. It also returns NaN for ∞0\infty^0 and 1∞1^\infty — the other classic indeterminate forms. Negative bases are invalid for powr for the same reason: a continuous real power function has no business there.
  • pow(x, y) takes real arguments but is specified to return a non-NaN result when the exponent happens to be an integer value. It treats 000^0 as 11. This variant exists mainly for compatibility with C99, and it is the one nearly every language ends up calling.

The design note in the standards discussion is explicit that the variants were introduced because of genuinely conflicting usage and genuinely different points of view, not because anyone was confused. The C99 rationale document gives the same reasoning from the other side: the committee required the result 1 under normative Annex F because there are significant applications for which that value is more useful than NaN. Both groups understood that they were choosing an answer to the discrete question and knowingly declining the continuous one.

Two centuries of arguing about it

The history is unusually well documented, and it follows the same fault line.

Euler, in the Introductio in analysin infinitorum of 1748, wrote that a0=1a^0 = 1 and said explicitly that this includes 00=10^0 = 1. He also accepted the consequence: the function 0x0^x takes a violent jump, being ∞\infty for x<0x < 0, then 11 at x=0x = 0, then 00 for x>0x > 0. In 1814 Johann Friedrich Pfaff gave a squeeze argument proving xx→1x^x \to 1 as x→0+x \to 0^+ — a correct theorem about one particular limit.

In 1821 Cauchy published the Cours d’Analyse, in which he showed that if positive xx and yy approach zero along a prescribed relation, the limit of xyx^y can be made to take any value between 00 and ∞\infty by choosing the relation appropriately. He concluded that the unconstrained two-variable limit is indeterminate and listed 000^0 in his table of indeterminate forms alongside 0/00/0 and ∞−∞\infty - \infty. Every modern calculus course inherits that table from him.

Guglielmo Libri then published a note in Crelle’s Journal in 1830, followed by further papers through 1833, arguing that 00=10^0 = 1. His arguments were unconvincing even by the standards of the day, but they stirred up a genuine controversy. In 1834 August Möbius, apparently unaware of Cauchy’s work, defended Libri by reproducing Pfaff’s argument and then overreaching badly: he claimed that f(x)g(x)→1f(x)^{g(x)} \to 1 whenever ff and gg both tend to zero. His error was assuming each function could be written as PxnP x^n with PP continuous and nonvanishing at the origin — true for analytic functions, false in general. An anonymous commentator flagged the unjustified step, and the correspondent “S” supplied the explicit counterexamples (e−1/x)x→e−1(e^{-1/x})^{x} \to e^{-1} and (e−1/x)2x→e−2(e^{-1/x})^{2x} \to e^{-2}, observing that 000^0 can take many different values. That is the construction of the previous section, published in 1834.

The argument then sat unresolved for a century and a half, until Donald Knuth addressed it head-on in Two Notes on Notation, published in the American Mathematical Monthly in May 1992. Knuth’s position is that 000^0 has to be 1, and his reasoning is structural rather than analytic: the binomial theorem and the family of identities built on it are too important to be hedged with exceptions, while nothing of comparable value would be gained by leaving the symbol undefined. His decisive move, though, is not the advocacy but the diagnosis. He draws an explicit line between the value 000^0, which should be 1, and the limiting form 000^0, which is shorthand for a limit of f(t)g(t)f(t)^{g(t)} and is genuinely indeterminate. On that reading, Knuth observes, both Cauchy and Libri were correct — and Libri’s defenders had simply not understood which claim they were defending.

Value versus limit: the distinction that dissolves the problem

Write the two statements next to each other and the entire two-hundred-year dispute collapses.

Statement A. The expression 000^0, understood as an exponentiation of the number zero by the number zero, has the value 11. It is an empty product; it counts the unique function ∅→∅\varnothing \to \varnothing; it is what the binomial theorem and every power series need it to be.

Statement B. The limiting form 000^0, understood as lim⁡f(x)g(x)\lim f(x)^{g(x)} where f,g→0f, g \to 0, is indeterminate. Knowing the hypotheses does not determine the answer, and by choosing ff and gg you can make the answer anything in [0,∞][0, \infty].

Both statements are true, and they are not about the same object: A is about a number, B is about a class of limits. The notation is to blame, since mathematicians write 000^0 for both. When someone insists that 000^0 is undefined and someone else insists it is 11, they are almost always affirming B and A respectively and hearing each other deny the other.

Which leaves one practical rule. If the exponent in front of you is a counted, discrete, integer zero — a term index in a series, a tuple length, an exponent in a polynomial — it is 11, and you should write it without apology. If the exponent arrived as the limit of something continuous, do not substitute at all; take the logarithm, evaluate lim⁡g(x)ln⁡f(x)\lim g(x)\ln f(x), and exponentiate at the end. That procedure gives the right answer in every case, including all the ones above, and it never requires you to decide what 000^0 “really” is.


Related topics: Why Can’t You Divide by Zero?, The Epsilon-Delta Definition of a Limit, Taylor Series, Pascal’s Triangle, Why the Logarithm Rules Work, Why Is e Everywhere?, Why 0.999… Equals 1, Generating Functions, Why Negative Times Negative Is Positive

Frequently asked

Is 0 to the power of 0 equal to 1 or undefined?

As the value of an expression, it is 1 under a convention that is close to universal in algebra, combinatorics, and set theory. The exponent counts functions from a set of that size, and there is exactly one function from the empty set to the empty set, so the count is 1. Some analysis textbooks leave the symbol undefined because the associated limit is not determined, but essentially no author assigns it a value other than 1. The apparent disagreement is about which question is being asked, not about arithmetic.

Why do calculators disagree about 0^0?

Because their designers answered different questions. A system built around discrete exponents, such as Python or Java, follows the convention that an exponent of zero means an empty product and returns 1. A system that treats exponentiation as the continuous function exp of y times log x has no value to return at the origin, because log 0 does not exist, so it reports an error. Excel is the clearest case of the split: the worksheet formula for zero raised to zero returns a numeric error, while the same operation in Excel VBA returns 1.

Is 0^0 indeterminate?

The limiting form is indeterminate; the expression itself is not. Saying that a form is indeterminate means only that knowing f and g both tend to zero does not fix the limit of f raised to g. That is demonstrably true: x raised to x tends to 1, zero raised to x tends to 0, and for any positive constant c the pair f of x equal to e to the minus one over x with g of x equal to minus x times log c gives exactly c. None of this constrains what the symbol should mean when both slots are literally the number zero.

What does Python return for 0 to the power of 0?

Python returns 1. The integer expression gives the integer 1, the float expression gives 1.0, the complex expression gives 1+0j, and the math library function also gives 1.0. The Python documentation states outright that it defines both the operator and the library function to be 1 for zero to the zero, as is common for programming languages, and that its float behaviour follows Annex F of the C99 standard. The one exception in the standard library is the Decimal type, which raises an invalid-operation exception.

Why is anything to the power of 0 equal to 1?

Because dividing powers subtracts exponents. Since b to the m divided by b to the n equals b to the m minus n, setting m equal to n forces b to the zero to equal b to the m over b to the m, which is 1. That argument needs b to be nonzero, since it divides by b to the m. The argument that also covers b equal to zero is the empty product: b to the n means multiply n copies of b together, and multiplying no copies of anything leaves the multiplicative identity, which is 1 whatever b happens to be.