Google Sheets formulas: the complete guide to 40+ essential functions
Every formula you actually need to learn — organized into 8 categories, with syntax, examples, and links to deep-dive guides. Whether you're writing your first =SUM(A1:A10) or your hundredth =QUERY, this is the reference that answers "which formula do I need for this?" Bookmark this page — it's designed as the daily reference you'll come back to.
COUNTA · MIN · MAX
OR · IFERROR
INDEX+MATCH · HLOOKUP
LEFT · RIGHT · MID · TRIM · SPLIT
UPPER · LOWER · PROPER
DATEDIF · EOMONTH · WEEKDAY
COUNTIFS · AVERAGEIF
UNIQUE · QUERY · IMPORTRANGE
GOOGLEFINANCE · IMAGE
📖 Full contents
- What are Google Sheets formulas?
- Formula basics — every essential concept
- Category 1: Basic aggregations (6)
- Category 2: Conditional logic (5)
- Category 3: Lookups (4)
- Category 4: Text manipulation (9)
- Category 5: Dates & time (5)
- Category 6: Conditional aggregation (5)
- Category 7: Sheets-native superpowers (6) ★
- Category 8: Google-only magic (3) ★
- Formula best practices
- Common beginner mistakes
- What to learn next — deep-dive guides
- Frequently asked questions
What are Google Sheets formulas?
A formula is any expression that starts with an equal sign (=) and tells Google Sheets to calculate something. Functions like SUM or VLOOKUP are pre-built named operations you use inside formulas. Together, formulas and functions turn a spreadsheet from a static grid of data into a live calculating engine.
Sheets ships with over 400 built-in functions. This guide focuses on the 40 or so you'll actually reach for in real work — the essential vocabulary that covers 95% of what people do with spreadsheets. Everything else is specialized (statistics, engineering, financial modeling) and can be learned as needed.
💡 How this guide is organized
Functions are grouped by what they help you accomplish, not alphabetically. Start with basics if you're new. Skip to Superpowers if you know standard spreadsheet functions but want to see what makes Sheets uniquely powerful. Each function card includes syntax and a copy-ready example.
For functions with deep-dive guides (marked with a "Deep Dive" link), start here for context, then click through when you need the full picture.
Formula basics — every essential concept
Before diving into specific functions, six concepts unlock every formula in this guide:
=. Without it, Sheets treats your input as text. =A1+B1 calculates; A1+B1 displays the literal text.A1, B5, Z100. Reference cells on other sheets with SheetName!A1. Case-insensitive.A1:C10 (three columns, ten rows). Entire column: A:A. Entire row: 1:1. Multiple columns: A:H.A1 is relative — it shifts when you copy the formula. $A$1 is absolute — it stays fixed. $A1 locks the column only. A$1 locks the row only. Press F4 to toggle.+ - * / ^. Comparison: = < > <= >= <>. Text join: &. Standard precedence — parentheses first, then powers, then multiplication/division, then addition/subtraction.SUM(A1, B1, C1) has three arguments. Some are required, some optional (shown in [brackets]).As you type =SU, Sheets shows a dropdown of matching functions with descriptions. Press Tab to accept. This is the fastest way to discover new functions — type what you're trying to do and see what comes up.
Category 1 — Basic aggregations
These six functions handle the most common task in any spreadsheet: summarizing numbers. Learn these first — you'll use them daily.
=SUM(B2:B100) — totals 99 values in column B=AVERAGE(B2:B100) — mean of 99 values=COUNT(B2:B100) — how many are actual numbers=COUNTA(A2:A100) — rows with any data=MIN(B2:B100) — smallest amount=MAX(B2:B100) — largest amountCategory 2 — Conditional logic
Logic functions let your formulas make decisions. IF is the workhorse; the others build on it. Together they handle branching, validation, and error-safe calculations.
=IF(B2>100, "Approved", "Pending")=IFS(B2>90,"A",B2>80,"B",B2>70,"C",TRUE,"F")=IF(AND(B2>100, C2="Active"), "Yes", "No")=IF(OR(C2="VIP", B2>1000), "Priority", "Standard")=IFERROR(VLOOKUP(A2, D:E, 2, FALSE), "Not found")Category 3 — Lookups
Lookup functions find values in tables — the second-most-important skill in spreadsheets after basic aggregation. Master at least one of VLOOKUP or XLOOKUP.
=VLOOKUP(A2, Products!A:D, 3, FALSE) — finds A2 in Products column A, returns column C value=XLOOKUP(A2, Products!A:A, Products!C:C, "Not found")=INDEX(Products!C:C, MATCH(A2, Products!A:A, 0))=HLOOKUP("Q3", A1:E5, 3, FALSE)Category 4 — Text manipulation
Cleaning, splitting, joining, and reformatting text is a huge part of real spreadsheet work. These nine functions handle almost every text-cleanup task.
&) operator does the same thing more compactly.=CONCATENATE(A2, " ", B2) — joins first and last name=TEXTJOIN(", ", TRUE, A2:A10)=LEFT(A2, 3) — first 3 characters=RIGHT(A2, 4) — last 4 characters=MID(A2, 5, 3) — 3 chars starting at position 5=LEN(A2) — character count=TRIM(" hello world ") → "hello world"=SPLIT(A2, ",") — splits CSV values across columns=PROPER("zain khan") → "Zain Khan"Category 5 — Dates & time
Working with dates unlocks time-based analysis, tenure calculations, and scheduled workflows. Sheets stores dates as numbers under the hood (days since December 30, 1899), so date math just works.
=TODAY() - A2 — days since date in A2=NOW() — "2026-09-03 14:32:15"=DATE(2026, 9, 3) — September 3, 2026=DATEDIF(A2, TODAY(), "Y") — years elapsed=EOMONTH(TODAY(), 0) — end of current month=WEEKDAY(A2, 2) — 1=Mon, 7=SunCategory 6 — Conditional aggregation
The "IF" family of aggregations — sum, count, or average only rows matching one or more conditions. These replace hundreds of manual filter-then-sum operations.
=SUMIF(B:B, "North", H:H) — total sales for North=SUMIFS(H:H, B:B, "North", D:D, "Software")=COUNTIF(B:B, "North") — number of Northern rows=COUNTIFS(B:B, "North", H:H, ">500")=AVERAGEIF(B:B, "North", H:H)Category 7 — Sheets-native superpowers ★
These six functions are what make Google Sheets fundamentally different from Excel. Master any one of them and your workbooks become dramatically more maintainable. Master all six and you're operating at a professional level.
=ARRAYFORMULA(A2:A100 * B2:B100) — 99 multiplications in one formula=QUERY(A:H, "SELECT B, SUM(H) WHERE C='Software' GROUP BY B", 1)=IMPORTRANGE("https://docs.google.com/spreadsheets/d/ABC/edit", "Sales!A:H")=FILTER(A2:H100, B2:B100="North", H2:H100>500)=SORT(A2:H100, 8, FALSE) — sort by column 8 descending=UNIQUE(B2:B100) — distinct regions📚 The three Sheets pillar guides
These functions are so foundational to Sheets that each has its own complete deep-dive guide. Together they cover the "big three" that make Sheets architecture possible.
Category 8 — Google-only magic ★
Three functions that exist only in Google Sheets and demonstrate the platform's cloud-native advantages. Excel simply cannot do these in a cell formula — they require external tools or add-ins.
=GOOGLETRANSLATE("Hello world", "en", "es") → "Hola mundo"=GOOGLEFINANCE("GOOG", "price") — current Google stock price=IMAGE("https://example.com/product.jpg")Formula best practices
Five habits that separate professional Sheets workbooks from ones that break under real use:
1. Use ARRAYFORMULA to avoid dragging
Instead of writing =A2*B2 and dragging down 99 rows, write =ARRAYFORMULA(A2:A100*B2:B100) once. One formula, one place to maintain, one source of truth. When you add new rows, the calculation extends automatically. This single practice prevents most "broken workbook" scenarios.
2. Wrap risky formulas in IFERROR
Any VLOOKUP, division, or QUERY can fail. Instead of showing users a jarring #N/A or #DIV/0!, wrap the formula: =IFERROR(risky_formula, ""). The empty string is invisible; a friendly message like "Not found" is even better. Professional workbooks never show raw error codes to end users.
3. Use named ranges for readability
Instead of =SUMIFS(H:H, B:B, "North", D:D, "Software"), define named ranges (Data → Named ranges): Sales, Region, Category. Then write =SUMIFS(Sales, Region, "North", Category, "Software"). Formulas become self-documenting. Six months later when you return to the workbook, you'll thank yourself.
4. Reserve raw data on separate sheets
Keep imported data (from IMPORTRANGE, CSVs, or manual entry) on dedicated "raw" sheets. Build calculations, pivots, and dashboards on separate sheets that reference the raw data. This separation makes it safe to refresh raw data without breaking downstream logic.
5. Comment complex formulas with N() or a helper cell
Sheets doesn't have inline formula comments, but you can add +N("Comment goes here") at the end of any numeric formula (N() returns 0 for text, so it doesn't affect the result). Or use a helper cell next to the formula with a plain-English explanation. Complex formulas without comments are landmines for future you.
Ask yourself: "If I open this workbook in 30 days, will I understand this formula?" If the answer is no, add a comment, use named ranges, or restructure. Formulas you don't understand later are formulas you'll break trying to fix.
Common beginner mistakes
❌ Curly quotes from copy-paste
Copying formulas from Google Docs, emails, or web pages often replaces straight quotes (") with curly quotes ("). Sheets doesn't recognize curly quotes and returns #ERROR!. Always retype quotes after pasting formulas from external sources.
❌ Forgetting the = sign
Typing SUM(A1:A10) without the leading = makes Sheets treat it as literal text. The cell shows "SUM(A1:A10)" instead of calculating. Always start with =.
❌ Missing $ for absolute references
Dragging =A1*B$1 down works — B$1 stays fixed. But dragging =A1*B1 shifts to =A2*B2, then =A3*B3, breaking your calculation. When copying formulas that reference a fixed cell (like a tax rate or conversion factor), always use $ to lock it.
❌ Comparing text with different capitalizations
Sheets treats "NORTH" and "north" as equal in most comparisons, but not always. Use LOWER() or UPPER() to normalize before comparing: =IF(LOWER(A2)=LOWER(B2), "Match", "Different"). Also always TRIM values from imported data — invisible whitespace breaks equality checks.
❌ Using single cell references where ranges are needed
=ARRAYFORMULA(A2 * B2) only calculates one row. =ARRAYFORMULA(A2:A100 * B2:B100) calculates all 99. When wrapping a formula in ARRAYFORMULA, verify every reference inside is a range, not a single cell.
❌ Mismatched range dimensions in ARRAYFORMULA
=ARRAYFORMULA(A2:A100 * B2:B50) fails because the ranges are different sizes. Ranges inside ARRAYFORMULA must match dimensions exactly — same row count for vertical operations, same column count for horizontal.
What to learn next — deep-dive guides
Once you're comfortable with the essentials above, these deep-dive guides take you to the next level:
| If you want to learn... | Read this next |
|---|---|
| SQL-like queries in a single formula | QUERY Complete Guide |
| Applying formulas to whole ranges without dragging | ARRAYFORMULA Complete Guide |
| Live cross-workbook data | IMPORTRANGE Complete Guide |
| Deep understanding of lookups | VLOOKUP Guide or XLOOKUP Guide |
| Building dashboards and dynamic reports | Dashboard Templates |
| Choosing between Excel and Google Sheets | Excel vs Google Sheets |
Frequently asked questions
What are the most essential Google Sheets formulas to learn first?
Start with SUM, AVERAGE, COUNT, and IF — these four cover most day-one needs. Then add VLOOKUP for joining data, SUMIF for conditional totals, and IFERROR to handle errors gracefully. Once comfortable, learn ARRAYFORMULA and QUERY — these two Sheets-native superpowers transform how you build workbooks and have no direct Excel equivalent.
Do Google Sheets formulas work in Excel?
Most standard formulas work identically in both — SUM, IF, VLOOKUP, COUNTIF, and 80% of common functions are cross-compatible. Sheets-specific formulas that don't exist in Excel include ARRAYFORMULA, QUERY, IMPORTRANGE, GOOGLETRANSLATE, GOOGLEFINANCE, and IMAGE. Similarly, some newer Excel functions like XLOOKUP now work in both, while Excel-specific dynamic array behaviors work differently in Sheets.
How do I write a formula in Google Sheets?
Every formula starts with an equal sign (=). Type = in any cell, then the function name (like SUM), open a parenthesis, add your arguments (cell references, ranges, or values), close the parenthesis, and press Enter. Example: =SUM(A1:A10) adds all values from A1 through A10. Sheets shows autocomplete suggestions as you type, making it easy to discover functions.
What's the difference between a formula and a function in Google Sheets?
A function is a pre-built named operation like SUM or VLOOKUP. A formula is any expression that starts with = — it can be a simple calculation (=A1+B1), a single function (=SUM(A1:A10)), or a complex combination of multiple functions (=IF(SUM(A1:A10)>100, VLOOKUP(B1, C:D, 2, FALSE), 0)). Functions are the building blocks; formulas are what you build with them.
Why do my Google Sheets formulas show a #REF! or #ERROR! message?
#REF! usually means a cell reference is invalid — either the cell was deleted, or your formula's spill area is blocked by existing data. #ERROR! typically indicates a syntax problem — often curly quotes from a copy-paste (") instead of straight quotes ("), missing parentheses, or wrong argument types. #NAME? means Sheets doesn't recognize a function name — check spelling. Hover over the error to see specific guidance.
What is ARRAYFORMULA and why is it so important in Google Sheets?
ARRAYFORMULA lets you apply a formula to an entire range at once instead of dragging it down row by row. One ARRAYFORMULA in a single cell replaces hundreds of manual formulas. This eliminates "drag-down maintenance" — the leading cause of broken Sheets workbooks — and is why serious Sheets users organize workbooks around ARRAYFORMULA from day one. Excel accomplishes similar work with dynamic arrays, but ARRAYFORMULA remains the Sheets-native standard.
What's the difference between VLOOKUP and XLOOKUP in Google Sheets?
VLOOKUP is the classic lookup function — it requires the lookup column to be the leftmost column of your table and only searches left-to-right. XLOOKUP (added to Sheets in 2022) is more flexible — it can search in any direction, doesn't require sorted data, and handles errors natively. For new work, prefer XLOOKUP; for legacy compatibility with older Sheets or Excel, use VLOOKUP.
How do QUERY and FILTER differ in Google Sheets?
FILTER returns rows matching one or more conditions but doesn't aggregate, sort, or reshape output. QUERY is far more powerful — it uses SQL-like syntax to filter, sort, group, aggregate, and pivot data in a single formula. Use FILTER for simple "show me rows where X" queries. Use QUERY for anything involving totals, groupings, sorting output, or cross-tabulation. QUERY has a steeper learning curve but does what would take multiple FILTER + SORT + SUMIF formulas.
Are there formulas unique to Google Sheets that Excel doesn't have?
Yes — several. ARRAYFORMULA (though Excel dynamic arrays are similar), QUERY (SQL-style queries in a cell), IMPORTRANGE (live cross-workbook data), GOOGLETRANSLATE (translate text between languages), GOOGLEFINANCE (real-time stock data), IMPORTHTML (scrape tables from web pages), IMPORTXML (extract data from XML/HTML), and IMAGE (embed images from URLs). These Google-specific functions are why many teams choose Sheets over Excel for connected workflows.
How many formulas can Google Sheets handle in one workbook?
Google Sheets supports up to 10 million cells per workbook total. There's no hard limit on formula count, but performance degrades as you approach the cell limit or use many complex formulas. IMPORTRANGE has a specific limit of 50 formulas per workbook. For heavy workbooks, use ARRAYFORMULA to consolidate hundreds of dragged formulas into single cells — this dramatically improves calculation speed.
Related resources
Bottom line: These 40+ functions cover 95% of what people actually do with Google Sheets. Start with the basics, master the "must-know" tier, then unlock the Sheets superpowers. Bookmark this page — it's designed to be the reference you return to as your knowledge grows.