STEYX in Excel: Regression Residual Error and the N-Minus-Two Denominator
Audit Excel STEYX using fitted values and residuals, distinguish it from root-mean-square error and examine scaling and duplicated-row effects.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: STEYX(known_ys,known_xs) returns the standard error of the Y estimate for a simple linear regression. Its documented equation uses the residual squared-error total divided by n minus two, followed by a square root.
Availability and version history
- Introduced: first introduction version is not established by the reviewed official history; the current product list is not a launch record.
- Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official STEYX reference. Documentation and independent models; no native Excel execution or wider platform certification.
Syntax and data requirements
=STEYX(known_ys,known_xs)
Both ranges are required, with dependent Y first. The source documents #N/A for unequal data-point counts and #DIV/0! for empty data or fewer than three points.
Microsoft ignores text, logical values and empty reference cells while including numeric zero. Direct logical values and numeric text are separately counted under its argument rules, and invalid text or error arguments cause errors. These examples use complete numeric pairs rather than generalize mixed-placement handling.
The result has Y units. It is not a correlation, an X-specific confidence interval or the standard deviation of Y without accounting for the fitted line.
Example 1: reconstruct the residual calculation
Enter X 1,2,3,4 in A2:A5 and Y 2,1,4,3 in B2:B5:
=STEYX(B2:B5,A2:A5)
Expected result: approximately 1.264911064. The fitted line is Y=1+0.6*X, giving predicted values 1.6,2.2,2.8,3.4.
Residuals, observed minus fitted, are 0.4,-1.2,1.2,-0.4. Their squares are 0.16,1.44,1.44,0.16, totaling 3.2. With four pairs, divide by 4-2=2 and take the square root: SQRT(1.6).
Put the fitted values in C2:C5 and =B2-C2 in D2, filled down. Squaring those residuals in a separate helper column provides a visible audit of the total.
Example 2: compare a different denominator
A root-mean-square residual calculation dividing the same total by n gives SQRT(3.2/4), approximately 0.894427191. That is not STEYX’s n-minus-two definition.
Using n minus one would give approximately 1.032795559, also different. The three results are not alternative display rounding of one statistic. The denominator follows the fitted-model definition.
RSQ is 0.36 for these data; it describes normalized fit rather than a residual amount in Y units.
Advanced example: an exact fitted line
Replace Y with 5,8,11,14 at the same X values. The fitted line Y=3*X+2 matches every supplied observation. All residuals are zero, so the independent STEYX expectation is 0.
This in-sample arithmetic result does not guarantee future observations will be error-free. It also differs from insufficient data: two points leave the documented n-minus-two denominator unavailable even when a line can pass through them.
Advanced example: change measurement units
For the original imperfect data, add 100 to every Y. The fitted intercept rises by 100, while residuals remain unchanged; expected STEYX stays approximately 1.264911064.
Multiply Y by ten instead. The residuals become 4,-12,12,-4, their squared total becomes 320, and expected STEYX becomes approximately 12.649110641. Negating Y reverses residual signs but leaves the error magnitude unchanged.
This scale behavior helps compare reports that use different units. Do not compare numerical errors without also comparing their unit labels.
Advanced example: duplicated pairs change the denominator
Duplicate all four original paired records. The fitted line stays the same and residual squared errors double from 3.2 to 6.4. There are now eight rows, so the denominator is six:
=STEYX(B2:B9,A2:A9)
Expected result: SQRT(6.4/6), approximately 1.032795559. The smaller result does not prove better data collection; the duplicated records contributed no new independent observations.
Interpret the scope carefully
STEYX takes no target-X argument. A prediction interval at a particular X requires additional assumptions and calculations, so the function’s single result should not be presented as a complete interval for every possible forecast.
A constant X series leaves the mathematical slope denominator zero. The dedicated STEYX reference reviewed does not separately classify its native constant-X error, so that display remains unverified. Mixed missingness, error combinations and extreme-value stability likewise require target-build testing rather than an invented universal result.
References and verification
Expected outputs are independent mathematical calculations or explicitly documented rules, not captured native Excel results. Examples use fictional data, English function names and comma separators. Native floating-point boundaries remain untested.