STEYX Function

Excel Functions › Statistical

All versions Statistical

The Excel STEYX function returns the standard error of the predicted y-value for each x in a linear regression — a measure of how far the data points typically fall from the best-fit line.


Quick answer:
=STEYX({2,3,9,1,8,7,5},{6,5,11,7,5,4,4}) standard error of the regression ≈ 3.31

Syntax

=STEYX(known_ys, known_xs)
ArgumentDescription
known_ysRequiredThe array or range of dependent (y) values.
known_xsRequiredThe array or range of independent (x) values. Must contain the same number of points as known_ys.

How to use it

STEYX fits a straight line to your x/y data (the same line SLOPE and INTERCEPT describe) and reports the typical vertical distance between the actual points and that line. A small standard error means the points hug the line; a large one means the fit is loose.

=STEYX({2,3,9,1,8,7,5},{6,5,11,7,5,4,4}) // ≈ 3.31

Mathematically it is the square root of the residual sum of squares divided by n−2 — the two degrees of freedom lost to estimating the slope and intercept. Because of that n−2, STEYX needs at least three data points.

=SLOPE({2,3,9,1,8,7,5},{6,5,11,7,5,4,4}) // the line STEYX measures against

Pair it with RSQ: RSQ tells you what fraction of variation the line explains, while STEYX tells you the typical error in the same units as your y-values. Together they give a fuller picture of fit quality.

Try it: interactive demo

Live demo

Pick a STEYX example to see the formula and its result.

Result:

Practice workbook

📊
Download the free STEYX practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does STEYX actually measure?
It is the standard error of the y estimate — the typical vertical distance between the observed y-values and the straight regression line through the data, expressed in the same units as y.
Why does STEYX divide by n minus 2?
Fitting a line estimates two parameters (slope and intercept), each of which costs one degree of freedom. Dividing the residual sum of squares by n−2 gives an unbiased estimate of the error variance.
How is STEYX different from RSQ?
RSQ is a unitless 0-to-1 measure of the proportion of variance explained, while STEYX is an absolute error in the units of your y data. A model can have a high RSQ and still a meaningful STEYX if y has a large range.
How many data points does STEYX need?
At least three valid x/y pairs, because of the n−2 denominator. With only two points the line fits perfectly and the standard error is undefined.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: SLOPE · INTERCEPT · RSQ · TREND · FORECAST · LINEST