Linear Regression Calculator

Enter the number of observations plus the summed products needed for simple linear regression to predict a y value for any target x. The result follows the least-squares best-fit line for your summarized dataset.

CalcSimpler logo CalcSimpler

Examples

FAQ

What if the denominator becomes zero?

A zero denominator means there is no variation in x values, so regression cannot be computed.

Can I use raw data points instead of sums?

Sum your raw data first to obtain Σx, Σy, Σxy, and Σx², then enter the aggregated values here.

How do I get the slope and intercept?

The tool uses slope = (n·Σxy − Σx·Σy) ÷ (n·Σx² − (Σx)²) and intercept = (Σy − slope·Σx) ÷ n before predicting y.

Additional Information

CalcSimpler logo CalcSimpler