To put a line above a letter in Word, insert an equation and apply its bar accent: choose Insert > Equation, then Equation > Accent > Bar, and type the letter in the box. For a line over a letter in ordinary text, you can instead add the Unicode combining overline U+0305 immediately after the letter. The equation method is usually the clearest and most reliable; the combining mark is useful when the character needs to stay within a normal sentence.
A line above a character is also called an overline or bar. It can represent a mathematical value, a repeating decimal, a mean, or a special letter in a language or transcription system. The best method depends on whether you need a math-style symbol or a character that behaves like regular text. These steps are for Microsoft Word for Microsoft 365 on Windows; Mac notes are included where the controls differ.
What You’ll Need
- Microsoft Word for Microsoft 365 on Windows, or Word for Mac. The equation accent is available in current desktop versions of Word.
- The letter or letters that need the line, and a decision about whether to use an equation object or ordinary text.
- If you choose the ordinary-text method on Windows, you can use the Unicode code 0305 for a combining overline.
Step-by-Step
- Choose the method that fits the document. Use an equation accent for mathematics, scientific notation, or a symbol that needs a neatly centered bar. The equation method also works well for a single letter in a paragraph, although Word treats the result as an equation object rather than ordinary text. Use a combining overline when the letter must remain part of a regular word or sentence and you want to select or format it like text. A combining mark may look different in different fonts, so inspect it before sharing or printing.
- Place the cursor where the overlined letter should appear. For an equation, click at the insertion point in the document. For an overlined letter within a word, place the cursor where that character belongs. If you already typed the letter, you can add the combining mark immediately after it. Save the document before changing a long or important passage, especially if the text uses unusual fonts or scripts.
- Insert an equation for the most consistent result. On Windows, select Insert > Equation on the ribbon. A new equation area appears at the cursor, along with equation tools. You can also start an equation with Alt+= in Word for Windows. On a Mac, use Insert > Equation; the ribbon and keyboard shortcut can vary with the Word version and keyboard settings, so the menu is the dependable route.
- Open the accent choices. Click inside the equation so the equation-specific ribbon is visible. In current Word for Windows, open the Equation or Equation Tools – Design tab, then find the Structures group and choose Accent. In the gallery, select the template showing a horizontal bar above an empty box. Do not choose a tilde, hat, or arrow if you need a straight line. Word inserts the accent with a placeholder beneath it.
- Fill the placeholder with the letter. Click the box under the bar and type the character. For example, typing x produces an x with a bar above it. If the bar should cover more than one character, type the full expression in the placeholder, such as xy. The accent will generally span the contents of the box. Use the arrow keys to move through the equation if clicking the small placeholder is difficult.
- Return to the document and check the layout. Click outside the equation or press the right arrow until the insertion point is past it. The equation is usually inserted inline with the surrounding text. Check that the bar is centered, that the line does not collide with text above it, and that the equation has not made the line spacing look uneven. If it is being used in a paragraph, read the sentence at normal zoom as well as close up.
- Use a combining overline for ordinary text, if needed. Type the base letter first, then type 0305 directly after it and press Alt+X. In Word for Windows, the four digits change into the combining overline character and should attach to the preceding letter. For example, type a0305 and press Alt+X to form an a with a line above it. If Word converts the wrong text, undo once, select only the digits 0305, and press Alt+X again. The mark needs to follow the letter with no space between them.
- Check the combining mark in the chosen font. The overline is a separate Unicode combining character, not a special precomposed version of every letter. Some fonts place it neatly; others position it too high, too low, or with too much width. Try a common font such as Arial or Times New Roman if the result is poor. If you need a polished symbol that will look consistent on another computer, use the equation accent instead.
Word for Mac supports equation objects through Insert > Equation, and the equation tools provide accent structures in current desktop versions. The names or placement of ribbon controls can differ slightly between Mac and Windows. If you do not see an Accent gallery, click within the equation first, then look for the equation design controls. The Windows Alt+X Unicode conversion shortcut is not the same on Mac, so use the equation route on a Mac when you need a dependable result.
Common Mistakes
- Drawing a line with the Shapes tool. A drawn line can sit above a letter, but it is an independent object. It may shift when text wraps, the font changes, or the page is edited. Use a bar accent or combining mark when the line belongs to the character itself.
- Using a macron instead of an overline. A macron is a spacing character, usually used as a letter in its own right. A combining overline attaches to the character before it. Typing a regular hyphen, underscore, or macron is not a dependable substitute for a centered bar above a letter.
- Choosing the wrong equation accent. Word’s Accent gallery includes several marks that can look similar at small size. Select the straight horizontal bar, not a hat, dot, tilde, or vector arrow. Zoom in briefly if the gallery icons are hard to distinguish.
- Leaving a space before a combining mark. A combining mark attaches to the preceding character. If there is a space between the letter and U+0305, the line may appear over the space or look detached. Remove the gap and place the mark directly after the intended letter.
- Expecting the two methods to behave identically. An equation is a structured object with its own sizing and positioning. A combining overline is text made from a base character and a mark. They can look similar on screen but may respond differently to font changes, copying, editing, and line spacing.
- Making a long overline from repeated underscores. Several underscore characters create a low line, not a centered bar above the letters. For a bar over an expression, put the expression inside the equation accent’s placeholder rather than trying to build the line from punctuation.
Tips
- Use the equation method for formal work. It is generally the better choice for algebra, statistics, physics, and technical documents because the bar is positioned in relation to the character or expression. Equation formatting also tends to survive changes in surrounding paragraph fonts better than a manually drawn line.
- Use the mark only when editable prose matters. Combining marks can be useful in names, linguistic examples, or text that must remain part of a sentence. They are also easy to search for as text, but searching for a visually similar equation may work differently. Test the exact character in the document before applying it throughout.
- Keep the base character and mark together. A combining overline should not be separated from its letter by a line break. If Word wraps the text between the two, remove any intervening formatting or spacing and consider replacing the pair with an equation object. Avoid inserting a manual line break between the base and mark.
- Copy a correctly formatted example. If you need the same type of overlined letter repeatedly, duplicate the equation or character pair that already looks right, then edit the letter. This can help keep the size and style consistent. After pasting, confirm the new equation remains in the intended font and paragraph position.
- Check the final document on another display or in print preview. A bar that seems correctly centered at high zoom can appear too close to the letter at normal size. Use File > Print to inspect the preview before printing, and export or share a copy if the recipient needs to see the same layout. If another user must edit the symbol, an equation object is often easier to recognize and adjust.
Troubleshooting
- The Accent option is missing: First click inside the equation. Equation-specific tabs appear only when the equation is active. If no equation exists yet, choose Insert > Equation, then look for the Accent control on the equation design tab. Maximizing the Word window can also reveal ribbon groups that are hidden in a narrow window.
- Alt+X does not create a line: This shortcut is for Word on Windows. Make sure the code is exactly 0305, type it immediately after the base letter, and press Alt+X. If the digits changed into something else, press Ctrl+Z and try again with only the code selected. On Mac, use an equation accent instead of relying on this Windows shortcut.
- The mark appears over the wrong character: Undo, remove spaces or punctuation between the letter and the mark, and insert the code directly after the intended base letter. Combining marks attach to the preceding character in the text sequence, which may not be the character that looks closest on screen in right-to-left or complex-script text.
- The line looks uneven or too wide: If you used a combining mark, try another font or switch to an equation accent. If you used an equation, check that the correct bar template is selected and that the intended letter or expression is in its placeholder. A bar over several letters will naturally be longer than one over a single letter.
- The letter and line separate after copying: Some destinations do not preserve combining-character behavior or equation formatting. Paste using Word’s formatting options, or recreate the equation in the destination document. For a document that must retain its appearance, save or export a PDF after checking the layout; keep the Word file too if later editing is required.
- The line overlaps the text above: An equation object can increase the height of a line of text, and a combining mark may extend into the space above the character. Check paragraph line spacing and surrounding font size. Avoid reducing line spacing until the mark is clipped; if necessary, move the equation to its own line or adjust the paragraph layout.
Frequently Asked Questions
What is the line above a letter called?
A straight line above a letter is commonly called an overline or a bar. In mathematics, the intended meaning depends on the notation: it can indicate a mean, a repeating decimal, a complement, or another defined value.
How do I put a bar over more than one letter?
Insert an equation, choose Equation > Accent > Bar, and enter the whole expression in the placeholder under the bar. This is more reliable than applying a combining overline to each character separately, which can create gaps or overlapping lines.
Can I use the method in a normal sentence?
Yes. An equation can sit inline in a sentence, though it remains an equation object. For a letter that should behave like regular text, add the combining overline after the character, then check the font and line spacing.
Is an overline the same as a macron?
Not necessarily. A macron is a separate spacing mark used as a letter mark in some writing systems, while an overline is usually a bar placed over a character or expression. Choose the symbol according to the language or mathematical notation you need.
Will the overlined letter look the same in every font?
No. Fonts can position combining marks differently, and equation objects may use a math font that differs from the paragraph font. Check the character in the intended font and review the document on the system or output format where it will be used.
What should I use for a repeating decimal?
Use an equation accent if the bar needs to cover the repeating digit or digits precisely. For example, a bar over only the repeating part of a decimal is easier to position with an equation placeholder than with a hand-drawn line.
Related
- How to Insert Images in an Excel Table
- How to Insert a New Column in Excel: Steps and Tips
- How to Insert an Image as a Watermark in Excel for Printing
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Delete a Page in Word Online: Step-by-Step GuideTo delete a page in Word Online, remove the text, objects, or formatting marks that are making it…
- How to Create Binder Labels in Word: A Step-by-Step GuideCreate binder labels in Word by choosing a label template that matches your label stock, entering the spine…
- Excel Paste Values Shortcut: Keys, Options, and FixesIn Excel for Microsoft 365 on Windows, copy the cells, select the destination, then press Ctrl+Alt+V, press V,…
- Box Plot in Excel: Compare Multiple Data SetsYes. In Microsoft Excel for Microsoft 365 on Windows, put each data set in its own column, select…
- Creating a Schedule in Google Sheets: Steps and TipsTo create a schedule in Google Sheets, open a blank spreadsheet, add columns for dates, start and end…
- Google Sheets Add Item to Dropdown: Steps and TipsTo add an item to a Google Sheets dropdown, select a cell that uses the dropdown, open Data…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.