Use one pair per line. Accepted separators: comma, space, tab, or semicolon.
What this regression calculator does
This tool performs a simple linear regression on paired data points. That means it finds the best-fit straight line for your values and returns the key statistics you need to interpret the relationship between variables.
In plain language, it answers: “If X changes, what usually happens to Y?” This is useful for forecasting, trend analysis, and testing whether two variables move together.
How to use it
1) Enter data points
Add one x, y pair per line. For example:
- 1, 2
- 2, 4.1
- 3, 6.3
You can separate values with commas, spaces, tabs, or semicolons.
2) Optional prediction
Enter a new X value in the prediction box if you want the calculator to estimate Y from the fitted model.
3) Click Calculate
You’ll get:
- Regression equation (
ŷ = b0 + b1x) - Slope and intercept
- Correlation coefficient (
r) - Coefficient of determination (
R²) - Residual standard error
- Preview table of fitted values and residuals
Understanding the output
Slope (b1)
The slope tells you how much Y is expected to change for each 1-unit increase in X. A positive slope means Y increases as X increases; a negative slope means Y decreases.
Intercept (b0)
The intercept is the model’s predicted Y value when X is zero. Depending on context, this may or may not be practically meaningful.
Correlation (r)
Correlation measures linear association from -1 to +1. Values closer to ±1 indicate stronger linear relationships.
R-squared (R²)
R² is the fraction of Y’s variance explained by X through the linear model. For example, R² = 0.82 means about 82% of variation in Y is explained by the fitted line.
When to trust (and not trust) linear regression
Regression is powerful, but it has assumptions. It works best when:
- The relationship is approximately linear.
- Data points are independent.
- Residuals are reasonably well-behaved (no extreme patterning).
- There are no dominant outliers driving the slope.
If your data are curved, seasonal, segmented, or heavily skewed, consider polynomial regression, transformations, or non-linear models.
Practical example
Suppose X is weekly study hours and Y is exam score. If the model returns:
ŷ = 52 + 4.5xR² = 0.76
then each additional study hour is associated with a 4.5-point increase in score, and 76% of score variability is explained by study time.
Final notes
Use this regression calculator for quick, clear linear analysis. For formal research, pair results with diagnostic plots, confidence intervals, and domain expertise before making high-stakes decisions.