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 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, is an indeterminate form, which is a statement about limits and not about values: knowing that and tells you nothing about where is heading. These two claims are not in conflict. They are answers to different questions, and every argument about 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 , the expression is a product of copies of . That definition extends downward by one very natural step: is the product of no copies of at all, and the product of an empty collection is the multiplicative identity, . This is the empty product convention, and it is the same convention that makes and makes the sum of an empty collection equal to . Notice that nothing in that argument cared what was. The familiar schoolbook derivation, , does care: it divides by , so it silently excludes . The empty-product argument does not.
The sharper version is combinatorial. For finite sets and , the number of functions from to is exactly . A function from to is a rule assigning one element of to each element of ; with independent choices from options each, the count is a product of copies of . This is the definition of cardinal exponentiation, and Bourbaki states it in exactly this form.
Now take . 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 to . The count is 1. Therefore
If you want to count functions in general, you have already committed to . The same conclusion arrives from the tuple interpretation: counts the -tuples drawn from a -element set, and there is exactly one empty tuple regardless of .
What indeterminate form actually means
Switch questions. In analysis we are usually not asking what the symbol denotes; we are asking about a limit of the shape
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 and then , full stop, no further information needed. For the hypotheses settle nothing. Different pairs satisfying exactly the same hypotheses produce different limits. That is the whole content of the word.
The cleanest demonstration is as . Write it through the exponential:
The exponent is a product of something going to and something going to , so it needs its own argument. Substitute , so that corresponds to :
Since grows faster than any polynomial, , hence and . The convergence is visible but slow, because fights back:
At the value is still under , and you have to go to before the first four decimal places settle. Anyone who has plotted 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 and with . Then , , and
so the limit is . Two pairs of functions, identical hypotheses, limits and . The form is indeterminate. (This is also why the two-variable function cannot be extended continuously to the origin from the region : the two coordinate approaches already disagree, so no assignment of a value at 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 and set
Check the hypotheses. As , , so , and throughout. And because it is a constant multiple of . Both conditions hold. Now compute:
The function is identically equal to for every . It does not merely approach ; it never leaves it. So by choosing you choose the limit, and ranges over all of . Taking instead gives , and pushes the limit to . Every non-negative real number and 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 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 is not .
The binomial theorem. The statement is
Evaluate at , , . The left side is . The right side is
So the theorem holds at if and only if . If the symbol is undefined, the binomial theorem acquires a footnote excluding , , and — 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 , the only thing that would benefit from the opposite convention, is of no importance at all.
Power series. Every power series is written , and the whole point of the notation is that you may substitute any inside the radius of convergence, including . But the term is , which at is . Take the exponential series:
We need this to be , so we need . Without the convention, every power series identity would need its constant term split out by hand, and the geometric series would fail at , 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 the monomial is the multiplicative identity. Evaluation at a real number is the unique unital ring homomorphism sending , and a unital homomorphism sends to ; since in , we get for every including . Making undefined would mean the constant polynomial fails to define a function at the point . Relatedly, the power rule is valid at , only if , since it claims the derivative of at zero is .
What your computer actually returns
This is where the topic stops being philosophical. The table below records documented behaviour, not folklore.
| System | Expression | Result |
|---|---|---|
| Python 3 | 0 ** 0, 0.0 ** 0.0, math.pow(0,0) | 1, 1.0, 1.0 |
| Python 3 | Decimal(0) ** Decimal(0) | raises an exception |
| JavaScript | 0 ** 0, Math.pow(0,0) | 1 |
| C, C99 Annex F | pow(0.0, 0.0) | 1.0 |
| C, C99 Annex G | cpow(0, 0) complex | nan + nan i |
| Java, .NET, Julia, R | power of zero by zero | 1 |
| IEEE 754-2008 | pown(0,0) / pow(0,0) / powr(0,0) | 1 / 1 / NaN |
| Mathematica, Wolfram Alpha | 0^0 | Indeterminate |
| Maple | 0^0 vs 0^0.0 | 1 vs Float(undefined) |
| PARI/GP | 0^0 vs 0^0. | 1 vs domain error |
| Excel worksheet vs Excel VBA | =0^0 vs 0 ^ 0 | #NUM! vs 1 |
| MATLAB, Octave | 0^0 | 1 |
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 — have nothing to return, because 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 defined at .
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 as . 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 , returns NaN for . It also returns NaN for and — the other classic indeterminate forms. Negative bases are invalid forpowrfor 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 as . 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 and said explicitly that this includes . He also accepted the consequence: the function takes a violent jump, being for , then at , then for . In 1814 Johann Friedrich Pfaff gave a squeeze argument proving as — a correct theorem about one particular limit.
In 1821 Cauchy published the Cours d’Analyse, in which he showed that if positive and approach zero along a prescribed relation, the limit of can be made to take any value between and by choosing the relation appropriately. He concluded that the unconstrained two-variable limit is indeterminate and listed in his table of indeterminate forms alongside and . 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 . 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 whenever and both tend to zero. His error was assuming each function could be written as with 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 and , observing that 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 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 , which should be 1, and the limiting form , which is shorthand for a limit of 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 , understood as an exponentiation of the number zero by the number zero, has the value . It is an empty product; it counts the unique function ; it is what the binomial theorem and every power series need it to be.
Statement B. The limiting form , understood as where , is indeterminate. Knowing the hypotheses does not determine the answer, and by choosing and you can make the answer anything in .
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 for both. When someone insists that is undefined and someone else insists it is , 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 , 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 , 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 “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.