FormulaCraft

How to sum every nth row in Excel and Google Sheets

Topic:SUM & aggregation
Excel & Google Sheets
=SUMPRODUCT((MOD(ROW(B2:B7)-ROW(B2),3)=0)*B2:B7)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Determine n (e.g. 3 for every 3rd row) and your data range (e.g. B2:B7).
  2. 2Enter =SUMPRODUCT((MOD(ROW(B2:B7)-ROW(B2),3)=0)*B2:B7). Subtracting ROW(B2) normalises the first data row to position 0, so =0 always picks the first, fourth, seventh… rows.
  3. 3Change 3 to any other interval (e.g. 4 for every 4th row) and adjust the =0 offset (=1 for the second row in each group, =2 for the third).

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Can I sum every nth row from a specific starting offset?

Yes — change the =0 in the formula to =1 or =2 to shift which row in each group of n is selected.

Does this work when n does not divide evenly into the range size?

Yes. Rows that fall outside a complete group are handled correctly; the formula simply includes those that match the modulus condition.

More on SUM & aggregation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: