How to write bar (overline) in LaTeX
Use \bar{x} in math mode — between $…$ in a document, or directly in the editor above.
| LaTeX command | \bar{x} |
|---|---|
| Notes | Long: \overline{AB} |
Example
\bar{x} = \frac{1}{n}\sum x_i
The editor above is pre-filled with this example — tweak it and export it as PNG, SVG or a Word equation.
More accents
| Symbol | Command |
|---|---|
| Vector arrow | \vec{v} |
| Hat | \hat{x} |
| Dot (time derivative) | \dot{x} |
| Tilde | \tilde{x} |


