What is the order when doing $x^{y^z}$ and why?

In the usual computer science jargon, exponentiation in mathematics is right-associative, which means that $x^{y^z}$ should be read as $x^{(y^z)}$, not $(x^y)^z$. In expositions of the BODMAS rules that are careful enough to address this question, the rule is to evaluate the top exponent first. One way to help remember this convention is to note that $(x^y)^z = x^{yz}$ (i.e., $x^{(yz)}$), so it would be silly if out of the two possibilities, $x^{y^z}$ meant the one that can be expressed without using two tiers of superscripts.


Usually, a^b^c is taken to mean a^(b^c). This is purely an issue of the definition of notation so deep "why" answers aren't super likely. The main thing is that we have the identity (for positive $a$): $$(a^b)^c=a^{bc}$$ so it would make little sense to make that the default order, given that it reduces to a simpler form, whereas $a^{(b^c)}$ doesn't reduce. Moreover, generally exponentiation is written as $a^{b^c}$ rather than a^b^c, and the former notation more clearly shows that all of $b^c$ is in the exponent.


I would just like to point out that many calculators share the OP's confusion, even calculators from the same manufacturer. Taking a quick sample from the lost-and-found box in my office, I found that 2^3^4 turned out to be:

  • 4096 on Texas Instruments BA II Plus, TI-30XA, TI-30X II s, TI-36X solar, Windows calculator
  • 2.4178...*10^24 on Texas Instruments TI-30XS MultiView, Casio fx-115ES Plus, Google search bar.