Word and PowerPoint

How to Type X Bar in Word

By imagetolatex team · Published

The quickest way to type x bar in Word is an equation: press Alt+= (Control+= on a Mac), type x\bar and press Space — Word puts the bar over the x. In normal text you can type x, then 0304, then press Alt+X on Windows to add a combining macron.

Method 1: in an equation (Windows and Mac)

  1. Step 1: Insert an equationPress Alt+= on Windows or Control+= on a Mac, or choose Insert › Equation.
  2. Step 2: Type the letter and the accent codeType x\bar and press Space. Word applies the bar to the character before it. \hat, \tilde and \dot work the same way.
  3. Step 3: Continue the formulaKeep typing, for example =1/n and Space for a fraction, then press → to leave the equation.
Sample mean
x ¯ = 1 n ∑ i = 1 n x i
\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_iOpen in the LaTeX editor

If your Word uses LaTeX input (Equation › LaTeX), type \bar{x} instead and press Space.

Method 3: x̄ in normal text

When the x̄ must sit in a sentence or a table cell without an equation box, use a combining character. On Windows type x, then 0304, then press Alt+X: Word turns the code into a macron above the x. 0305 gives a longer overline.

On a Mac, Word has no Alt+X; insert the bar through Insert › Advanced Symbol (search for "combining macron") right after the x, or use an equation.

Combining characters depend on the font. In Calibri or Times New Roman the bar may sit slightly off; an equation always looks right.

y-bar, p-hat and other statistics symbols

SymbolIn an equation typeNormal text (Windows)
x̄ (sample mean)x\bar Spacex 0304 Alt+X
ȳy\bar Spacey 0304 Alt+X
p̂ (sample proportion)p\hat Spacep 0302 Alt+X
x̃ (median)x\tilde Spacex 0303 Alt+X
μ, σ\mu, \sigma SpaceInsert › Symbol

Paste a whole formula from LaTeX

For a longer formula with x̄, write it once in LaTeX in the LaTeX equation editor, check the preview, and click Copy for Word. It pastes into Word as an editable equation, bar included.

The LaTeX equation editor showing the sample mean formula with x bar in the input and its rendered preview with Copy for Word button
Type the formula once, then Copy for Word pastes an editable equation.

FAQ

What is the shortcut for x bar in Word?
In an equation (Alt+=) type x\bar and press Space. In normal text on Windows type x, 0304, then Alt+X.
How do I type x bar on a Mac?
Insert an equation with Control+=, type x\bar and press Space, or use Accent › Bar on the Equation tab.
What is the difference between Bar and Overbar?
Bar is a short accent over one character; Overbar stretches over everything in the box, for expressions like a line segment AB.
Why does my x bar look misaligned in text?
Combining characters depend on the font. Use an equation for a consistent look.

Sources

Related guides

Converting more than one equation?

When the math is in a whole page, a PDF, a Word file or handwriting, these converters do it in one go and keep every equation editable.

Single printed formulas are free: 3 a day without an account, 6 with a free account. New accounts get 30 credits to try handwriting, pages and documents; failed conversions return their credits. See plans and credit prices.