Enter your data below as comma-separated x,y pairs (one pair per line) or upload a CSV file. The calculator will find the best-fitting line and provide statistics about the model quality.
Linear regression finds the best-fitting straight line through a set of points. It's used to model the relationship between a dependent variable (y) and one independent variable (x).
Linear regression works by finding the line that minimizes the sum of squared differences between observed values and predicted values. The equation for a linear regression line is:
y = mx + b
Where:
Use linear regression when:
Enter your data below as comma-separated x,y pairs (one pair per line) or upload a CSV file. The calculator will find the best-fitting line and provide statistics about the model quality.