Excel LINEST Function
LINEST([CELLS] Y Values, [CELLS] X Values, [BOOL] Constant, [BOOL] Stats)
Follow this procedure to use LINEST to compute the slope and intercept of the best-fit line for your data, along with the uncertainties for both values:
- Start with your X data values in one column and your Y data values in another column.
- Select four cells:
- Click on the formula bar and type this:
(But instead of A1:A20, use the range of cells containing your Y values,
and instead of B1:B20, use the range of cells containing your X values.)
- Press Ctrl+Shift+Enter
- Each cell will now contain this information:
Here is an animated GIF showing how to perform these steps: