Skip to content
ArumSoft Learning
KO

    The 20 Most-Used Excel Functions · Tutorial 1 of 20

    How to Use the SUM Function in Excel

    Add up a column, a row or scattered cells with SUM, and get a total in one keystroke with AutoSum.

    Level
    Beginner
    Time
    11 min read
    Updated:
    Applies to:
    Excel for Microsoft 365, Excel 2021, Excel 2019, Excel for the web
    One range, B2:C6, covers both columns. The team total in B7 is 72 hours.
    Example: One range, B2:C6, covers both columns. The team total in B7 is 72 hours.

    What you'll learn

    • Write a SUM formula that adds a range of cells
    • Add cells that aren't next to each other
    • Insert a total in one step with AutoSum
    • Spot the mistakes that make a total wrong

    Before you start

    None — this is a good first tutorial.

    Function Playground

    Try SUM in a live sheet

    Type formulas in an Excel-style grid and watch each step of the calculation. Free, no sign-up.

    SUM is the function you'll use more than any other: it adds numbers. Point it at some cells and it returns their total, and the total updates by itself whenever one of those numbers changes.

    The syntax

    =SUM(number1, [number2], ...)
    • number1 is the first thing to add: a single cell (B2), a range of cells (B2:B5) or a number.
    • number2, … are optional. Separate them with commas; a single SUM takes up to 255 arguments in all.
    Reading a SUM formula
    =SUM(B2:B5,D2,100)
    1. B2:B5A range: every cell from B2 down to B5
    2. D2A single cell
    3. 100A number typed straight into the formula

    Add a column of numbers

    The example below is a small monthly budget. The goal is a total in B6.

    1. Click the cell where the total should appear

      Click B6, the empty cell under the amounts.

      AB
      1ExpenseAmount
      2Rent1,200
      3Groceries450
      4Utilities180
      5Transport120
      6Total
      7Rent + Utilities
      A small budget. The total goes in B6, directly under the four amounts.
    2. Type =SUM(

      Type an equals sign, the word SUM and an opening parenthesis. Every formula starts with =, which tells Excel to calculate instead of treating what you type as text. Capitals don't matter: =sum( works too.

    3. Select the numbers to add

      Drag from B2 down to B5. Excel writes the range into the formula for you, B2:B5, and outlines those cells on the sheet. You can also type the range yourself.

      AB
      1ExpenseAmount
      2Rent1,200
      3Groceries450
      4Utilities180
      5Transport120
      6Total=SUM(B2:B5
      7Rent + Utilities
      While you select, the formula shows the range being added, and the cells are outlined.
    4. Press Enter

      Excel adds the closing parenthesis for you and shows the result, 1,950. Click B6 again: the cell shows the total, and the formula bar shows the formula behind it.

      =SUM(B2:B5)
      AB
      1ExpenseAmount
      2Rent1,200
      3Groceries450
      4Utilities180
      5Transport120
      6Total1,950
      7Rent + Utilities
      The finished total. Change any amount in B2:B5 and B6 updates immediately.

    The fast way: AutoSum

    Click the empty cell directly under (or to the right of) your numbers and press Alt+=. On a Mac, press Cmd+Shift+T. You can also click AutoSum (the Σ button) on the Home tab.

    Excel writes the SUM formula and guesses the range. Check the outlined cells before you press Enter: AutoSum stops at the first blank cell or heading, so in a list with gaps it can select too little.

    Add cells that aren't next to each other

    Separate the cells with commas. To add only Rent (B2) and Utilities (B4):

    =SUM(B2,B4)

    That returns 1,380. While you're typing the formula, you can also hold Ctrl (Cmd on a Mac) and click each cell; Excel inserts the commas for you.

    You can mix ranges, single cells and numbers in one formula. This adds two columns of amounts plus a fixed 100:

    =SUM(B2:B5,D2:D5,100)

    What SUM skips, and why it beats +

    In a range, SUM adds only numbers:

    What's in the cellHow SUM treats it
    A number, including 0, or a dateAdded
    Nothing (an empty cell)Skipped
    Text, such as "n/a", or a number stored as textSkipped
    TRUE or FALSESkipped
    An error value, such as #N/ASUM returns the error

    You could also total the budget with =B2+B3+B4+B5, and you'd get the same 1,950. SUM is still the better habit for two reasons. If one of the cells holds text such as "n/a", the + formula returns #VALUE!, while SUM skips the text. And if you insert a row inside the range, Excel stretches B2:B5 to include it, while a + formula leaves the new cell out.

    SUM adds everything you give it. When you need to add only some of the numbers, reach for one of its relatives:

    FunctionWhat it addsExample
    SUMEvery number in the cells you give it=SUM(B2:B5)
    SUMIFOnly the cells that meet one condition=SUMIF(B2:B5,">200") adds the amounts over 200
    SUMIFSOnly the rows that meet every one of several conditions=SUMIFS(C2:C9,A2:A9,"East",B2:B9,"Jan")
    SUBTOTAL with 9Only the rows a filter leaves visible=SUBTOTAL(9,B2:B5)
    SUMPRODUCTMultiplies pairs of cells, then adds the results=SUMPRODUCT(B2:B5,C2:C5) for quantity times price

    On the budget above, =SUMIF(B2:B5,">200") returns 1,650: Rent and Groceries are over 200, Utilities and Transport aren't.

    Real-world scenarios

    Work

    Total a team's hours for the week

    Mina and Leo log their hours in two columns, one row per day. Payroll needs one number: every hour the two of them worked.

    ABC
    1DayMinaLeo
    2Mon86
    3Tue7.58
    4Wed88
    5Thu68
    6Fri8.54
    7Team total72
    One range, B2:C6, covers both columns. The team total in B7 is 72 hours.
    =SUM(B2:C6)

    It returns 72: Mina's 38 hours plus Leo's 34. A range can be a whole block, not only one column, so you don't need a total for each person first. Half hours such as 7.5 are added like any other number.

    School

    Add up ticket sales across a row

    Three classes sell tickets for a school concert, and each class's daily sales run across a row. Each class's total goes at the end of its row, in column G.

    ABCDEFG
    1ClassMonTueWedThuFriTotal
    27A1281510954
    37B611914747
    47C10101281353
    Each total adds its own row, Monday to Friday. Class 7A sold 54 tickets.
    =SUM(B2:F2)

    Class 7A sold 54 tickets: 12 + 8 + 15 + 10 + 9. Fill the formula down to G4 and each copy adds its own row: 7B sold 47 and 7C 53. For the whole school, add the three totals: =SUM(G2:G4) returns 154.

    Budget

    Running total of your savings

    You put some money aside each month and want to see how much you've saved so far at every point, not only at the end.

    ABC
    1MonthSavedSaved so far
    2Jan150150
    3Feb200350
    4Mar120470
    5Apr180650
    6May250900
    Each row adds from B2 down to its own row. By the end of March, 470 has been saved.
    Type this in C2, then fill it down to C6
    =SUM($B$2:B2)

    The $ signs lock the start of the range at B2, while the end moves down as you fill the formula. In C4 the formula has become =SUM($B$2:B4), which returns 470 (150 + 200 + 120). The last row, C6, shows 900, the total of the whole column. To add the $ signs, press F4 right after typing B2.

    Fitness

    Round a weekly distance total

    A running app exports distances with two decimals, but your training log uses one. Add up the week and round the total in the same formula.

    AB
    1Runkm
    2Mon5.25
    3Tue3.8
    4Thu6.42
    5Sat4.15
    6Sun7.06
    7Week26.7
    ROUND wraps SUM, so B7 holds the rounded total, 26.7.
    =ROUND(SUM(B2:B6),1)

    The five runs add up to 26.68 km. ROUND takes that total and keeps one decimal place, so the formula returns 26.7. Excel works from the inside out: first SUM, then ROUND. Round the total, not each run: rounding the five runs first and then adding them gives 26.8, further from the real distance.

    Mistakes that make a total wrong

    • Numbers stored as text. If some cells are aligned to the left or show a small green triangle, Excel is treating them as text, and SUM skips them without warning, so the total comes out too small. Select those cells, click the warning icon that appears and choose Convert to Number.
    • The total inside its own range. Writing =SUM(B2:B6) in B6 makes the formula refer to itself. Excel shows a circular reference warning and the result is 0. Keep the total outside the range.
    • Hidden and filtered rows still count. SUM adds every cell in the range, visible or not. To total only the rows a filter leaves visible, use =SUBTOTAL(9,B2:B5) instead.

    Practice

    Practice

    Total the budget

    Use the sheet below. Click the highlighted cell, type a formula in the bar above the sheet and press Enter. Afterwards, try it in Excel itself: list five of your own monthly expenses and add a total with AutoSum.

    Try it0 of 2 done

    1. In B6, add up all four expenses with SUM.
    2. In B7, add only Rent and Utilities. They aren't next to each other.

    Click a dashed cell, type a formula in the bar and press Enter.

    AB
    1ExpenseAmount
    2Rent1,200
    3Groceries450
    4Utilities180
    5Transport120
    6Total
    7Rent + Utilities

    Was this guide helpful? Spot a mistake? Send feedback · admin@arumsoft.com