Excel
LINEST function in Excel
Returns the parameters of a linear trend
=LINEST(known_y's, [known_x's], [const], [stats])LINEST syntax and parameters
Four arguments, one required.
- known_y'sanyRequired
- known_x'sanyOptional
- constanyOptional
- statsanyOptional
LINEST examples
Formulas you'll actually reuse.
Slope and intercept of monthly revenue against month number:
=LINEST(B2:B13, A2:A13)Result
{412.5, 8120}Project month 13 from the fitted line:
=INDEX(LINEST(B2:B13, A2:A13), 1, 1) * 13 + INDEX(LINEST(B2:B13, A2:A13), 1, 2)Result
13482.5
LINEST in Google Sheets
Same name — your formula ports as-is.
Try LINEST in the playground
Edit the example — nothing to install.
Preloaded with the LINEST formula from Example 1 — change anything and watch it respond.
Loading the editor…
LINEST errors
What they mean — and the fixes.
#REF!known_data_y and known_data_x have different lengths — both ranges must cover the same number of points.
Related functions
More ways Excel gets this done.
- AVERAGEIFReturns the average (arithmetic mean) of all the cells in a range that meet a given criteriaStatisticalGoogle Sheets
- FORECAST.LINEARReturns a future value based on existing valuesStatisticalGoogle Sheets
- CELLReturns information about the formatting, location, or contents of a cellThis function is not available in Excel for the web.InfoGoogle Sheets
- CSCReturns the cosecant of an angleMathGoogle Sheets
- FILTERFilters a range of data based on criteria you defineLookupGoogle Sheets
- FINDFinds one text value within another (case-sensitive)TextGoogle Sheets