# Statistics Calculator: Linear Regression

**Use this page to derive and draw the line of best fit from a set of bivariate data.**

## Online Linear Regression Calculator

This page allows you to compute the equation for the line of best fit from a set of bivariate data:

- Enter the bivariate
*x*,*y*data in the text box.and*x*is the independent variable. Data can be entered in two ways:*y*is the dependent variable

*x*values in the first line and*y*values in the second line, or ...

individual*x*,*y*values on separate lines.

Individual values within a line may be separated by commas, tabs or spaces. This flexibility in the input format should make it easier to paste data taken from other applications or from text books. - Press the "Submit Data" button to perform the computation.
- To clear the graph and enter a new data set, press "Reset".
- If the calculations were successful, a scatter plot representing the data will be displayed. On the same plot you will see the graphic representation of the linear regression equation. Above the scatter plot, the variables that were used to compute the equation are displayed, along with the equation itself.
- You can now enter an x-value in the box below the plot, to calculate the predicted value of y
- To clear the graph and enter a new data set, press "Reset".

### What is simple linear regression

**Simple linear regression** is a way to describe a relationship between two variables through an equation of a straight line, called **line of best fit**, that most closely models this relationship.

### Linear Regression Formula

This calculator uses the following formula to derive the equation for the line of best fit:

where

and