Loading the page...
Preparing tools and content for you. This usually takes a second.
Preparing tools and content for you. This usually takes a second.
Fetching calculator categories and tools for this section.
Free linear regression calculator & line of best fit calculator. Calculate the regression line using least squares method. Get slope, intercept, correlation coefficient (r), R-squared (R²), and step-by-step solutions with statistical analysis.
Last updated: February 2, 2026
Need a custom statistics calculator for your educational platform? Get a Quote
Slope (m)
0.6000
Y-Intercept (b)
2.2000
Correlation (r)
0.7746
R² (R-squared)
0.6000
Interpretation:
The linear regression equation is y = 0.6000x + 2.2000. The slope is 0.6000, meaning for each unit increase in x, y changes by 0.6000. The correlation coefficient is 0.7746, indicating a strong positive relationship. R² = 0.6000 means that 60.0% of the variance in y can be explained by x.
Method
Minimizes Σ(yᵢ - ŷᵢ)²
Standard method for regression analysis
Formula
m = (n·Σxy - Σx·Σy) / (n·Σx² - (Σx)²)
Complete calculation with all steps
Range
r ∈ [-1, 1]
Measures linear relationship strength
Interpretation
% variance explained
Goodness of fit measure
Includes
All intermediate calculations
Learn the regression process
Provides
Full statistical summary
Interpretation of results
X: 1, 2, 3, 4, 5 | Y: 2, 4, 5, 4, 5
Equation
y = 0.6x + 2.2
R²
0.85
Our linear regression calculator uses the least squares method to find the best-fitting straight line through your data points. The method minimizes the sum of squared vertical distances (residuals) between observed values and the regression line. This provides optimal slope and intercept that best describe the linear relationship in your data.
m = (n·Σxy - Σx·Σy) / (n·Σx² - (Σx)²)b = ȳ - m·x̄r = Σ((x - x̄)(y - ȳ)) / √(Σ(x - x̄)² · Σ(y - ȳ)²)R² = 1 - (SS_residual / SS_total)Where n is the number of data points, Σ represents summation, x̄ and ȳ are means, and SS represents sum of squares.
Linear regression is based on minimizing the sum of squared residuals (errors). The residuals are the vertical distances between each data point and the regression line. By finding the line that minimizes Σ(yᵢ - ŷᵢ)², we get the best linear approximation of the relationship between x and y. This method is optimal under the assumptions of normally distributed errors.
Linear regression is one of the most widely used statistical methods:
Need help with other statistical methods? Try our regression equation calculator or coefficient of determination calculator.
Get Custom Calculator for Your PlatformResult: y = 0.6x + 2.2
The line of best fit with R² ≈ 0.85, indicating a strong linear relationship between x and y.
If all points lie on a line:
r = ±1, R² = 1
Perfect linear relationship
If points are randomly scattered:
r ≈ 0, R² ≈ 0
No linear relationship
Share it with others who need help with linear regression analysis
Suggested hashtags: #Statistics #LinearRegression #Regression #Calculator #DataAnalysis