Correlation and Regression Calculator

Fit a straight line to paired numbers and inspect Pearson correlation, predictions and residuals.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Calculate result controls

Showing an example. Edit to see your own.

One comma-separated numeric pair per line; no header. Blank lines are ignored. At most 1,000 pairs and 100,000 characters; plain decimals with magnitude at most 10^12.

Processed in your browser. Your inputs stay on this device.

How to use Correlation and Regression Calculator

  1. Enter one x,y pair per line.
  2. Run the centered least-squares calculation.
  3. Review the fit and residuals before using the equation outside the data range.

Example: Correlation and Regression Calculator

Correlation and Regression Calculator: Fitted 3 pairs: slope 2, intercept 1.

You add
x,y pairs: 1,3 2,5 3,7
You get
Fitted 3 pairs: slope 2, intercept 1. Pairs: 3 Slope: 2 Intercept: 1 Pearson r: 1 R²: 1 Residual sum of squares: 0 Ordinary least squares with an intercept. Residuals use the centered fitted equation to limit rounding. The table shows up to 50 pairs; CSV contains all pairs. Results do not establish causation, statistical significance or reliable extrapolation. 1 | 1 | 3 | 3 | 0 2 | 2 | 5 | 5 | 0 3 | 3 | 7 | 7 | 0

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

2–1,000 comma-separated x,y pairs without header; ≤100,000 chars; blank lines ignored. x/y magnitude ≤10^12, up to25 digits/12 fractional places. Results use centered Decimal80 arithmetic; displayed residual table first50; CSV all pairs. One-predictor ordinary least squares on bounded finite pairs. Constant x cannot define a unique slope. Constant y has a constant fit but undefined correlation and R². No significance test, causal claim, multivariable fit or reliable extrapolation promise.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save 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.

Project manager: Tony Hines · Content updated 4 October 2026 · Report a problem