Linear Regression Calculator
Fit a straight line to paired observations and report slope, intercept, and R².
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.
- Enter x observations, matching y observations.
- Check that the input follows the stated limits and uses consistent units.
- 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 →Descriptive Statistics Calculator
Summarize a numeric list with mean, median, modes, range, count, and sum.
MathFraction Calculator
Add, subtract, multiply, or divide two fractions and reduce the exact result.
DataBounded Mean Change Segmentation
Find exact contiguous constant-mean segments under a chosen segment count or explicit SSE penalty.
DataPaired Method Agreement Workbench
Inspect signed paired-method differences, magnitude coordinates and transparent descriptive spread limits.
MathMultiple Linear Least Squares Workbench
Fit a small multiple-predictor model with an intercept, stable centered residuals and transparent rank/orthogonality checks.
MathRolling Origin Forecast Backtesting
Evaluate one-step benchmark forecasts against held-out observations with explicit rolling training prefixes and no future-row fitting.