Regression equation
Calculate the least-squares line in the form y = intercept + slope x, similar to Excel SLOPE and INTERCEPT output.
Paste paired x-y data and calculate the least-squares regression line, slope, intercept, correlation, R-squared, residual error, slope p-value, confidence interval, prediction, and residuals. Use it to check Excel LINEST, SLOPE, INTERCEPT, RSQ, SPSS, R, Stata, or statistics homework output.
Enter paired values with x first and y second. The calculator fits a simple linear regression model using ordinary least squares. Each row must keep the x value matched with the correct y value from the same observation.
Put one pair on each line, such as 1, 2.1 or 1 2.1.
The first number is x and the second number is y.
Simple linear regression
Slope inference uses the usual simple linear regression assumptions. Always check the scatterplot, residuals, outliers, and assignment requirements before writing a conclusion.
| X | Y | Predicted Y | Residual |
|---|---|---|---|
| Calculate a model to view residuals. | |||
Simple linear regression estimates a straight-line relationship between one predictor variable and one response variable.
Calculate the least-squares line in the form y = intercept + slope x, similar to Excel SLOPE and INTERCEPT output.
Review correlation, R-squared, residual sum of squares, residual standard error, and fitted values.
Get the standard error, t statistic, p-value, and 95% confidence interval for the slope.
Enter an x value and calculate the predicted y from the fitted regression line.
Ordinary least squares chooses the line that minimizes the sum of squared residuals between observed y values and predicted y values.
| Measure | Formula idea | Meaning |
|---|---|---|
| Slope | Sxy / Sxx |
Expected change in y for a one-unit increase in x. |
| Intercept | y-bar - slope * x-bar |
Predicted y value when x is zero. |
| R-squared | 1 - SSE / SST |
Proportion of y variation explained by the linear model. |
| Residual | observed y - predicted y |
How far each point is from the fitted line. |
A strong regression answer includes the equation, model fit, residual checks, and a written interpretation of the slope and prediction.
These examples match the default paired data in the calculator and are useful for checking Excel, SPSS, R, Stata, or hand-calculation output.
| Output | Result | Meaning |
|---|---|---|
| Regression equation | y-hat = 1.1964 + 0.8286x | For each 1-unit increase in x, predicted y increases by about 0.8286. |
| Model fit | R-squared = 0.9938 | About 99.38% of y variation is explained by the linear model. |
| Slope inference | p approximately 7.57e-8; 95% CI = [0.7630, 0.8941] | The slope is positive and clearly different from zero for this example data. |
| Prediction | At x = 9, y-hat = 8.6536 | The fitted line predicts about 8.6536 when x equals 9. |
The slope estimates the expected change in y for a one-unit increase in x, assuming a linear relationship is appropriate.
R-squared is the proportion of variation in y explained by the linear model with x. It does not prove causation.
It can help you check calculations, but assignments may require software output, assumption checks, residual plots, and written interpretation.
The slope test uses n - 2 degrees of freedom, so at least three paired observations are needed for residual variation.
Yes. The calculator uses ordinary least squares, the same core method behind Excel-style SLOPE, INTERCEPT, RSQ, and simple LINEST output. Small differences can appear from rounding.
Correlation measures strength and direction of association. Regression fits an equation that predicts y from x and estimates how much y changes when x increases by one unit.
The slope p-value tests whether the population slope could be zero under the usual simple linear regression assumptions.
Regression assignments often require more than slope and R-squared. You may need residual checks, p-values, confidence intervals, software output, ANOVA tables, and a written conclusion in context.
Use this calculator to check computations, understand regression output, and prepare tutoring questions. For graded work, follow your course rules and show the required method.
Join students from over 150 countries who trust Statskan for academic excellence.
Get Expert Help Now →