Skip to main content

regr_slope

Introduced in: v26.9.0 Returns the slope of the least-squares fit of y on x: Σ(x−xˉ)(y−yˉ)Σ(x−xˉ)2\frac{\Sigma{(x - \bar{x})(y - \bar{y})}}{\Sigma{(x - \bar{x})^2}} Returns nan when x is constant, because the fitted line is vertical. Syntax
Aliases: regrSlope Arguments Returned value Returns the slope of the regression line. Float64 Examples Basic usage
Query
Response
Last modified on October 7, 2026