Regression Calculator

Use this regression calculator to calculate the line of best fit on your input data

Accepts csv, parquet, arrow, json and tsv


How to perform regression online

Linear regression
  1. Upload your dataset
  2. Select a type of regression
  3. Use the inputs on the left to configure the regression
  4. The regression analysis will be performed
  5. Download, share or embed the results

Supercharge your data exploration

Open csv, parquet, arrow, json and tsv files straight from your desktop

Or


Share and embed

Share your graphs and data sets.

Share your graphs and data sets. Or embed them directly into web pages.


Work straight from Google Drive

Open csv, parquet, arrow, json and tsv files directly from Drive, Gmail and Classroom by installing the Google Workspace App

Regression is used to determine how one dependent variable is related to one or more independent variables.

Dependant variables change as the independent variables change. Usually, the independent variable is shown on the horizontal x-axis and the dependent variable is shown on the vertical y-axis.

For example, you could use a regression analysis to determine the relationship between the age of a car and how far it has driven. You could use the regression fit to understand how mileage changes with car age, or predict how far the car will be driven in the next year.

When to use regression

Regression is a useful tool for understanding relationships between variables and forecasting.

If you understand the relationship between an independent and dependent variable then you can make changes to the independent variable to influence the dependent variable. If you understand how the independent variable will change with time, then you can use the regression fit to forecast the value of the dependent variable over time.

Types of regression

Linear regression

Linear regression fits a line of best fit to the input data points using a linear model.

Linear regression can be used to fit a straight line to the input data points using the regression line equation.

y=ax+by = ax + b

Where

  • yy is the response variable,
  • aa is the slope of the line,
  • xx is the predictor variable,
  • bb is the yy intercept of the fit

A linear regression model fits the slope of the line, aa, and the yy intercept bb.

The linear regression calculator can be used to fit straight lines to input data.

Polynomial Regression

Linear regression equation can be extended to fit polynomials (a quadratic function) to input data points.

The general form of the linear regression equation is:

y=anxn+...+a1x+by = a_nx^n + ... + a_1x + b

Where an,...,a1a_n, ..., a_1 and bb are all coefficients fit by the linear regression model.

The polynomial regression calculator can be used to fit polynomials to input data.

Exponential regression

The exponential regression calculator can be used to fit an exponential function to input data points.

The exponential regression equation is:

y=abxy = a^{bx}

Where:

  • yy is the predicted value for the response variable,
  • xx is the predictor variable,
  • aa and bb are parameters fit by the exponential regression calculator

The exponential regression calculator can be used to fit an exponential function to input data.