Numbers Exercises

LINEST in Apple Numbers

Last updated:

Short answer: LINEST calculates the best-fit straight line and returns the slope and intercept as an array. Syntax: LINEST(y-values, x-values)

Explanation

LINEST calculates the best-fit straight line and returns the slope and intercept as an array. With INDEX you pick one value from it.

Syntax

LINEST(y-values, x-values)

Example

Use LINEST to calculate the slope of the line for quantities (C2:C5) against prices (B2:B5), rounded to 2 decimals.

Table 1
ABC
1ProductPriceQty
2Apple410
3Pear65
4Kiwi122
5Grape83

Formula: =ROUND(INDEX(LINEST(C2:C5,B2:B5),1,1),2)
Result: -0.91

Frequently asked questions

What does LINEST do in Apple Numbers?

LINEST calculates the best-fit straight line and returns the slope and intercept as an array. With INDEX you pick one value from it.

What is the syntax of LINEST?

The syntax is LINEST(y-values, x-values).

More in this category

Practise it yourself

Type the formula yourself in a real exercise and see right away if your answer is correct. The first exercises are free.

Start practising