The help files on microsoft site does not offer much details about the internal formula used by Linest function.
Linest uses this regression analysis equation
http://njinstruments.com/statistics/online-regression-analysis-calculator.html
b = [n ΣXY - ΣX ΣY]/[ n ΣX^2 - [ΣX]^2 )
a = ΣY/n - b ΣX/n
y = a + bx
here b is the slope of the line
and a is the intercept
Statistical software from
http://njinstruments.com/ shows detailed workout of the regression analysis as internally used by Linest function
X values
4 5 2 7 3 6 3 2 4 2
Y values
88 95 105 111 103 105 65 42 105 87
Regression Equation = 65.377 + 6.638 X
How Regression Equation was calculated
n #### X #### Y ##### XY ##### X^2
1 #### 4 #### 88 #### 352 #### 16
2 #### 5 #### 95 #### 475 #### 25
3 #### 2 #### 105 ### 210 #### 4
4 #### 7 #### 111 ### 777 #### 49
5 #### 3 #### 103 ### 309 #### 9
6 #### 6 #### 105 ### 630 #### 36
7 #### 3 #### 65 #### 195 #### 9
8 #### 2 #### 42 #### 84 ##### 4
9 #### 4 #### 105 ### 420 #### 16
10 ### 2 #### 87 #### 174 #### 4
#### ΣX = 38 #### ΣY = 906 #### ΣXY = 3626 #### Σ[X2] = 172
b = [n ΣXY - ΣX ΣY]/[ n ΣX^2 - [ΣX]^2 ) #### 6.638
a = ΣY/n - b ΣX/n #### 65.377
Linear Regression Equation #### y = 65.377 + 6.638 X