In Excel’s LINEST function, an #N/A error in regression outputs—specifically within the statistics table for coefficients, standard errors, or the coefficient of determination ()—occurs when independent variables exhibit perfect or near-perfect multicollinearity. When two or more predictor variables are exact linear combinations of each other, the design matrix lacks full column rank, making it mathematically impossible to invert the cross-product matrix (). Excel handles this rank deficiency by dropping redundant variables and returning #N/A.
Quick Answer
Excel returns
#N/AinLINESTwhen predictor variables are redundant (e.g., Variable B is an exact multiple of Variable A, or rows/columns are identical). To fix this, calculate the correlation matrix across your predictors, identify variables with a correlation coefficient of , and remove the redundant predictors from your regression range.
The Mechanics of Collinearity in LINEST
When you call LINEST with the fourth argument set to TRUE (requesting additional regression statistics):
=LINEST(known_y's, [known_x's], [const], [stats])
Excel attempts to compute the ordinary least squares (OLS) estimate:
1. The Singularity Problem
If one predictor variable can be perfectly predicted by another (for instance, Column C is always Column B multiplied by 2, or Column D is Column A + Column B), the matrix is singular:
- Its determinant is zero ().
- It cannot be inverted using standard matrix inversion.
2. How Excel Handles Rank Deficiency
Instead of crashing or failing the entire formula with a fatal #NUM! or #VALUE!, Excel’s internal QR decomposition algorithm flags collinear variables.
- Excel forces the redundant variable’s coefficient to
0or drops it. - In the third row and below of the standard
LINESTauxiliary statistics table, Excel outputs#N/Afor the standard error of that dropped variable, as well as downstream regression metrics that rely on degrees of freedom calculations. - If all predictors are collinear or constant, evaluates to
#N/Abecause the total sum of squares cannot be partitioned.
Diagnosing Perfect Collinearity
To isolate which variable is breaking your regression model, follow this troubleshooting path:
[#N/A in LINEST Statistics]
│
├──> Are any predictor columns constant? (e.g., all 1s or all 0s)
│ └──> Remove constant columns from known_x's.
│
├──> Is Sample Size (N) <= Number of Predictors (k)?
│ └──> Add more data rows; observations must exceed variables.
│
└──> Run Correlation Matrix (CORREL)
└──> Find pairs where r = 1.0 or r = -1.0.
└──> Remove redundant variable.
Step 1: Check for Constant Columns
If a predictor column contains the same value in every single row (for example, a status code that never changes), that column is collinear with the intercept term:
- Test each column using:
=VAR.S(B2:B100) - If variance is
0, the column has no variation. Remove it immediately from yourknown_x's.
Step 2: Build a Correlation Matrix
Use the native CORREL function to evaluate dependencies between your independent variables:
=CORREL(B2:B100, C2:C100)
For a detailed guide on handling division failures during correlation checks, see Correlation vs. Causation: Troubleshooting #DIV/0! in the CORREL function..
- A correlation result of
1.000or1.000confirms perfect linear dependency. - Action: Delete one of the two collinear variables. Retaining both adds zero predictive power to your regression while destroying matrix invertibility.
Step 3: Check Common Practical Traps
- The Dummy Variable Trap:
When encoding categorical data (e.g., Quarter 1 through Quarter 4), users often create four binary indicator columns. If your regression includes an intercept (const = TRUE) and all four quarter columns, the sum of those columns always equals 1: This causes perfect collinearity with the constant term.- Fix: Always omit one baseline category (use dummy variables for k categories).
- Unit Conversion Duplication:
Including the same measure in different units (e.g., Weight in Pounds and Weight in Kilograms) creates an exact scalar relationship:- Fix: Keep only one operational scale per measure.
- Insufficient Observations:
If you have 10 data rows and 10 predictor variables, your degrees of freedom equal zero (). The regression system is underdetermined, resulting in#N/Avalues across the standard error and fit statistics. Ensure your observation count substantially exceeds your variable count.
Reading the LINEST Output Table
When LINEST executes with stats = TRUE, it returns a 5-row array spanning as many columns as you have predictors (plus intercept):
| Row | Col 1 () | Col 2 () | … | Last Col (Intercept) |
|---|---|---|---|---|
| 1 | Slope | Slope | … | Intercept b |
| 2 | … | |||
| 3 | #N/A | #N/A | ||
| 4 | F-statistic | #N/A | #N/A | |
| 5 | #N/A | #N/A |
Note: Excel by design places #N/A in rows 3–5 for columns 3 and onward in the output table because those positions do not hold standard statistics. This is expected behavior, not an error.
However, if #N/A appears in Row 1 (as a slope coefficient), Row 2 (as a standard error), or in the position (Row 3, Col 1), you are dealing with active collinearity or insufficient data rank.
To diagnose other common lookup or statistical lookup breaks involving #N/A, consult Troubleshooting #N/A Errors in Excel: The Ultimate Lookup Diagnostic Guide. For setting up regressions correctly through alternative tools, refer to Analysis ToolPak: Fixing “Input range must be a contiguous reference” in Regressions..