HomeGoogle DocsSpreadsheetRunning Max Values in Google Sheets (Array Formula Included)

Running Max Values in Google Sheets (Array Formula Included)

When analyzing data in Google Sheets, sometimes it’s not enough to know the overall maximum value—you may want to see how the maximum changes over time. This is where a running max (cumulative maximum) becomes useful. A running max shows the highest value reached so far in each row, updating automatically as new data is added.

For example, you can use a running max to:

  • Track daily, weekly, or monthly sales peaks as your business grows.
  • Monitor stock prices and quickly identify new all-time highs.
  • Compare student scores, KPIs, or project progress against previous bests.

In this guide, you’ll learn how to calculate running max values in Google Sheets using both a drag-down formula and an Array Formula, so your results update dynamically without extra manual steps.

Running Max in Google Sheets: Two Formula Approaches

To return running max values in Google Sheets, you can use:

  1. A drag-down formula (copy-paste or autofill).
  2. An Array Formula (dynamic, no dragging required).

Running Max – Drag-Down MAX Formula

The drag-down method is straightforward using the MAX function.

Consider the following sequence of ten values in a column:

{3; 5; 4; 6; 6; 8; 7; 9; 1; 1}

The running maxima will be:

{3; 5; 5; 6; 6; 8; 8; 9; 9; 9}

Assume the original values are in cell range B2:B11.

Enter the following formula in C2 and drag the fill handle down to C11:

=MAX($B$2:B2)

This will output the running maximum at each step.

Google Sheets drag-down formula to calculate running max values

Side note: From the sequence in C2:C11, you can also extract High Watermarks (the unique record-breaking values). We’ll cover this later.

Running Max – SCAN Array Formula

For a fully dynamic solution, you can use the SCAN Lambda function to create a running max Array Formula in Google Sheets.

Here’s the formula:

=SCAN(B2, B2:B, LAMBDA(acc, val, IF(AND(acc >= val, val <> ""), acc, val)))

How the SCAN Array Formula Works

  • SCAN iterates through the values in B2:B, row by row.
  • acc (accumulator) starts as B2 in the first row.
  • val represents the current row’s value (B2 in the first row, B3 in the second, and so on).
  • If acc >= val, the accumulator (highest so far) is returned. Otherwise, the current row value replaces it.
  • The result is a dynamic running max sequence, ending with the overall maximum in the last row.

Running Max vs. High Watermarks in Google Sheets

Although the terms are sometimes used interchangeably, there’s a subtle difference between Running Max and High Watermarks:

  • Running Max → shows the highest value so far at every step in your dataset.
  • High Watermarks → highlight only the unique points where a new maximum is set.

High Watermarks Example

If the values in B2:B11 are {3; 5; 4; 6; 6; 8; 7; 9; 1; 1},

  • The Running Max is: {3; 5; 5; 6; 6; 8; 8; 9; 9; 9}
  • The High Watermarks are: {3; 5; 6; 8; 9}

Formula for High Watermarks

To extract only the high watermarks, simply wrap the running max Array Formula with UNIQUE:

=UNIQUE(SCAN(B2, B2:B, LAMBDA(acc, val, IF(AND(acc >= val, val <> ""), acc, val))))

This will output only the distinct “record-breaking” values.

Additional Tip – Legacy DMAX Formula for Running Max

As you may know, LAMBDA functions are relatively new in Google Sheets. Before they were introduced, users had to rely on creative workarounds to calculate a running maximum. One such method involved the DMAX function.

Here’s the array formula version of that approach:

=ARRAYFORMULA(
   DMAX(
      TRANSPOSE({
         INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1)),
         IF(
            SEQUENCE(
               ROWS(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1))),
               ROWS(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1)))
            ) /
            SEQUENCE(
               ROWS(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1))),
               ROWS(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1)))
            ) +
            SEQUENCE(
               1,
               ROWS(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1))),
               ROW(A2)-1
            ) <= ROW(INDIRECT("A2:A"&MATCH(2,1/(B:B<>""),1))),
            TRANSPOSE(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1)))
         )
      }),
      SEQUENCE(ROWS(INDIRECT("B2:B"&MATCH(2,1/(B:B<>""),1)))),
      {IF(,,); IF(,,)}
   )
)

⚠️ Note: I don’t recommend using this formula in practice—it’s overly complex, harder to debug, and less efficient than the modern SCAN + LAMBDA approach.

I’ve shared it here only to satisfy your curiosity. If you’d like to understand this formula in detail, check out my guide: Find the Running Minimum Value in Google Sheets — the logic is the same, except DMIN is replaced with DMAX.

Conclusion

Using running max formulas in Google Sheets can help you track cumulative maximums over time, whether you’re analyzing sales, stock prices, or student performance.

  • Use the drag-down MAX formula for quick, manual solutions.
  • Use the SCAN Array Formula for a dynamic, automatic approach.
  • Apply the UNIQUE wrapper if you want just the High Watermarks instead of the full running max sequence.
  • And if you’re curious about older methods, you can explore the DMAX workaround, though it’s more of a legacy approach than a recommended solution.

That’s all—thanks for reading! Enjoy working with running max values in Google Sheets.

Sample Sheet

Resources

Prashanth K V
Prashanth K V
Your Trusted Google Sheets and Excel Expert Prashanth K V is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Top Discussions

More like this

Sheetogram: Free Nonogram Game for Google Sheets (10×10 Puzzle Template)

Recently, I built Sheetogram, a Nonogram game for Google Sheets, as a passion project....

How to Generate Unique 10×10 Nonogram Puzzles in Google Sheets

Creating nonogram puzzles in Google Sheets is surprisingly easy. All you need is a...

How to Build a Dynamic Nonogram Clue Generator in Google Sheets

Over the past few months, I've built a couple of games in Google Sheets,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.