HomeMathLinear Regression Calculator

📈 Linear Regression Calculator

Calculate the slope, intercept, and R² for a linear regression from x,y data pairs.

What is Linear Regression?

Linear regression fits a line y = mx + b to data by minimizing the sum of squared residuals. The slope m = Σ(xᵢ - x̄)(yᵢ - ȳ) / Σ(xᵢ - x̄)² and the intercept b = ȳ - m·x̄. The R² value (coefficient of determination) measures how well the line fits the data, ranging from 0 to 1.

AD PLACEMENT — IN-CONTENT (728×90)