You can use the border=<len>
class option to increase the width of the border around the cropped output:

\documentclass[border=1pt]{standalone}
\begin{document}
$2^5 = x_5 \times y^8$
\end{document}
As in your case, the border around the image is not present in the PDF, it's from my screen capture.
It is also possible to modify this border for left/right and top/bottom border using border={<l/r> <t/b>}
or for each border specifically using border={<l> <b> <r> <t>}
. These options are described in the standalone
documentation (section 5.2 Class options).
Incorporating Stephan Lehmke's comment, this is what the bounding boxes around the objects in the equations look like:

\documentclass[border=1pt]{standalone}
\usepackage{xcolor}
\setlength{\fboxsep}{-\fboxrule}% Remove \fbox separation for tight bounding box
\newcommand{\bbox}[1]{%
\color{red!50}\rlap{\fbox{$\phantom{#1}$}}%
\color{black}#1%
}
\begin{document}
$\bbox{2^5} = \bbox{x_5} \times \bbox{y^8}$
\end{document}
By setting \fboxsep
to -\fboxrule
, the outer edge of the boxes represent the bounding boxes exactly. It is now noticeable that some elements protrude outside this, causing the problems when clipping.
standalone
package. btw, I'm getting a sufficient border by default, but maybe I have a different package version.class=article
notarticle
, but this class is the default anyway.standalone
. The default can be changed back in the global or a localstandalone.cfg
file.