Contact

LINEST Function in Google Sheets: Formula, Examples & Troubleshooting

Array Intermediate Google Sheets

Fit a linear regression in Google Sheets with LINEST. Check slope, intercept, reversed multiple-predictor coefficients, and an independently calculated example.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: LINEST estimates a straight-line model from paired observations. For the four workload measurements below, =LINEST(B2:B5,A2:A5) gives a slope of 2.1 and an intercept of 3, so the fitted model is minutes = 2.1*tickets + 3.

Verification: NOT_TESTED_IN_GOOGLE_SHEETS. Google’s documentation was reviewed on October 17, 2026. The datasets and expected answers below were calculated independently; they are not observations from a running Sheets workbook.

Syntax and arguments

=LINEST(known_data_y, [known_data_x], [calculate_b], [verbose])
  • known_data_y: measured outcomes.
  • known_data_x: corresponding predictors; omitted values default to the sequence 1, 2, 3, … .
  • calculate_b: defaults to TRUE; FALSE constrains the intercept to zero.
  • verbose: defaults to FALSE; TRUE adds regression diagnostics.

For a column of outcomes, predictor columns correspond to variables and rows correspond to observations. A two-dimensional outcome range instead requires matching predictor dimensions or omission of the predictor argument. With several predictors, Google documents reversed coefficient order. Optional brackets describe the syntax; do not type them. These contracts are from Google’s LINEST reference.

Worked example: estimate processing time

Enter this practice dataset in A1:B5. Tickets and minutes are numeric values.

Row A · Tickets B · Minutes
1 Tickets Minutes
2 1 5
3 2 7
4 3 10
5 4 11
  1. Put Slope in D1 and Intercept in E1.
  2. Leave D2:E2 empty, then enter =LINEST(B2:B5,A2:A5) in D2.
  3. The expected two-number result is 2.1, 3, across D2:E2.
  4. In C1 type Fitted minutes; in C2 enter =$D$2*A2+$E$2 and copy through C5.

The independently expected fitted values in C2:C5 are 5.1, 7.2, 9.3, 11.4. The differences B2-C2 through B5-C5 are −0.1, −0.2, 0.7, −0.4. The line need not pass through every point.

Here is a check that does not depend on any spreadsheet: the mean ticket count is 2.5 and mean time is 8.25. The sum of products of centered values is 10.5; the sum of squared centered ticket counts is 5. Their ratio is the slope, 2.1. The intercept is 8.25 − 2.1*2.5 = 3. Squared residuals total 0.7.

For an estimate at five tickets, put 5 in G2 and =$D$2*G2+$E$2 in H2. Expected result: 13.5 minutes. Five is outside the observed range, so label this as an extrapolation rather than a measured service level.

Advanced application: two independent predictors

On a separate sheet, enter the following in A1:C7:

Row A · Tickets B · Escalations C · Minutes
1 Tickets Escalations Minutes
2 0 0 5
3 1 0 7
4 0 1 8
5 1 1 10
6 2 0 9
7 2 1 12

Enter =LINEST(C2:C7,A2:B7) in E2, leaving E2:G2 clear. Expected coefficients: 3, 2, 5. Label them Escalations, Tickets, Intercept, in that order. The constructed model is minutes = 2*tickets + 3*escalations + 5; applying the first returned coefficient to Tickets would silently swap the variables. For three tickets and two escalations the model gives 17 minutes.

Intercept choice and diagnostics

In the first dataset, =LINEST(B2:B5,A2:A5,FALSE,FALSE) has expected slope 3.1 and constrained intercept 0. The slope is 93/30, calculated from the sum of x*y divided by the sum of x². Constraining the intercept is a different model, not a way to improve the appearance of a chart. Here it discards the fixed-time component.

Google’s verbose mode includes coefficient uncertainties, R², residual standard error, F, degrees of freedom, and regression/residual sums of squares. For the unconstrained first example, independently derived checks include R² ≈ 0.969230769, 2 residual degrees of freedom, and residual standard error ≈ 0.591607978. These are numerical cross-checks, not a verified map of every cell in the verbose output. Google LINEST details.

Errors, edge cases, and troubleshooting

  • Pair the same observations: A2:A5 with B2:B5. A one-row shift can produce believable but unrelated coefficients.
  • Keep headings out of the regression ranges. Use numeric measurements and investigate missing values before fitting.
  • If an array cannot expand, inspect the neighboring output cells before editing the source data. Google’s array guide explains that array results occupy neighboring cells.
  • Constant x values cannot identify an ordinary unconstrained slope. Duplicate or dependent predictors can make a multi-variable model unidentifiable; remove redundant predictors rather than interpreting unstable coefficients.
  • Exact fits and very small samples do not prove a reliable forecast. No exact Sheets error token for each degenerate model is asserted here; the retrieved reference does not supply that complete error matrix.

Availability and compatibility

LINEST is documented for the current rolling Google Sheets service. Its first introduction date and last functioning release are not established by the sources reviewed; a current help page is not a historical version test. No retirement is established. The formulas use English names and comma argument separators. Inspect spreadsheet locale and function-language settings when translating a workbook. Do not carry over another engine’s handling of singular data without testing it.

Related published guides: SLOPE, INTERCEPT, and RSQ.

First-party references

Reviewed October 17, 2026: LINEST, arrays, and locale settings. Documentation establishes the described function contract; it does not establish native execution of these examples.