Excel – How does auto-fill based on three values work

microsoft excel

How does auto-fill based exactly on three values work? What is the algorithm?

I mean, imagine you have three values in three consecutive cells in a row (1;2;4 e.g). You select them, then you drag the bottom right corner of the third cell. You let auto-fill four other cells. The result looks similar to this:

1;  2;  4;  5,333333333;    6,833333333;    8,333333333;    9,833333333

How did Excel come up with those last four values? What's the algorithm?

No need to be too formal in your answer. I bet it's something trivial. However I wasn't able to find the answer so far.

Best Answer

Excel is using linear regression to guess the subsequent values.

If you plot the values as a graph, its approximating a straight line though the X,Y co-ordinates of the given values. Based on this it calculates a slope and Y-axis intercept, which is then used to calculate the subsequent values :

enter image description here

You can read more here : https://en.wikipedia.org/wiki/Linear_regression

Related Question