Skip to content
CalculatorZilo Logo
  • Home
  • CalculatorsExpand
    • Finance
    • Math
    • Health & Fitness
    • Education
    • Science
    • Real Estate
    • Chemistry
  • About Us
  • Contact Us
CalculatorZilo Logo
Home / Statistics Calculators / Linear Regression Calculator
Statistics Calculators

Linear Regression Calculator

Published onJune 15, 2026 Updated onOctober 9, 2026 7:19 am

Linear regression finds the straight line that best fits your data: the line that minimizes the squared distance to every point. That line gives you the trend (slope), the baseline (intercept), the strength of the relationship (correlation), and a way to predict new values.

Enter paired X and Y values below. The calculator returns the regression equation, the correlation coefficient, R-squared with a plain-English reading, and predictions for any X you enter.

Linear Regression Calculator

Regression results

Regression equation:
Slope:
Y-intercept:
Correlation (r):
R-squared:
RMSE (typical miss):
Data points:
Mean of X / mean of Y:
Predicted Y:

Residuals (actual minus predicted)

xy (actual)y-hat (predicted)residual

Reading the scatter plot and residuals

The chart above the results plots your data as red dots with the fitted regression line in blue. The dashed amber segments are the residuals: the vertical miss between each actual y and the line’s prediction at that x. The table lists every residual numerically.

  • RMSE (root mean square error) is the typical size of those misses in y units. Smaller means a tighter fit.
  • Residuals that fan out or curve (instead of scattering randomly around zero) warn that a straight line may be the wrong model, even when R-squared looks high.
  • Least-squares fitting guarantees the residuals sum to zero, which you can verify in the table.

Worked example (verified against the tool)

Study hours X = 1, 2, 3, 4, 5 and test scores Y = 52, 60, 68, 73, 82. The tool returns y = 7.3000x + 45.1000, r = 0.9971, R-squared = 0.9942, RMSE = 0.7874. Predicting x = 6 gives y = 88.9000. The first residual is 52 – 52.4 = -0.4: the line over-predicts the first point by four tenths of a point.

Related calculators

Statistics CalculatorsSample Mean Calculator: Free Stats Tool OnlineThe Sample Mean Calculator helps you find the average of any data set in seconds. Whether you are a student...Statistics CalculatorsProbability Mean Calculator Probability and statistics play a vital role in mathematics, finance, economics, engineering, data science,...Statistics CalculatorsBaseball ERA CalculatorA Baseball ERA Calculator is a sports statistics tool used to calculate a pitcher’s Earned Run Average,...Statistics CalculatorsStandard Deviation Probability CalculatorGiven a normal distribution described by its mean (μ) and standard deviation (σ), this calculator finds the...Statistics CalculatorsStatistics CalculatorPaste a dataset and this calculator returns the full descriptive picture: how many values you have, their...Statistics CalculatorsNormal Distribution CalculatorThe normal distribution describes anything that clusters around an average: heights, test scores, measurement...

CalculatorZilo

Free calculators for everything. Accurate, fast, no signup.

Categories

Finance Math Health & Fitness Education Science Real Estate Chemistry Browse all calculators

Legal

Privacy Policy Terms and Conditions Disclaimer Cookie Policy DMCA Policy

Company

About Us Contact Us FAQ Accessibility Statement

We use cookies to analyze traffic and to serve ads that keep our calculators free. You can accept or decline cookies below. Learn more

© 2026 CalculatorZilo. All rights reserved.

  • Home
  • Calculators
    • Finance
    • Math
    • Health & Fitness
    • Education
    • Science
    • Real Estate
    • Chemistry
  • About Us
  • Contact Us
Search