Essential Functions: SUM to ROUND
Use SUM, AVERAGE, MIN, MAX, COUNT, COUNTA and ROUND, understand function arguments, and avoid the mistakes that silently distort totals.
Welcome back!
Step 1 of 12Learn
From 200 plus signs to one word
Malik tracks his freelance invoices: 200 rows, with amounts in column C. Adding them with plus signs would mean typing =C2+C3+C4… two hundred times, and missing one row would go unnoticed.
A function is a named, built-in calculation. Instead of the long chain, he types:
=SUM(C2:C201)
Every function follows the same pattern: the name, then parentheses containing its inputs, called arguments, separated by commas. SUM can take one range, several ranges or individual cells: =SUM(C2:C201, E2, 100) adds all of them.
When you type = and the first letters of a function name, Sheets shows a dropdown of matching functions. Choose one and a help box appears showing what arguments it expects, with an example. Arguments in square brackets, such as [is_sorted], are optional.
The fastest way to total a column: select the cell below the numbers and use Insert > Function > SUM, or the Σ button on the toolbar. Sheets guesses the range; check it before pressing Enter. You can also select any range and glance at the bottom-right corner of the screen, where Sheets shows the sum of the selection. Click it to see the average, count, minimum and maximum too, without writing any formula.
Step 2 of 12Practice · Match the pairs
Match each function with what it returns.
Tap an answer, then tap the place where it belongs (or drag it there).
- =SUM(B2:B10)
- =AVERAGE(B2:B10)
- =MAX(B2:B10)
- =COUNT(B2:B10)
- =COUNTA(B2:B10)
Step 3 of 12Learn
The core six
Six functions handle a remarkable share of everyday work:
- SUM(range) adds numbers.
- AVERAGE(range) adds the numbers and divides by how many there are.
- MIN(range) and MAX(range) find the smallest and largest values.
- COUNT(range) counts cells that contain numbers.
- COUNTA(range) counts cells that are not empty, whatever they contain.
Here's a worked example. A class quiz has scores in B2:B7: 18, 15, (blank), 20, "absent", 12.
- =SUM(B2:B7) = 18 + 15 + 20 + 12 = 65. Text and blanks are ignored.
- =COUNT(B2:B7) = 4 numeric cells.
- =COUNTA(B2:B7) = 5 non-empty cells, because "absent" counts.
- =AVERAGE(B2:B7) = 65 ÷ 4 = 16.25. The blank and "absent" are skipped, not counted as zero.
- =MAX(B2:B7) = 20 and =MIN(B2:B7) = 12.
Notice that AVERAGE skips blanks and text. That's usually right, but if "absent" should count as zero points, you must enter 0, or the average looks better than it should. Decide what an empty cell means before you calculate.
You can nest functions inside each other: =MAX(B2:B7)-MIN(B2:B7) gives the range of scores (8 points from lowest to highest).
Step 4 of 12Practice · Work it out
Cells A1:A6 contain 10, 20, (blank), 30, "n/a", 40. What does =AVERAGE(A1:A6) return?
Step 5 of 12Compare
How functions treat blanks, text and zeros
| Aspect | SUM | AVERAGE | COUNT | COUNTA |
|---|---|---|---|---|
| A blank cell | Ignored | Skipped (not counted as 0) | Not counted | Not counted |
| Text such as "absent" | Ignored | Skipped | Not counted | Counted |
| The number 0 | Adds nothing | Counted, pulls the average down | Counted | Counted |
Step 6 of 12Learn
ROUND and the missing cent
Remember that formatting changes only how a number looks. That can produce totals that seem wrong.
Suppose three items cost $10.004, $10.004 and $10.004 after a discount calculation. Formatted to two decimals, each displays as $10.00. Their SUM is 30.012, displayed as $30.01. A customer adding the visible prices gets $30.00 and thinks your invoice is off by a cent.
ROUND fixes this by changing the actual value:
=ROUND(value, places)
- =ROUND(10.004, 2) returns 10 (shown as 10.00).
- =ROUND(2.675, 1) returns 2.7.
- =ROUND(1234, -2) returns 1200; negative places round to tens, hundreds and so on.
Round each line item where the rounding legally or practically happens, such as each invoice line, and then sum the rounded values. Its cousins ROUNDUP and ROUNDDOWN always round away from or toward zero: ROUNDUP is handy for things you can't buy in fractions, such as "how many boxes do I need?" If 130 items fit 12 per box, =ROUNDUP(130/12, 0) returns 11 boxes, while ROUND would give 11 here too but could round 10.2 boxes down to 10 and leave items without a box.
A related function is SUMPRODUCT, which multiplies matching items in two ranges and adds the results, so =SUMPRODUCT(B2:B10, C2:C10) gives the total of quantity × price for every row in one formula.
Step 7 of 12Try the calculator
ROUND, ROUNDUP and ROUNDDOWN
Enter a positive value and the number of decimal places to keep. ROUND goes to the nearest value, ROUNDUP always away from zero, ROUNDDOWN always toward zero. Try 250/24 = 10.4167 with 0 places to see why ROUNDUP fits packing problems.
- =ROUND(value, places)
- 31.42
- =ROUNDUP(value, places)
- 31.42
- =ROUNDDOWN(value, places)
- 31.41
Step 8 of 12Note
Step 9 of 12Practice · Choose one
A tracking sheet lists 40 tasks in column A. Column B shows the hours spent, but some tasks have no hours yet (blank). Which formula counts how many tasks have hours recorded?
Step 10 of 12Note
Step 11 of 12Practice · Work it out
You need to pack 250 jars into boxes that hold 24 jars each. What does =ROUNDUP(250/24, 0) return?
Step 12 of 12Practice · True or false
If a column of prices is formatted to show two decimal places, SUM uses only the two displayed decimals when adding them.
Lesson complete!