How to Create a Regression Model in Excel

If you just need to create a regression model in excel and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: enable the Analysis ToolPak and use Data ▸ Data Analysis ▸ Regression, or get the same coefficients as a formula with LINEST.

On this page7
▤Annotated stepsExcel
1

Enable the add-in once: File ▸ Options ▸ Add-ins ▸ Manage: Excel Add-ins ▸ Go ▸ tick Analysis ToolPak.

2

Arrange the outcome in one column and every predictor in adjacent columns with headers.

3

Data ▸ Data Analysis ▸ Regression; set the Y and X ranges, tick Labels, and choose an output location.

4

Read R Square for fit, then the p-value beside each coefficient to see which predictors are carrying the model.

5

For a live version that updates with the data, enter =LINEST(known_ys,known_xs,TRUE,TRUE) and read the coefficients from the first row.

=LINEST(B2:B50,C2:D50,TRUE,TRUE)
Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

Regression fits a straight-line relationship between one outcome column and one or more predictor columns. The ToolPak produces a full report — coefficients, their standard errors, t statistics and p-values, R squared, and the F test for the model as a whole. LINEST returns the same numbers as a spilled array without the report layout. Both require the predictor columns to be contiguous. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. Treat “create a regression model in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a layout choice that keeps the sheet readable and sortable into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

Revenue in B2:B50 is modelled on ad spend in C and site visits in D. Data ▸ Data Analysis ▸ Regression with Input Y Range B1:B50, Input X Range C1:D50 and Labels ticked returns R Square 0.83, an ad-spend coefficient of 2.4 with a p-value of 0.004, and a visits coefficient whose p-value of 0.31 says it adds nothing once spend is in the model. The ToolPak output is the difference between an estimated relationship and a quantified one — the p-values are what stop a coincidence being presented as a driver. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “create a regression model in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Selecting non-adjacent predictor columns; both the ToolPak and LINEST need one contiguous X block, so copy the columns together first.
  • Reading LINEST's coefficients left to right in column order — it returns them in reverse, with the last predictor first.
  • Reporting a high R squared as proof of causation when the predictors were chosen after seeing the data.
  • Leaving strongly correlated predictors in the model, which makes individual coefficients unstable even when the fit looks excellent.

Frequently asked questions

Where is regression in Excel?

Data ▸ Data Analysis ▸ Regression, which appears only after the Analysis ToolPak add-in is enabled.

Is it available on a Mac?

Yes, the Analysis ToolPak ships with Excel for Mac 2016 and later and is enabled from Tools ▸ Excel Add-ins.

What does R squared tell me?

The share of the variation in the outcome the model accounts for. It always rises when predictors are added, so use Adjusted R Square to compare models of different size.

How do I get the equation without the report?

LINEST returns the coefficients and the intercept; SLOPE and INTERCEPT do the same for a single predictor.

Other ways people ask this

On the way here you may have searched this as “how to make a regression model in excel”, “how to make regression model in excel” and “how to create regression model in excel” — it is all the same task, and this page is the single, complete answer to it.

Why do people search for this in so many different ways?

Because the same task has many names. “how to make a regression model in excel”, “how to make regression model in excel”, “how to create regression model in excel” all point at the one operation explained on this page, which is why they all lead here.