Leibniz notation for high-order derivatives What is the reason for the positioning of the superscript $n$ in an $n$-order derivative $\frac{d^ny}{dx^n}$?  Is it just a convention or does it have some mathematical meaning?

Several people have already posted answers saying it's $\left(\dfrac{d}{dx}\right)^n y$, so instead of saying more about that I will mention another aspect.
Say $y$ is in meters and $x$ is in seconds; then in what units is $\dfrac{dy}{dx}$ measured?  The unit is $\text{meter}/\text{second}$.  The infinitely small quantities $dy$ and $dx$ are respectively in meters and seconds, and you're dividing one by the other.
So in what units is $\dfrac{d^n y}{dx^n}$ measured?  The thing on the bottom is in $\text{second}^n$ (seconds to the $n$th power); the thing on top is still in meters, not meters to the $n$th power.  The "$d$" is in effect unitless, or dimensionless if you like that word.
I don't think it's mere chance that has resulted in long-run survival of a notation that is "dimensionally correct".  But somehow it seems unfashionable to talk about this.
