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.

Designed for quick academic checks. Validate with full statistical software for critical analyses.

Examples

  • n=3, Σx=6, Σy=10, Σxy=23, Σx²=14, target x=4 ⇒ 6.33 y units
  • n=4, Σx=52, Σy=82, Σxy=1106, Σx²=696, target x=18 ⇒ 30.50 y units

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

  • Outputs the predicted y value on the regression line for the chosen x.
  • All calculations assume a simple linear model with one independent variable.