To write a math formula in Word, press Alt+= (or go to Insert > Equation) and type it in the equation box that appears. Word turns shorthand like x^2 or a/b into properly formatted math when you press Space. If you need a formula that calculates, such as a total at the bottom of a table column, that’s a different feature: click the cell and use Table Layout > Formula, then enter something like =SUM(ABOVE).
This guide covers both, plus chemical formulas, for Word for Microsoft 365 and Word 2016 or later on Windows and Mac.
Which Kind of Formula Do You Need?
| You want to | Use |
|---|---|
| Show a math or science formula, like the quadratic formula | Equation editor |
| Add up or average numbers in a Word table | Table formula |
| Write a chemical formula, like H2O | Subscript formatting |
| Do complex calculations on lots of data | Excel, then copy the results into Word |
Write a Math Formula With the Equation Editor
- Click where the formula should go.
- Press Alt+=, or go to Insert > Equation. A box that says Type equation here appears, and the Equation tab opens on the ribbon.
- Type your formula using the shortcuts in the next section, or build it from the Structures group (fractions, scripts, radicals, integrals, and more).
- Insert symbols like π, ±, or ≤ from the Symbols group.
- Press the Right Arrow key, or click outside the box, to go back to normal text.
For common formulas, select the arrow under Insert > Equation and pick one from the gallery, such as the Pythagorean theorem or Quadratic formula. Then edit the letters and numbers to fit your problem.
Type formulas quickly with shortcuts
Inside the equation box, Word reads a simple typed shorthand called linear format. Type the shorthand, then press Space to have Word build the formatted version.
| Type | Result |
|---|---|
| x^2 | x with a superscript 2 |
| x_1 | x with a subscript 1 |
| a/b | A stacked fraction |
| (a+b)/(c+d) | A fraction with grouped top and bottom |
| \sqrt(x) | Square root of x |
| \pi, \alpha, \theta | Greek letters π, α, θ |
| \pm, \le, \ne | ±, ≤, ≠ |
| \cdot, \times | Multiplication dot and × |
| \sum, \int | Summation and integral signs |
For example, typing x=(-b\pm\sqrt(b^2-4ac))/2a and pressing Space produces the quadratic formula. If you’d rather see the shorthand again to edit it, press Ctrl+Shift+= for linear view, then Ctrl+= to switch back to the formatted view. Both options are also in the Convert menu on the Equation tab.
Type formulas in LaTeX
If you know LaTeX, Word for Microsoft 365 can read it. On the Equation tab, choose LaTeX in the Conversions group, type something like \frac{a}{b}, and convert it with Ctrl+=. Word 2016, 2019, 2021, and 2024 only support the default UnicodeMath shorthand. Word also skips some LaTeX commands, such as \begin{} and \end{}. Microsoft’s page on UnicodeMath and LaTeX in Word lists the details.
Write a formula by hand
On Windows, go to Insert > Equation > Ink Equation and write the formula with a pen, finger, or mouse. Word shows a typed preview as you write. Use Select and Correct to fix anything it misreads, then select Insert.
Put a formula on its own line or in a sentence
A formula typed on an empty line is centered on its own line. One typed in the middle of a sentence stays inline, at text size. To number formulas for a report or paper, see how to number equations in Word.
If your assignment wants the equation centered with its number at the right margin, you can align equation numbers on the right using a borderless table.
Write a Formula That Calculates in a Word Table
Word tables can do simple math with a formula field. It isn’t as powerful as Excel, but it handles totals, averages, and basic calculations.
- Click the table cell where you want the result. If it has anything in it, delete it first.
- On the Table Layout tab (named Layout in some versions), select Formula in the Data group.
- Word often suggests a formula, like =SUM(ABOVE). Keep it or type your own in the Formula box.
- Optional: pick a Number format, such as #,##0.00 for two decimal places.
- Select OK. The result appears in the cell.
You can point a formula in any direction with ABOVE, BELOW, LEFT, and RIGHT, or refer to cells like a spreadsheet. The first column is A and the first row is 1, so =B2*C2 multiplies two cells, and =AVERAGE(B2:B6) averages a range. Word supports functions including SUM, AVERAGE, COUNT, MAX, MIN, PRODUCT, ROUND, and IF.
Update the result after you change a number
Table formulas don’t recalculate on their own. After you edit the numbers, click the result and press F9, or right-click it and choose Update Field. To update every formula at once, press Ctrl+A, then F9. Microsoft’s guide to using a formula in a Word table lists every function.
Table formulas work in the Word desktop apps for Windows and Mac. Word for the web shows existing results but doesn’t let you insert new table formulas.
Write a Chemical Formula
Chemical formulas like H2O or CO2 don’t need the equation editor. Type the formula, select each number that should sit low, and press Ctrl+= to make it subscript. On a Mac, press Command+=. For charges like Na+, use superscript with Ctrl+Shift+= (Command+Shift+= on a Mac). Our guides to subscript in Word and exponents in Word cover more options.
Note that Ctrl+= means subscript in normal text but switches an equation to its formatted view when you’re inside an equation box.
FAQ
The document is probably saved in the old .doc format or open in Compatibility Mode. Go to File > Info > Convert, or save it as a .docx file, and the equation tools become available.
Can I write formulas in Word for the web?
Yes. Word for the web has Insert > Equation, and the linear shortcuts work there too. Some features, like Ink Equation and table formulas, need the desktop app.
How do I change the size of a formula?
Select the equation box and change the font size on the Home tab. The whole formula scales together.

Matt has been writing about Microsoft Windows and other Microsoft products since the days of Windows XP. He spends much of his time writing for sites like WindowBrain.com