How to Write Google Sheets Formulas: Step-by-Step

How-to basics · Updated December 1, 2026

Writing a formula in Google Sheets is as simple as clicking a cell, typing an equals sign (=), and then entering the calculation or function you want. For example, to add the numbers in cells A1 and B1, click C1, type =A1+B1, and press Enter. This guide walks you through the exact steps, from basic arithmetic to using built-in functions like SUM and IF, with common mistakes and troubleshooting tips.

What You’ll Need

  • A Google account (free) and access to Google Sheets in a web browser.
  • A spreadsheet with some data, or a blank sheet to practice on.
  • Basic familiarity with clicking cells and typing in the formula bar (the bar above the column letters).

Step-by-Step

  1. Open Google Sheets and create or open a spreadsheet. Go to sheets.google.com, sign in, and either click a blank sheet or open an existing file.
  2. Select the cell where you want the result to appear. Click any cell, for example C1. The cell will be highlighted with a border.
  3. Type the equals sign (=) to start the formula. Every formula in Google Sheets must begin with =. Without it, Google Sheets treats your input as text, not a formula.
  4. Enter your calculation or function. You can type a simple arithmetic expression like =A1+B1 or use a function like =SUM(A1:A10). Functions are pre-built formulas that perform specific tasks. For example, =AVERAGE(B2:B20) calculates the average of numbers in that range.
  5. Press Enter on your keyboard. Google Sheets calculates the result and displays it in the selected cell. The formula itself remains visible in the formula bar when you click the cell again.
  6. Use cell references instead of typing numbers directly. Instead of =5+10, type =A1+B1. This way, if you change the value in A1 or B1, the formula automatically recalculates. To reference a cell, you can type its column letter and row number (e.g., A1) or click the cell while writing the formula.
  7. Use ranges for multiple cells. A range is a group of cells, written as start:end, like A1:A10. For example, to add all numbers in column A from row 1 to row 10, type =SUM(A1:A10).
  8. Combine functions with operators. You can mix functions and arithmetic. For instance, to add the sum of A1:A5 to the value in B1, type =SUM(A1:A5)+B1. Use parentheses to control order: =(A1+B1)*C1 multiplies the sum by C1.
  9. Use comparison operators for logical tests. Symbols like > (greater than), < (less than), and = (equal to) let you compare values. For example, =A1>10 returns TRUE if A1 is greater than 10, otherwise FALSE.
  10. Write an IF function for conditional logic. The IF function checks a condition and returns one value if true, another if false. Syntax: =IF(condition, value_if_true, value_if_false). For example, with a score in A1, =IF(A1>=60, "Pass", "Fail") returns “Pass” if the score is 60 or above, and “Fail” otherwise.
  11. Drag the fill handle to copy formulas. After entering a formula, click the cell again. You’ll see a small blue square in the bottom-right corner. Click and drag it down or across to copy the formula to adjacent cells. Google Sheets automatically adjusts cell references relative to the new location (e.g., copying =A1+B1 from C1 to C2 changes it to =A2+B2).
  12. Use absolute references when needed. If you don’t want a reference to change when copying, add dollar signs: $A$1 locks both column and row. For example, to multiply each value in column A by a fixed tax rate in B1, use =A2*$B$1 in C2 and copy down.

Common Mistakes

  • Forgetting the equals sign. Typing A1+B1 without the = results in text, not a calculation.
  • Using the wrong cell reference. Double-check that you’re referencing the correct cells, especially when copying formulas.
  • Mismatched parentheses. Every opening parenthesis must have a closing one. Google Sheets usually warns you with a red error message.
  • Using commas instead of colons in ranges. A range is A1:A10, not A1,A10 (which would mean two separate cells).
  • Typing text without quotes in functions. In IF, text values must be in double quotes: "Pass", not just Pass.
  • Mixing up argument separators. In Google Sheets, use commas to separate arguments (e.g., =IF(A1>10, "Yes", "No")). Some regions use semicolons, but the default is comma.

Tips

  • Start with the function wizard. Click a cell, type =, and then type a letter (like s) to see a dropdown of functions. Select one to see its syntax and description.
  • Use the formula bar for editing. Click a cell with a formula, then edit it in the formula bar above the spreadsheet. Press Enter to apply changes.
  • Learn common functions first. SUM, AVERAGE, COUNT, MAX, MIN, and IF cover most basic needs. For example, =COUNT(A1:A10) counts how many cells contain numbers.
  • Use keyboard shortcuts. Press Enter to confirm a formula, Esc to cancel, and F2 (or Ctrl+Enter on Mac) to edit the active cell.
  • Test on a small dataset. Before applying a formula to hundreds of rows, try it on a few cells to verify the logic.
  • Use named ranges for clarity. Select a range, go to Data > Named ranges, and give it a name like Sales. Then you can write =SUM(Sales) instead of =SUM(A1:A100).

Troubleshooting

  • Formula shows as text. If you see the formula as plain text, you likely forgot the equals sign. Click the cell, add = at the beginning, and press Enter.
  • #ERROR! or #DIV/0! appears. This means the formula can’t be calculated. Common causes: dividing by zero (=A1/B1 where B1 is 0), or a typo in the function name. Check the formula and the referenced cells.
  • #NAME? error. This usually means you misspelled a function name or used text without quotes. For example, =SUMM(A1:A10) should be =SUM(A1:A10), and =IF(A1>10, Yes, No) should have quotes around Yes and No.
  • #REF! error. This means a reference is invalid, often because a column or row was deleted. Click the cell, check the formula, and update the references.
  • Formula not updating when I change data. Google Sheets recalculates automatically, but if you see stale results, try pressing Ctrl+R (Windows) or Cmd+R (Mac) to refresh the page. Also ensure the cell is not formatted as text.
  • Wrong result with IF. Double-check the condition and the true/false values. For example, =IF(A1>10, "High", "Low") returns “High” if A1 is greater than 10, otherwise “Low”. If the result seems reversed, check the comparison operator.

Frequently Asked Questions

  1. Can I use formulas across different sheets in the same spreadsheet? Yes. Reference a sheet by name, like =Sheet2!A1. If the sheet name has spaces, use single quotes: ='My Sheet'!A1.
  2. How do I add a column of numbers quickly? Click the cell below the column, type =SUM(, then select the range (e.g., A1:A10), close the parenthesis, and press Enter. Or use the shortcut Alt+Shift+= (Windows) or Cmd+Shift+T (Mac) to insert a SUM automatically.
  3. What’s the difference between a formula and a function? A formula is any expression that starts with =, like =A1+B1. A function is a predefined formula, like =SUM(A1:A10). All functions are formulas, but not all formulas use functions.
  4. Can I use text in formulas? Yes. Enclose text in double quotes, like ="Total: "&A1 which concatenates the text “Total: ” with the value in A1. The ampersand (&) is the concatenation operator.
  5. How do I copy a formula without changing references? Use absolute references with dollar signs, like $A$1. Alternatively, copy the formula text from the formula bar and paste it into another cell.
  6. Why does my formula show a green triangle warning? This is a Google Sheets error indicator. Click the cell to see the warning, which often says “Formula parse error” or “Inconsistent formula.” Review the formula and fix the issue, such as a missing parenthesis or a range that doesn’t match adjacent formulas.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.