Slope of a line
Find slope and y-intercept from two points.
Fit a straight line using centred summary statistics rather than a list of observations.
Fit a straight line using centred summary statistics rather than a list of observations.
xy/xxmy-xy/xx*mxUse paired observations from one sample. The sums are centred, not raw sums of squares; uncertainty, significance and goodness of fit are not estimated.
Results are rounded for display; calculations use unrounded values. Read our calculation methodology.
Fit a straight line using centred summary statistics rather than a list of observations. The fitted line is y = intercept + slope × x. The observation count documents the sample but does not alter these two coefficients once the centred sums and means are supplied.
The fitted line is y = intercept + slope × x. The observation count documents the sample but does not alter these two coefficients once the centred sums and means are supplied.
| Input | Example |
|---|---|
Number of observations n | 5 |
Mean x mx | 3 |
Mean y my | 7 |
Sum of squared x deviations xx | 10 |
Sum of x-y deviation products xy | 20 |
Use paired observations from one sample. The sums are centred, not raw sums of squares; uncertainty, significance and goodness of fit are not estimated.
Enter the displayed example values in their labelled units. Apply the formula before rounding; change one input at a time to compare scenarios.