How it works
Ordinary least squares: slope = Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; intercept = ȳ−slope×x̄. Predict y = intercept+slope×x.
Input definitions
- X values
- Plain text; maximum 200,000 characters.
- Y values
- Plain text; maximum 200,000 characters.
- X value to predict
- Enter the value in the labeled unit.
A worked example
- X values
- 1, 2, 3
- Y values
- 2, 4, 6
- X value to predict
- 4
Assumptions & limits
One predictor and an intercept, paired finite numeric data. No uncertainty interval or significance test.
Sources & review
Maintained by AnsRio. Methods and examples use automated checks; this does not imply independent professional certification.
Method updated 2026-10-17. Content checked against the stated method and examples. Our verification approach.
Common questions
Does a high R² prove that X causes Y?
No. R² describes how much sample variation this straight-line fit explains. Confounding variables, selection effects and extrapolation can make a prediction misleading.
Why can statistical results differ between tools?
Denominator, interpolation and boundary conventions can differ. Use the method and assumptions on this page to compare the same definition; displayed decimals may also be rounded.
How does the Simple linear regression tool work?
Ordinary least squares: slope = Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; intercept = ȳ−slope×x̄. Predict y = intercept+slope×x.
What are the assumptions and limits of Simple linear regression?
One predictor and an intercept, paired finite numeric data. No uncertainty interval or significance test.