ToolJovia
Math

Linear Regression Calculator

Fit a straight line to paired observations and report slope, intercept, and R².

✓ Browser-local processing

Loading tool…

How to use Linear Regression Calculator

Ordinary least squares fits y = slope × x + intercept by minimizing squared vertical residuals. Centered sums reduce cancellation from large common offsets.

  1. Enter x observations, matching y observations.
  2. Check that the input follows the stated limits and uses consistent units.
  3. Run the calculator, review the result, then copy or download it.

Good to know

  • Use 2–1,000 paired observations with nonconstant x. R² is undefined for constant y. This provides a fit, not causality, forecasts, confidence intervals, or outlier diagnostics.
  • Decimal inputs have at most 120 characters and magnitude from 1e-100 to 1e15, or zero. Floating-point results are rounded to 12 significant digits; extreme derived results may underflow or be rejected. Exact integer results are identified separately.

Common questions

What calculation does Linear Regression Calculator perform?

Ordinary least squares fits y = slope × x + intercept by minimizing squared vertical residuals. Centered sums reduce cancellation from large common offsets.

Does a high R² prove a relationship is causal?

No. R² describes the fitted line’s share of observed variation, not the reason for an association.

Keep going with related tools

All math →