Linear Regression Calculator and Grapher

A calculator to compute the equation of the linear regression y = a x + b given experimental points (x1, y1), (x2, y2)... (xN, yN) where a and b are given by the Linear Least Squares Fitting formulas as follows $a = \dfrac{N \sum_{i=1}^{N} x_iy_i - (\sum_{i=1}^{N} x_i)(\sum_{i=1}^{N} y_i)} {N \sum_{i=1}^{N} x_i^2 - (\sum_{i=1}^{N} x_i)^2}$
$b = \dfrac{ - (\sum_{i=1}^{N} x_i) (\sum_{i=1}^{N} x_i y_i) + (\sum_{i=1}^{N} x_i^2)( \sum_{i=1}^{N}y_i) } {N \sum_{i=1}^{N} x_i^2 - (\sum_{i=1}^{N} x_i)^2}$ The
Pearson correlation coefficient r that indicates the strength of the linear regression representing the experimental data is given by $r = \dfrac{N \sum_{i=1}^{N} x_iy_i - (\sum_{i=1}^{N} x_i)(\sum_{i=1}^{N} y_i)} { \sqrt {( N \sum_{i=1}^{N} x_i^2 - (\sum_{i=1}^{N} x_i)^2) ( N \sum_{i=1}^{N} y_i^2 - (\sum_{i=1}^{N} y_i)^2)}}$ r takes values between -1 and + 1 and any value of r close to 1 or - 1 indicates a strong correlation while a value of r close to zero indicate a weak correlation.

Use Linear Regression Calculator and Grapher

Given a set of experimental points, this calculator calculates the coefficients a and b and hence the equation of the line y = a x + b and the Pearson correlation coefficient r. It also plots the experimental points and the equation y = a x + b where a and b are given by the formulas above.
Enter the experimnental points
(x1, y1), (x2, y2)... (xN, yN) separated by commas, check the data entered and then press "Calculate and Plot". If you have data already formatted as points separated by commas, you may copy and paste it in the input text area below.

Enter Experimental Points: (x1, y1), (x2, y2)... (xN, yN) =
Decimal Places =

Linear Regression Equation:
correlation coefficient:

Hover the mousse cursor on the top right of the graph to have the option of download the graph as a png file.