How to use Correlation and Regression Calculator
- Enter one comma-separated x,y pair per line, with no header. Keep each response paired with its predictor; blank lines are ignored.
- Calculate the fit, then read slope, intercept, Pearson r, R² and residual sum of squares. Constant x is refused; constant y gives a constant fit with undefined r and R².
- Inspect the scatter and residuals for curvature or influential observations. An unusual point needs investigation rather than automatic deletion.
- Download regression-residuals.csv for all pairs or regression-plot.svg for the chart. The on-screen residual table shows only the first 50 pairs.
Example: Correlation and Regression Calculator
Fit the three pairs (1, 3), (2, 5) and (3, 7), which lie on y = 2x + 1.
Options
- Paired observations
- Enter one x,y pair per line without a header. Keep each response beside the predictor value from the same observation.
- Residual output
- A residual is observed y minus fitted y. The preview shows a subset; the CSV contains all entered pairs.
Supported inputs and limits
- Enter 2 to 1,000 pairs and at most 100,000 characters.
- Values are plain decimals of magnitude at most 10¹², with up to 25 digits and 12 fractional places.
- The model is ordinary least squares with an intercept and one predictor.
- Working arithmetic uses 80-digit decimal precision; displayed values and graph coordinates are rounded.
- The residual CSV includes every pair.
More details
There is no significance test, causal inference, multivariable model or guarantee of reliable prediction outside the observed x range.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
A straight fit can hide a pattern
Inspect the residuals and the original observations rather than relying on correlation alone. Curvature or influential observations can make a straight line a poor description. Constant x cannot define a unique slope, and predictions outside the entered x range require an additional assumption.
Questions about Correlation and Regression Calculator
Why inspect residuals?
A residual is observed y minus fitted y. Patterns can show that a straight line misses important structure.
Does r=1 prove the model will predict new data?
No. It describes the supplied pairs. New conditions and values outside the observed range can behave differently.
Why is constant y correlation undefined?
Its variance is zero, so the correlation denominator is zero even though a constant fitted line exists.