CalculatorCast

Lineare Regressionsrechner

Bestangepasste Linie für eine Menge von (x, y)-Punkten.

Einführung

Linear Regression Calculator - Best-fit line for a set of (x, y) points. Enter Points (x,y per line) to get an instant result.

Formel

Ordinary least squares: slope = (nΣxy − ΣxΣy) / (nΣx² − (Σx)²); intercept = (Σy − slope×Σx) / n.

Schritt für Schritt

  1. Enter the Points (x,y per line).
  2. Click Calculate to see your result instantly.

Praxisbeispiel

Example: With the defaults shown above, the Linear Regression Calculator gives Slope: 1.8, Intercept: 0.2, Points: 5.

Häufig Gestellte Fragen

What does the slope represent?
How much y is predicted to change for each one-unit increase in x.
How many points do I need?
At least two, though more points give a more reliable fit.
What inputs does the Linear Regression Calculator need?
You'll need to provide: Points (x,y per line). All fields use sensible defaults, so you can see a working example immediately and then adjust the values to match your own numbers.
How accurate is the Linear Regression Calculator?
The Linear Regression Calculator applies a fixed formula to the numbers you enter. Formula used: Ordinary least squares: slope = (nΣxy − ΣxΣy) / (nΣx² − (Σx)²); intercept = (Σy − slope×Σx) / n. The result is only as reliable as the values you provide, so double-check your inputs.
Is the Linear Regression Calculator free to use?
Yes, the Linear Regression Calculator is completely free, requires no signup, and runs instantly in your browser.

Über Lineare Regressionsrechner

Linear regression finds the best-fitting straight line through a set of data points, expressing the relationship between a dependent variable and an independent variable. It is one of the most widely used statistical techniques in science, engineering, business, and social research. The Linear Regression Calculator on CalculatorCast computes the regression equation, correlation coefficient, and coefficient of determination from your data.

The linear regression equation is y equals a plus bx, where b (the slope) equals [n times sum(xy) minus sum(x) times sum(y)] divided by [n times sum(x squared) minus sum(x) squared], and a (the intercept) equals [sum(y) minus b times sum(x)] divided by n. These formulas minimize the sum of squared differences between the actual y values and the predicted values on the line, a method called ordinary least squares (OLS).

The correlation coefficient r (Pearson's r) measures the strength and direction of the linear relationship, ranging from negative 1 (perfect negative linear relationship) through 0 (no linear relationship) to positive 1 (perfect positive linear relationship). R-squared (r squared) is the coefficient of determination, representing the proportion of variance in y explained by the linear relationship with x.

Linear regression is used to predict future values, understand relationships between variables, and control for confounding factors in experimental analysis. In business, it might be used to predict sales from advertising spend. In science, to relate drug dose to response. In engineering, to model the relationship between temperature and electrical resistance.

The calculator accepts data as comma-separated x and y values and outputs the regression equation, slope, intercept, r, r-squared, and the standard error of the regression. It also generates the predicted y value for any new x you enter.

The Linear Regression Calculator is free on CalculatorCast and works on all devices without registration.