Linear Regression Calculator

Calculate the linear regression equation and correlation coefficient for a set of data points. Enter X and Y values to get slope, intercept, and R².

isCalculator Editorial Team Published by:
Reviewed by: Review Board
Last Updated:

Was this calculator helpful?

How to use this tool?

This calculator performs simple linear regression on a set of paired data points. Follow these steps:

  1. Enter X values in the first input field, separated by commas (e.g., 1,2,3,4,5).
  2. Enter Y values in the second input field, also comma-separated (e.g., 2,4,5,4,5).
  3. Click "Calculate" to compute the regression line.

Results explained:

  • Slope (b): The change in Y for each unit change in X.
  • Intercept (a): The predicted Y value when X is 0.
  • R²: How well the line fits the data (0 to 1, higher is better).
  • Equation: The regression line formula: y = bx + a.

Requirements:

  • X and Y must have the same number of values.
  • At least 2 data points are needed.
  • All values must be numbers (decimals allowed).
  • X values cannot all be identical (need variance).

Previous Results

Generate Charts
Result Inputs Date

Frequently Asked Questions

Linear regression is a statistical method to model the relationship between a dependent variable (Y) and one independent variable (X) by fitting a linear equation to observed data.

The slope (b) indicates the change in Y for a one-unit change in X. The intercept (a) is the predicted Y value when X = 0.

R² (coefficient of determination) measures how well the regression line fits the data. Values close to 1 indicate a strong fit.

Reviewed by Experts

Eurico José Kiala

Eurico José Kiala

Mathematician

Teacher

LinkedIn
João Lino

João Lino

Mathematician

LinkedIn
Quick Convert
Length Converter
0
Weight/Mass Converter
0
Area Converter
0
Volume Converter
0
Speed Converter
0
Temperature Converter
0
Pressure Converter
0
Energy Converter
0
Power Converter
0
Force Converter
0
Time Converter
0
Angle Converter
0
Fuel Consumption Converter
0
Data Storage Converter
0
Base Numbers Converter
0
Dry Volume Converter
0
Currency Converter
0
Text Case Converter
0