\documentclass{jarticle}
\usepackage{amsmath}
\usepackage{yhmath}
\begin{document}

$
\bar{abcdefg}     \quad
\widebar{abcdefg} \quad
$

\begin{align*}
&\bar{abcdefg}     \\
&\widebar{abcdefg} 
\end{align*}

$\widebar{\textrm{var}(x)}$

\end{document}
