Analytics consent

We would like to measure how the free tools are used so we can improve them. Analytics is off until you choose. You can accept or decline — declining does not limit the free tools in any way, and you can change your mind later.

Current state: not decided — analytics is off

Regression Calculator

Fit a simple linear regression line y = a + bx.

Enter at least one pair of values.

How simple linear regression works

Simple linear regression fits a straight line y = a + bx through paired data by the method of least squares, minimising the sum of squared vertical distances from the points to the line.

The slope b is the change in y for a one-unit change in x. The intercept a is the value of y when x is zero. R² is the proportion of the variation in y explained by x.

This is a simple linear regression with one predictor. It does not fit multivariate models, non-linear relationships, or extrapolate reliably beyond the range of your data.

The formulas

b = Σ((x−x̄)(y−ȳ)) ÷ Σ((x−x̄)²) · a = ȳ − b·x̄ · R² = r²

The slope is the covariance of x and y divided by the variance of x. The intercept places the line through the means. R² is the square of the Pearson correlation and ranges from 0 to 1.

Worked example

X = 1,2,3 and Y = 3,5,7

The points lie on y = 1 + 2x, so the slope is 2, the intercept is 1, r = 1 and R² = 1 — a perfect fit.

Frequently asked questions

What does R² tell me?

R² is the proportion of variance in y explained by x. R² = 0.9 means 90% of the variation is explained by the model; the rest is due to other factors or noise.

Can I use this for non-linear data?

The model always fits a straight line. If the relationship is curved, a straight line may fit poorly even with a moderate R² — consider transforming the variables or a different model.

Can I predict outside my data range?

Extrapolation beyond the observed range of x assumes the relationship continues unchanged, which is often unsafe. Interpret such predictions with caution.

Related research methods

  • Regression Analysis
  • Correlation Analysis

When to use this tool

Use simple linear regression when you want to model and predict a continuous outcome from one or more predictors.

Assumptions

  • Approximate linearity.
  • Independent observations.
  • Approximately constant variance (homoscedasticity).
  • Approximate normality of residuals for inference.

Limitations

  • A fitted model within the observed range may not generalise outside it.
  • Correlation and regression do not establish causation.
  • Small samples give unstable slopes.

How to interpret the result

The slope is the expected change in the outcome for a one-unit change in the predictor; R² is the proportion of variance explained.

How to report the result

Report the regression equation, the slope and intercept, standard errors, R², and sample size.

Next steps in your analysis

Built by PanelRoster

PanelRoster is an enterprise operations management platform for organizations coordinating distributed teams, assignments, workflows, quality assurance and operational execution.

Explore PanelRoster