Simple Regression Calculator

This simple regression calculator fits y on x and gives the equation, r, R², the slope test and confidence interval, an ANOVA table and a prediction interval.

Checks on your data

  • Simple regression assumes a roughly straight-line relationship, independent observations and residuals with similar spread. Check the residual plot.
  • Predictions outside the range of your x values (extrapolation) are much less reliable.

Results

Regression equation
y = 0.06 + 2.00727x
Slope b₁
2.0072727
Intercept b₀
0.06
Correlation r
0.998925
R²
0.997852
Standard error of the estimate
0.29909
Slope standard error
0.0329287
Slope t statistic
60.9582
Slope p-value
5.8291 × 10^-12
95% CI for the slope
1.93134 to 2.08321
Predicted y at x = 11
22.14
95% CI for the mean response
21.6688 to 22.6112
95% prediction interval
21.3047 to 22.9753
Data with the regression line
1020246810xy
Residuals (should look random around 0)
0246810xresidual
ANOVA for the regression
SourceSSdfMSFp
Regression332.4041332.4043715.95.8290 × 10^-12
Residual0.71563680.0894545
Total333.129
Show step-by-step solution
  1. Means: x̄ = 5.5, ȳ = 11.1. Sxx = 82.5, Sxy = 165.6, Syy = 333.12.
  2. Slope b₁ = Sxy ÷ Sxx = 2.0072727; intercept b₀ = ȳ − b₁x̄ = 0.06.
  3. R² = 0.997852; SSE = 0.71563636; standard error of the estimate = √(SSE ÷ 8) = 0.29909.
  4. Slope t = b₁ ÷ SE(b₁) = 60.9582 with 8 df, so p = 5.8291 × 10^-12.
  5. At x = 11: ŷ = 22.14, with a 95 % prediction interval of 21.3047 to 22.9753.
SlopeSxy / Sxx
Interceptȳ − b₁x̄
R²Share explained
Slope testt with n − 2 df

What Is Simple Regression?

Simple regression models a response y as a straight-line function of one predictor x. The least squares line minimises the squared vertical distances to the points.

Paste paired x and y values to get the equation, correlation, R², standard error of the estimate, slope standard error, t statistic, p-value and a confidence interval for the slope. An ANOVA table, a residual plot and an optional prediction with confidence and prediction intervals are included.

The sections below give the formulas, a worked example and answers on testing the slope.

How to Use the Simple Regression Calculator

  1. Enter paired x and y values.
  2. Optionally enter an x to predict.
  3. Read the equation, r and R².
  4. Check the slope test, ANOVA table and residual plot.

Simple Regression Formula

Slope

b1=SxySxxb_1=\frac{S_{xy}}{S_{xx}}

Intercept

b0=yˉ−b1xˉb_0=\bar y-b_1\bar x

Slope t

t=b1SE(b1),SE(b1)=seSxxt=\frac{b_1}{SE(b_1)},\quad SE(b_1)=\frac{s_e}{\sqrt{S_{xx}}}

Simple Regression Variables Explained

SymbolMeaningNotes
b₁Slope
b₀Intercept
R²Share of variation explained
s_eStandard error of the estimate

Simple Regression Worked Example

For x = 1..10 and the y values above, the slope is about 2.0 and R² is above 0.99. The slope t statistic is large and the p-value is far below 0.05, so there is strong evidence of a linear relationship.

With the example values loaded in the calculator above, the steps are:

  1. Means: x̄ = 5.5, ȳ = 11.1. Sxx = 82.5, Sxy = 165.6, Syy = 333.12.
  2. Slope b₁ = Sxy ÷ Sxx = 2.0072727; intercept b₀ = ȳ − b₁x̄ = 0.06.
  3. R² = 0.997852; SSE = 0.71563636; standard error of the estimate = √(SSE ÷ 8) = 0.29909.
  4. Slope t = b₁ ÷ SE(b₁) = 60.9582 with 8 df, so p = 5.8291 × 10^-12.
  5. At x = 11: ŷ = 22.14, with a 95 % prediction interval of 21.3047 to 22.9753.

Result: Regression equation = y = 0.06 + 2.00727x; Slope b₁ = 2.0072727; Correlation r = 0.998925; Predicted y at x = 11 = 22.14.

Where Simple Regression Is Used

Coursework

Get every regression output in one place.

Lab data

Test whether a trend is significant.

Forecasting

Predict with an interval.

Checking assumptions

Inspect residuals.

Common Simple Regression Mistakes to Avoid

  • Plot the data first.
  • Never extrapolate far.
  • Check residuals for patterns.

Simple Regression Terms and Definitions

Residual
Observed y minus predicted y.

Simple Regression FAQs

What is simple regression?

A method to model y as a straight-line function of one predictor x.

How do I test the slope?

Divide the slope by its standard error and compare with a t distribution with n − 2 degrees of freedom.

What does R² mean?

The proportion of the variation in y that the line explains.

Prediction interval or confidence interval?

The prediction interval covers a new single observation and is wider than the interval for the mean response.

Related calculators

Last updated 2026-11-09. See our disclaimer.