LINEST in Apple Numbers
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.
| A | B | C | |
|---|---|---|---|
| 1 | Product | Price | Qty |
| 2 | Apple | 4 | 10 |
| 3 | Pear | 6 | 5 |
| 4 | Kiwi | 12 | 2 |
| 5 | Grape | 8 | 3 |
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