Regression Prediction Calculator
Fit a regression model to your data points and predict y from a given x, or x from y. Supports linear, quadratic, logarithmic, exponential and power models with R squared and a scatter plot.
Input
Enter your (x, y) data points, choose a regression model, and specify the value to predict.
One pair per line, comma or space separated (for example 1, 2.1).
Regression model
Linear y = a + b x
Prediction direction
x
Finds the y for this x.
Result
Predicted y at x = 7
13.9867y
y = 0.0467 + 1.9914 x
Model
Linear y = a + b x
R squared
0.9985
Correlation r
0.9992
Data points
6
Scatter plot and regression curve
Data points
| No. | x | y |
|---|---|---|
| 1 | 1 | 2.1 |
| 2 | 2 | 3.9 |
| 3 | 3 | 6.2 |
| 4 | 4 | 7.8 |
| 5 | 5 | 10.1 |
| 6 | 6 | 12 |
How it works
- Enter one (x, y) pair per line, separated by a comma or whitespace. Blank lines and invalid rows are ignored.
- Models are fitted by least squares. Logarithmic, exponential and power models are linearized with logarithms and the coefficients are transformed back to the original scale, while the quadratic model solves the normal equations (a 3 by 3 linear system).
- The coefficient of determination R squared comes from the residual sum of squares of observed versus predicted values. Values closer to 1 indicate a better fit. The correlation coefficient is not shown for the quadratic model.
- Switch the prediction direction to choose forward prediction of y from x, or inverse prediction of x from y. The quadratic model does not support inverse prediction.
- Logarithmic and power models require positive x, while exponential and power models require positive y. Change the model if your data does not meet these conditions.
- In the scatter plot, data points are blue, the regression curve is a blue line, and the predicted point is red. The plot is a guide only, and extrapolation beyond the data range can carry large error.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Regression Prediction Calculator