Stepthrough Microsoft 365 Start free

What is a formula in Excel?

Quick answer

An Excel formula is a calculation typed into a cell that starts with an equals sign, such as =C2-B2 or =SUM(B2:B6). It can use numbers, cell references, operators (+ − * /) and functions, and it recalculates automatically when the cells it uses change.

Last updated

Updated · By Robert Breen

Why it matters

Formulas are what make a spreadsheet more than a table of numbers. Type a total once as a formula and it stays right when any number changes. Type it as a number and it is wrong the moment someone edits a row, which is how hand-typed totals end up in board reports.

Formulas also show your working. Anyone can click the cell and see exactly how a number was calculated, which settles "where did this come from?" in seconds.

A worked example

A café owner tracks weekly sales in B2 to B8 and costs in C2 to C8. In D2 she types =B2-C2 for the day’s profit and copies it down. In D9 she types =SUM(D2:D8) for the week. In D10, =D9/SUM(B2:B8) gives the profit margin, formatted as a percentage: $1,860 profit on $7,440 of sales is 25%.

On Thursday she finds a $200 delivery cost she forgot. She types it into C5, and the day’s profit, the weekly total and the margin all update at once, without her touching a single formula.

Often confused with

Formula vs function

A function is a named, built-in calculation such as SUM, AVERAGE, IF or XLOOKUP. A formula is anything that starts with =, and it may or may not use functions: =B2-C2 is a formula with no function.

Formula vs value

The cell shows the result; the formula bar shows the formula. Pasting with "Paste values" keeps the result but drops the formula, so it will no longer update.

Excel formula vs calculated column

Inside an Excel table, a formula typed in one row of a column fills down the whole column automatically. That filled column is called a calculated column.

Tips

  • Never type a total by hand; use a formula, even for two numbers.
  • Errors such as #DIV/0! (dividing by zero) and #N/A (value not found) tell you what went wrong; read them before deleting the formula.
  • Use cell references, not numbers, inside formulas, so changes flow through.

Learn it in a free lesson

Sources

Written from these official help pages. Menus change, so if a button has moved, the help page has the current wording.

Frequently asked questions

Why is my formula showing as text?
The cell was formatted as Text before you typed, or there is a space before the equals sign. Change the format to General and enter the formula again.
What order does Excel calculate in?
Parentheses first, then multiplication and division, then addition and subtraction. =2+3*4 is 14; =(2+3)*4 is 20.
Can AI write Excel formulas for me?
Yes. Copilot in Excel and general assistants can suggest formulas from a plain-English description. Test the result on a few rows you can check by hand.

All microsoft 365 terms, A to Z · Free microsoft 365 lessons