How to Add a Formula in Excel: A Complete Guide

Excel's real power lives in its formulas. Whether you're totaling a column of numbers, calculating a percentage, or building a complex financial model, formulas are what transform a static spreadsheet into a working tool. Here's everything you need to know to start using them confidently.

What Is a Formula in Excel?

A formula in Excel is an instruction that calculates a value. Every formula starts with an equals sign (=), which tells Excel: "don't display this text — compute it."

Formulas can:

  • Perform basic math (=10+5)
  • Reference cell values (=A1+B1)
  • Use built-in functions (=SUM(A1:A10))
  • Combine logic and conditions (=IF(A1>100,"Over Budget","OK"))

The distinction between a formula and a function trips up a lot of beginners. A formula is the full expression you enter into a cell. A function — like SUM, AVERAGE, or VLOOKUP — is a pre-built operation you call within a formula.

How to Enter a Formula in Excel

The Basic Steps

  1. Click the cell where you want the result to appear
  2. Type = to begin the formula
  3. Enter your expression — this could be math, a cell reference, or a function name
  4. Press Enter to confirm

Excel immediately calculates and displays the result. The formula itself stays visible in the formula bar at the top of the screen whenever that cell is selected.

Using Cell References

Instead of typing raw numbers, most formulas reference cells. For example:

  • =A2+B2 adds whatever values are in cells A2 and B2
  • =C5*0.08 multiplies the value in C5 by 8%
  • =D10-D9 subtracts D9 from D10

This matters because if you change the value in A2, the formula result updates automatically — no manual recalculation needed.

Absolute vs. Relative References 📌

This is one of the most important concepts when copying formulas across multiple cells.

Reference TypeSyntaxBehavior When Copied
Relative=A1Adjusts to match new row/column position
Absolute=$A$1Always points to the exact same cell
Mixed=$A1 or =A$1Locks either column or row, not both

Use the F4 key to cycle through reference types while editing a formula. If you're building a tax rate or conversion factor into a formula, an absolute reference prevents it from shifting when you copy the formula down a column.

Common Excel Functions to Know

Excel includes hundreds of built-in functions. These are the ones most users encounter first:

FunctionWhat It DoesExample
SUMAdds a range of numbers=SUM(B2:B20)
AVERAGEReturns the mean of a range=AVERAGE(C2:C10)
COUNTCounts cells containing numbers=COUNT(A1:A50)
COUNTACounts non-empty cells=COUNTA(A1:A50)
MIN / MAXFinds lowest or highest value=MAX(D2:D15)
IFReturns one value or another based on a condition=IF(A1>=60,"Pass","Fail")
VLOOKUPSearches a column and returns a matching value=VLOOKUP(E2,A:C,3,FALSE)
CONCATENATE / &Joins text strings=A1&" "&B1

To browse available functions, click the fx button next to the formula bar. Excel's function wizard lets you search by name or category and guides you through required arguments.

Entering Formulas Efficiently

AutoSum Shortcut ⚡

For quick column or row totals, select a cell directly below or beside a range of numbers and press Alt + = (Windows) or Command + Shift + T (Mac). Excel guesses the intended range and inserts a SUM formula automatically.

Copying Formulas Down a Column

Once a formula is in one cell, you can copy it to adjacent cells by:

  • Dragging the fill handle (the small green square at the bottom-right of a selected cell) downward
  • Double-clicking the fill handle to auto-fill to the end of an adjacent data range
  • Using Ctrl+C then selecting the destination range and pressing Ctrl+V

Relative references will adjust row-by-row as expected.

Nested Formulas

Formulas can contain other formulas. A common example:

=IF(SUM(B2:B10)>1000,"Target Met","Below Target")

Nesting lets you build more nuanced logic, but it adds complexity quickly. Excel supports up to 64 levels of nesting — though most practical use cases stay well within single digits.

When Formulas Don't Work

Common error messages you'll encounter:

ErrorLikely Cause
#DIV/0!Formula is dividing by zero or an empty cell
#VALUE!Wrong data type — often text where a number is expected
#REF!A referenced cell has been deleted
#NAME?Excel doesn't recognize a function name (check spelling)
#N/AA lookup function couldn't find a match

The formula auditing tools under the Formulas tab — including Trace Precedents, Trace Dependents, and Evaluate Formula — help you step through what Excel is calculating and where things break down.

Variables That Shape How You'll Use Formulas

How deeply you'll work with formulas depends on several factors that vary from user to user:

  • Your Excel version — Features like XLOOKUP, IFS, and dynamic array functions (FILTER, SORT, UNIQUE) are only available in Excel 2019, Microsoft 365, and some Excel Online plans. Older versions require workarounds.
  • Your data structure — Well-organized data with consistent column headers makes formulas far easier to build and maintain.
  • Your use case — A simple budget tracker needs very different formulas than a sales dashboard pulling from multiple sheets.
  • Your skill level — Beginners often start with SUM and IF; more advanced users layer in array formulas, dynamic ranges, and cross-sheet references.
  • Desktop vs. web — Excel in a browser (Excel Online) supports most common formulas but has some functional and interface limitations compared to the desktop application.

The mechanics of entering a formula are the same everywhere — but which formulas you need, how complex they get, and which features are available to you depends entirely on the combination of your version, your data, and what you're actually trying to build. 🔍