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, regression ANOVA table, coefficient table, mean-response confidence interval, prediction interval, and residuals. Use it to check Excel LINEST, PHStat, 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.
| Source | SS | df | MS | F | Significance F |
|---|---|---|---|---|---|
| Calculate a model to view regression ANOVA output. | |||||
| Term | Coefficient | Standard Error | t Stat | P-value | Lower | Upper |
|---|---|---|---|---|---|---|
| Calculate a model to view coefficient output. | ||||||
| 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 PHStat-style coefficient output with standard errors, t statistics, p-values, and confidence intervals.
Enter an x value and calculate y-hat, mean-response confidence interval, and individual prediction interval.
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. |
| Regression ANOVA | MSR / MSE |
Tests whether the simple regression model explains a significant amount of y variation. |
| Mean-response confidence interval | y-hat +/- t * SE(mean) |
Interval estimate for the average y value at a chosen x value. |
| Prediction interval | y-hat +/- t * SE(prediction) |
Interval estimate for one new individual y value at a chosen x value. |
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. |
| Regression ANOVA | F = 957.3439; significance F approximately 7.57e-8 | The simple linear model explains a statistically significant amount of variation in y. |
| Prediction | At x = 9, y-hat = 8.6536; mean CI = [8.3227, 8.9845]; prediction interval = [8.1152, 9.1919] | The fitted line predicts about 8.6536 when x equals 9, with separate intervals for mean and individual response. |
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.
A confidence interval estimates the mean response at a chosen x value. A prediction interval estimates where one new individual y value may fall, so it is usually wider.
This page is for simple linear regression with one x variable and one y variable. Multiple regression needs separate columns for several predictors and should be handled with a separate multiple regression calculator.
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 →