ZetCode

Excel GESTEP Function

last modified October 5, 2026

The GESTEP function is an engineering function in Excel that tests whether a number is greater than or equal to a threshold. It returns 1 when the number reaches the threshold and 0 when it does not. Because the result is numeric, a set of GESTEP results can be added together to count how many values meet a requirement. This tutorial covers the syntax, the default value of the step argument, threshold testing, counting values, array use, and the relationship to DELTA and IF.

GESTEP Function Basics

GESTEP compares a number with a threshold and reports the result as 1 or 0. It is a compact way to turn a comparison into a number that can be counted, averaged, or multiplied. The syntax is short, but the default behavior of the optional step argument is worth remembering.

Component Description
Function Name GESTEP
Syntax =GESTEP(number, [step])
Arguments number (required), step (optional, defaults to 0)
Return Value 1 if number >= step, otherwise 0

The table above lists the essential components of the function. The argument table below describes each argument in more detail.

Argument Meaning
number The value to test. It can be a literal, a cell reference, or an expression that returns a number.
step The threshold that number is compared against. If omitted, it is assumed to be 0, so =GESTEP(A1) asks whether A1 is greater than or equal to zero.

Both arguments must be numeric. If either argument is non-numeric, GESTEP returns the #VALUE! error. A reference to an empty cell is read as 0, so an omitted argument and a blank cell behave the same way.

Basic GESTEP Examples

This example shows the simplest use of the function with two numbers. The Microsoft documentation uses the same values.

Basic GESTEP formulas
=GESTEP(5, 4)     ' 1, 5 is greater than 4
=GESTEP(5, 5)     ' 1, 5 is equal to 5
=GESTEP(4, 5)     ' 0, 4 is less than 5
=GESTEP(-4, -5)   ' 1, -4 is greater than -5

The first two formulas return 1 because 5 reaches the threshold in both cases. The third returns 0 because 4 falls short of 5. The last one shows that the comparison also works with negative numbers: -4 is greater than -5, so the result is 1.

GESTEP with the Default Step

The step argument is optional. When it is left out, GESTEP compares the number against zero. This makes the function a compact non-negative test.

A B Result
10 =GESTEP(A1) 1
-5 =GESTEP(A2) 0
0 =GESTEP(A3) 1

The table shows that positive values and zero pass the default test, while negative values do not. Zero counts as a pass because the test is "greater than or equal to", not "greater than".

GESTEP with default step
=GESTEP(A1)     ' 1 when A1 is greater than or equal to 0, otherwise 0

Testing Values Against a Threshold

The most common use of GESTEP is to compare a list of readings with a limit. This example flags each reading that meets or exceeds a specification.

A B C
Reading Limit Check
82 80 =GESTEP(A2, B2)
75 80 =GESTEP(A3, B3)
90 80 =GESTEP(A4, B4)

The first and third readings meet the limit and return 1; the second reading falls below it and returns 0. Column C therefore holds a numeric flag for each row.

GESTEP with cell references
=GESTEP(A2, B2)

GESTEP with Arrays

GESTEP accepts array arguments and returns an array of 1s and 0s. In Microsoft 365 and Excel 2021 the results spill automatically when the formula is confirmed with Enter. In Excel 2019 and earlier the formula is an array formula and must be confirmed with Ctrl+Shift+Enter.

GESTEP in an array formula
=GESTEP({1,2,3}, 2)          ' {0,1,1}
=SUM(GESTEP({1,2,3}, 2))     ' 2

The first formula compares three values with the threshold 2. Only 2 and 3 reach it, so the result is the array {0,1,1}. The second wraps the same comparison in SUM to count the matches, returning 2. The curly braces in these examples are array constant syntax, typed literally for the constants.

Counting Values at or Above a Threshold

Because the result is a number, GESTEP results can be summed to count how many values reach a threshold. This is the use case Microsoft highlights in the function description.

A
8.5
7.2
9.1
6.8
8.0
Count values at or above 8
=SUM(GESTEP(A1:A5, 8))          ' 3
=SUMPRODUCT(GESTEP(A1:A5, 8))   ' 3, works in every version

Three of the five values (8.5, 9.1, and 8.0) are greater than or equal to 8, so both formulas return 3. SUMPRODUCT handles the range natively and needs no special entry in older Excel versions, while SUM wraps the same array and requires Ctrl+Shift+Enter before Excel 2021.

GESTEP vs IF vs DELTA

GESTEP, IF, and DELTA all answer yes/no questions, but they differ in the test they perform and in the type of result they return.

Function Test Example Result
GESTEP number >= step =GESTEP(5, 4) 1
IF number >= step =IF(5>=4, 1, 0) 1
IF number >= step =IF(5>=4, "Pass", "Fail") Pass
DELTA number1 = number2 =DELTA(5, 4) 0

GESTEP and an IF that returns 1 or 0 produce the same numeric flag, but GESTEP is shorter and can be array-entered over a whole range. IF is the better choice when the output should be readable text such as "Pass" or "Fail". DELTA tests equality rather than an inequality, so it returns 1 only when the two numbers are exactly equal.

For integer values the two engineering functions are linked: =GESTEP(n, k) - GESTEP(n, k+1) equals =DELTA(n, k), because a value reaches k but not k+1 only when it is exactly k.

GESTEP and DELTA together
=GESTEP(5, 4) - GESTEP(5, 5)     ' 0, same as DELTA(5, 4)
=GESTEP(5, 5) - GESTEP(5, 6)     ' 1, same as DELTA(5, 5)

Practical Applications

GESTEP is useful wherever a threshold must be turned into a number.

The numeric output integrates cleanly with SUM, SUMPRODUCT, and ordinary arithmetic, which is why it appears in engineering templates.

GESTEP Errors and Troubleshooting

Cause Symptom Fix
An argument is not numeric #VALUE! error Convert it with VALUE, or correct the source cell
An argument refers to a cell holding an error The same error is returned Fix the upstream error; GESTEP cannot mask it
An empty cell is used as the step The step is read as 0 Supply an explicit step if zero is not intended
Array formula returns a single value in older Excel Only the first value is tested Confirm with Ctrl+Shift+Enter, or wrap it in SUMPRODUCT
No arguments supplied "too few arguments" error Supply at least number; step defaults to 0

The GESTEP function turns a "greater than or equal to" test into the numbers 1 and 0. That small detail is what makes it valuable: passing values can be counted, averaged, and combined with other results as easily as any other number. Remember that the step argument defaults to 0, that a blank cell is read as zero, and that non-numeric input returns an error rather than being ignored. Used with SUM or SUMPRODUCT and its companion DELTA, GESTEP becomes a compact tool for scoring, filtering, and flagging data.

Author

My name is Jan Bodnar, and I am a passionate programmer with extensive programming experience. I have been writing programming articles since 2007. To date, I have authored over 1,400 articles and 8 e-books. I possess more than ten years of experience in teaching programming.

List all Excel Formulas.