Contact

SLOPE in Google Sheets: Fitted Rates and Reversed-Argument Checks

Statistical Intermediate Google Sheets

Calculate a Google Sheets regression slope from paired observations, inspect centered products and distinguish a reverse fit from a reciprocal.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: SLOPE(data_y,data_x) calculates the slope of a fitted linear regression line. Y values come first. The result describes Y units per X unit, so argument direction and measurement units matter.

Availability and version history

  • Introduced: first introduction date is not established by the reviewed official history; no desktop release number is inferred.
  • Availability: documented in the rolling Google Sheets service; these examples use the web worksheet workflow.
  • Checked: October 14, 2026; official SLOPE reference. Documentation and independent models, with no native Sheets execution or wider client certification.

Syntax and Google-specific evidence scope

=SLOPE(data_y,data_x)

Both series are required. Google calls them dependent and independent data and says text encountered in the arguments is ignored. The complete dedicated body does not provide an equation or a comprehensive error table.

The numerical audit here uses ordinary least-squares slope: sum paired products of deviations from each series’ mean, then divide by the sum of squared X deviations. This is an explicit independent model of the documented regression purpose, not a native algorithm or floating-point certification.

All worked rows contain one numeric X and its corresponding numeric Y. Do not remove a nonnumeric entry from only one column and shift the remaining values into new pairs.

Example 1: inspect a four-row fit

Enter A1:B5:

X Y
1 3
2 5
3 4
4 8
=SLOPE(B2:B5,A2:A5)

Expected result: 1.4. Mean X is 2.5 and mean Y is 5. Centered products are 3,0,-0.5,4.5, totaling 7. The X squared-deviation total is 5, giving slope 7/5.

The endpoint slope would be (8-3)/(4-1)=5/3, approximately 1.666667. It uses only the first and last observations, so it does not reproduce the fit based on all four pairs.

Example 2: show the complete fitted line

The INTERCEPT model gives 1.5. The fitted line is Y=1.5+1.4*X.

Put this in C2 and fill through C5:

=INTERCEPT($B$2:$B$5,$A$2:$A$5)+SLOPE($B$2:$B$5,$A$2:$A$5)*A2

Expected fitted values are 2.9,4.3,5.7,7.1. Observed-minus-fitted residuals are 0.1,0.7,-1.7,0.9. The slope is a summary of a line fit, not a claim that every observed increase in X produces exactly the same increase in Y.

Advanced example: fit in the opposite direction

=SLOPE(A2:A5,B2:B5)

Expected result: 0.5. The paired centered-product sum remains 7, but the denominator is now the Y squared-deviation total 14.

The reciprocal of the original slope is 5/7, approximately 0.714286, not 0.5. Regressing X on Y and regressing Y on X minimize different residual directions. Swapping arguments is not a reliable way to invert an imperfect predictive relationship.

Advanced example: unit conversions and origin shifts

Multiplying every original Y value by ten gives 30,50,40,80, with expected slope 14. Multiplying every original X value by ten instead gives expected slope 0.14.

Adding 100 to every Y leaves slope 1.4, because centered deviations are unchanged. Negating Y gives -1.4, reversing direction. Keep both axes’ units and the sign of any conversion visible when comparing coefficients.

A perfect-line control with X 1,2,3,4 and Y 4,7,10,13 has expected slope 3. The coefficient is not itself a probability or a normalized measure of strength.

Pairing and unresolved boundaries

Reversing the order of both original columns together leaves slope 1.4. The relationship belongs to paired records, not worksheet row numbers. Preserve identifiers when sorting or joining tables.

If every X is identical, the independent mathematical denominator is zero. Google’s reviewed page does not identify the resulting native error code, so this guide does not borrow Excel’s label. Empty arrays, unequal dimensions, Boolean inputs, source errors and nonaligned missing values are similarly outside the verified controls.

RSQ describes squared linear correlation, while STEYX describes residual scale. Neither a slope nor those companion statistics prove that changing X would cause Y to change in the fitted way.

References and verification

Examples use fictional data, English function names and comma separators. Expected outputs are independent mathematical calculations or explicitly documented rules, not native Sheets captures. Check the spreadsheet locale when reproducing punctuation-sensitive formulas.