One can get the sum of the widths of the "equation" parts, as the spacing between alignment groups is computed dynamically and is stored nowhere.
The column widths are stored in a special format in the macro \maxcolumn@widths, which is available at the end of the construction, when the conditional \ifmeasuring@ is false. The format is
\or <dimen1> \or <dimen2> \or ...
where each <dimen> is the maximum width of the respective column (align builds rlrl... alignments).
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\settowidthofalign}[2]{%
\setbox\z@=\vbox{
\begin{align*}
#2
\ifmeasuring@\else\global\let\got@maxcolwd\maxcolumn@widths\fi
\end{align*}
}%
\begingroup
\def\or{+}\edef\x{\endgroup#1=\dimexpr\got@maxcolwd\relax}\x}
\makeatother
\newlength{\mylen}
\begin{document}
\settowidthofalign{\mylen}{
a & b & c & d\\
c & d & c & d
}
\the\mylen
\end{document}
One may add to this the computation of the horizontal space really used from the left to the right.
align? – Werner Jun 14 '12 at 20:47\settowidth{\MyLength}{$<equation>$}, bacailly use math mode for the equation you want to measure. Of course it can not contain align points&. – Peter Grill Jun 15 '12 at 0:00alignis as wide as the text, so the answer is\textwidth. Do you mean the width of the math itself from leftmost to rightmost symbol? This is dependent on the text width, since thealignenvironment will add space between the columns to space them evenly. If you want a "generic" aligned width, you could try using thealignedenvironment inside Peter Grill's suggestion, i.e.\settowidth{\MyLength}{$\begin{aligned}...\end{aligned}$}. This environment "shrinks to fit". – Ryan Reich Jun 15 '12 at 2:46