Enter your data points to calculate the regression line, slope, intercept, and R² instantly.
Slope (β₁):
Intercept (β₀):
R²:
Linear regression is a statistical method used to model the relationship between two variables by fitting a linear equation to observed data. The equation of a simple linear regression line is:
y = β₀ + β₁x
Where β₁ is the slope and β₀ is the intercept.
The slope is calculated as:
$$ \beta_1 = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})} {\sum (x_i - \bar{x})^2} $$
The intercept is calculated as:
$$ \beta_0 = \bar{y} - \beta_1 \bar{x} $$
The regression equation is:
$$ y = \beta_0 + \beta_1 x $$