Regression and correlation calculator
Use x, y data to check regression line·Pearson correlation coefficient·R² and residual. Plot points and predicted values, then save as CSV·SVG.
Input
Calculate directly using the sample value, or try changing the value.
Input is processed only in this browser. Refreshing returns a sample value.
Result
Check the result using the example value.
Calculation·solution process
Verification of calculation data
The display value is a rounded approximation of 10 digits. CSV or TXT display values are saved; input values are not included in addresses or visit statistics.
Share result
Share the tool link and result text together. No URL is included in the result. Check the below content and then share it.
Calculation criteria and usage method
Verify the regression line, correlation coefficient, and residual for two numerical datasets.
Input example
The regression line of (1,2), (2,3), (3,5) is y=1.5x+1/3. The predicted value of x=4 is 6.33333… and it is extrapolation outside the input range.
The average of (1,2), (2,3), (3,5) is x̄=2 and ȳ=10/3. Since Sxx=2 and Sxy=3, the slope is 1.5 and the intercept is 1/3. The residual is 1/6, −1/3, 1/6, and SSE=1/6. The prediction of x=4 is 19/3, but it is extrapolation outside the observed range of 1–3.
How to use
- Use the example value or enter numbers directly. The table format has one row per line.
- Click Verify result. Incorrect rows are marked and excluded.
- Check the result and calculation process, then copy or save the required result as a file.
Limitations and interpretation
2–1,000 pairs, each value’s absolute value less than 1 trillion. Empty lines are ignored; missing values, headers, and incorrect number rows are flagged as errors. Only simple OLS including residuals is supported; confidence intervals, causality, and future accuracy are not guaranteed.
Frequently Asked Questions
If the correlation coefficient is high, can the cause and effect be proven?
No. Pearson’s r describes the linear relationship in the input sample. It does not address factor 3, sample selection, outliers, or extrapolation, and it does not establish causation or guarantee predictive accuracy.
What about missing values or data with only x values?
Only empty lines are ignored. Rows with missing values, headers, or non-numeric data are identified for correction. If all x values are the same, the slope cannot be calculated. If all y values are the same, the regression line is constant, but r and R² are not defined.
Calculation criteria and reference materials
- NIST — linear least squares regression
Limit of regression and outlier/extrapolation to minimize residual sum of squares
Verification of calculation criteria: · Calculation·verification principles · Report errors