Skip to main content
← All functions

LINEST function

Returns the parameters of a linear trend

Syntax

LINEST(known_y's, [known_x's], [const], [stats])

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
known_y'sYesThe set of y-values you already know in the relationship y = m*x+b.B2:B7
known_x'sNoThe set of x-values you already know in the relationship y = m*x+b.A2:A7
constNoA logical value specifying whether to force the constant b to equal 0.true
statsNoA logical value specifying whether to return additional regression statistics.true

Try LINEST

Return both slope and intercept

=LINEST(B2:B5,A2:A5)

All four points lie on y=2*x+1. LINEST returns slope 2 followed by intercept 1 across two cells. Both cells are checked, not just the spill anchor.

Inspect the current formula

Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.

Read the formula, one argument at a time

Explore the written function calls and their inputs. The calculation result belongs to the complete formula.

LINEST · top-level call

=LINEST(B2:B5,A2:A5)

1 / 2 · known_y's

The set of y-values you already know in the relationship y = m*x+b.

LINEST reference ↗

Follow the cells behind a result

Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.

The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.

Practice a complete task

Reference and compatibility

Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.