STEYX Function in Excel

Excel’s STEYX function returns the standard error of the y estimate for a simple linear regression.

It measures scatter around the fitted line in the same units as y. That helps assess how closely a straight line describes the paired observations.

This differs from standard deviation, which measures spread around the mean without using the x-values.

In this article, I’ll show you how to calculate the standard error of a fitted line, compare it with standard deviation, and assess errors by group.

STEYX Function Syntax in Excel

Use STEYX with matched dependent and independent data points:

=STEYX(known_y's,known_x's)
  • known_y's is the required range or array of dependent values. This is the result you want the line to predict.
  • known_x's is the required range or array of independent values. This is the input that helps predict y.

When to Use STEYX Function

  • Check the typical prediction error around a straight-line relationship.
  • Compare the consistency of two simple regression relationships.
  • Measure fit error in the same unit as your y-values, such as minutes, dollars, or units.
  • Check whether paired x and y ranges are valid before relying on a regression result.

Example 1: Calculate Standard Error of Estimate

Let’s start with a simple regression check.

Below is a list of event guest counts and the minutes needed to set up each event. The result cell is in column E.

STEYX example 1: dataset and empty result cells

I want to measure the typical error in predicted setup minutes from this guest-count relationship.

Here is the formula:

=STEYX(B2:B9,A2:A9)
STEYX example 1: =STEYX(B2:B9,A2:A9)

The result is 1.205269 minutes. Put Setup Minutes first because those are the dependent y-values. Guest Count is second because it is the independent x-value.

You can read this as a measure of the usual vertical miss around the fitted straight line.

A smaller STEYX value means the observed setup times sit closer to that line. Here, the unit is minutes.

For a broader explanation of this idea, see how to calculate standard error in Excel.

Pro Tip: STEYX describes the error around a straight-line model. It does not prove that a straight line is the right model for every dataset.

Example 2: Compare STEYX With STDEV.S

Here is a useful distinction that often gets missed.

Below is a recipe dataset with servings in column A and mixing minutes in column B. Column E contains two different measures.

STEYX example 2: dataset and empty result cells

I want to compare the error around the servings-to-time line with the overall spread of mixing times.

Here is the STEYX formula:

=STEYX(B2:B9,A2:A9)
STEYX example 2: =STEYX(B2:B9,A2:A9)

STEYX returns 0.372678 minutes. It measures how closely the mixing-time values follow a line based on recipe servings.

Here is the STDEV.S formula for comparison:

=STDEV.S(B2:B9)
STEYX example 2: =STDEV.S(B2:B9)

STDEV.S returns 7.764388 minutes. It measures how widely the mixing times vary around their own average, without using the servings at all.

So these results answer different questions. STEYX is fit error for a relationship, while STDEV.S measures variation in one set of values.

Example 3: Compare Error by Service Area

You can also use STEYX with filtered ranges.

Below is a pickup log with service area, boxes collected, and pickup minutes. The result cells in column F calculate a separate value for North and South.

STEYX example 3: dataset and empty result cells

I want to compare how closely pickup minutes follow box counts in the North area and the South area.

Here is the North-area formula:

=STEYX(FILTER(C2:C11,A2:A11="North"),FILTER(B2:B11,A2:A11="North"))
STEYX example 3: =STEYX(FILTER(C2:C11,A2:A11="North"),FILTER(B2:B11,A2:A11="North"))

The first FILTER returns North pickup minutes as the dependent y-values. The second returns the matching North box counts as the independent x-values.

The result is 0.795822 minutes. FILTER creates the matching arrays, then STEYX reduces them to one number.

Here is the South-area formula:

=STEYX(FILTER(C2:C11,A2:A11="South"),FILTER(B2:B11,A2:A11="South"))
STEYX example 3: =STEYX(FILTER(C2:C11,A2:A11="South"),FILTER(B2:B11,A2:A11="South"))

The South result is 1.460593 minutes. For this data, South pickup times have more scatter around their boxes-to-minutes line than North pickup times do.

FILTER is available in Excel 2021, Excel 2024, and Microsoft 365. If your version does not include it, filter or copy each area’s paired rows first.

You can learn more in this FILTER function guide.

Pro Tip: Apply the same condition to both FILTER calls. If the filtered y and x arrays have different numbers of points, STEYX returns #N/A.

Example 4: Check Matched STEYX Inputs

Before using a result, it helps to know the two input errors that matter most.

Below is a small cooling-time dataset. Column E tests matched three-pair inputs, mismatched ranges, and a range with only two pairs.

STEYX example 4: dataset and empty result cells

I want to confirm the minimum valid input and see what Excel returns for the two common invalid cases.

Here is the formula with three matched pairs:

=STEYX(B2:B4,A2:A4)
STEYX example 4: =STEYX(B2:B4,A2:A4)

This returns 0.408248 minutes. Three matched numeric pairs are enough for STEYX to calculate a result.

Here is the formula with one x-value missing:

=STEYX(B2:B4,A2:A3)
STEYX example 4: =STEYX(B2:B4,A2:A3)

This returns #N/A because the two ranges have different numbers of data points.

Here is the formula with only two matched pairs:

=STEYX(B2:B3,A2:A3)
STEYX example 4: =STEYX(B2:B3,A2:A3)

This returns #DIV/0! because STEYX needs at least three data points.

Text, logical values, and blank cells in a referenced range are ignored, while zeros are included.

Tips & Common Mistakes

  • Put the predicted result in known_y's and the input that explains it in known_x's.
  • Keep the two ranges paired and the same length. A different point count returns #N/A.
  • Use at least three usable pairs. Fewer than three pairs return #DIV/0!.
  • Remember that a low STEYX value means a close fit to a line. It does not show whether a relationship is causal.
  • Use LINEST when you need the regression coefficients and several statistics together. Its expanded output includes the standard error of the y estimate.
  • Use RSQ when you want a 0-to-1 measure of how well a linear relationship fits. It answers a different question from error in y-units.

I have shown you how to calculate STEYX, compare it with ordinary variation, and use it with matched filtered arrays.

I hope you found this article helpful.

List of All Excel Functions

Other Excel articles you may also like: