Function Problems

How to Perform Multiple Linear and Logarithmic Regression in Excel

John WilsonJohn Wilson Oct 28, 2026 869 views

Question details

The user needs to calculate multiple linear and logarithmic regression statistics for a dataset containing one dependent variable and multiple independent variables (e.g., 17 columns of x-values).

How to Perform Multiple Linear and Logarithmic Regression in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Performing complex statistical data analysis using array functions to evaluate relationships between multiple independent variables and a single dependent variable.
Observed behavior
The goal is to properly structure and output the regression results using the LINEST and LOGEST functions across a wide dataset.
Before you start

Ensure your dataset contains no blank cells or text values within the data ranges, and that your independent x-variables are organized in continuous, adjacent columns next to your single column of dependent y-values.

Solution 1Recommended

Perform Multiple Linear Regression Using the LINEST Function

Use the LINEST function to apply the 'least squares' method, which calculates the statistics for a straight line that best fits your multi-variable data.

The LINEST function returns an array of values that describes the regression line. Because it returns an array of values, it must be entered as an array formula to display all the statistics.

1
Select the output range

Highlight a blank range of cells where you want the regression statistics to be displayed. The number of rows and columns depends on the number of independent variables and whether you request additional statistics.

2
Input the LINEST formula

Click into the formula bar and type `=LINEST(`. Select your single column of known y-values as the first argument.

3
Select the multiple independent variables

For the second argument, highlight all continuous columns containing your x-values (e.g., 17 adjacent columns). Add `, TRUE, TRUE)` to the end of the formula to calculate the y-intercept normally and to return additional regression statistics.

4
Execute as an array formula

Instead of pressing Enter, press `Ctrl + Shift + Enter`. Excel will surround your formula with curly braces {} and populate your selected range with the multiple linear regression output.

Perform Multiple Linear Regression Using the LINEST Function
Array Formula Requirement: In newer versions of Excel with Dynamic Arrays, you may simply press Enter. In older versions, failing to use Ctrl + Shift + Enter will only return a single value instead of the full array of coefficients and statistics.
Advanced Data Analysis Alternative

Perform Advanced Regression Analysis with WPS Spreadsheet

WPS Spreadsheet offers powerful, built-in statistical functions including LINEST and LOGEST. You can quickly analyze complex datasets with multiple independent variables while enjoying a familiar, easy-to-use interface.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your existing .xlsx or .csv data file.
  2. 2. Select the output area: Highlight an empty range of cells to accommodate your multiple regression array results.
  3. 3. Enter the regression formula: Type `=LINEST(` or `=LOGEST(`, select your y-values, then select your contiguous columns of x-values. Add `, TRUE, TRUE)`.
  4. 4. Apply the array calculation: Press `Ctrl + Shift + Enter` to execute the calculation and view your comprehensive multi-variable regression statistics.
Full compatibility with Microsoft Excel .xlsx files and data formatsSeamless execution of complex array formulas like LINEST and LOGESTComprehensive statistical and data analysis tools built-inFree, lightweight, and fast performance even on large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why does my LINEST formula return a #VALUE! error?

The #VALUE! error in LINEST or LOGEST usually occurs if the dimensions of your known_y's and known_x's arrays are mismatched (e.g., different number of rows), or if there is text or blank cells within your selected data ranges.

Can I use the Data Analysis Toolpak instead of formulas for regression?

Yes, you can use the built-in Data Analysis Toolpak. Go to the Data tab, click Data Analysis, select Regression, and input your Y and X ranges. This method outputs a static summary report rather than a dynamic formula that updates when your data changes.

How do I interpret the multiple coefficients returned by LINEST?

When using LINEST with multiple independent variables, the function returns the coefficients in reverse order. For example, if your x-variables are in columns A, B, and C, the output array will display the coefficient for C first, then B, then A, followed by the y-intercept.

Does WPS Spreadsheet support Dynamic Arrays for regression functions?

Yes, the latest versions of WPS Spreadsheet support modern array behaviors. For multiple regression functions like LINEST and LOGEST, you can input the formula in a single cell, and the results will automatically spill into the adjacent required cells without needing to press Ctrl+Shift+Enter.