# How to Find Uncertainty of Slope in Excel (With Example)

You can use the LINEST function in Excel to find the uncertainty of the slope of a regression line.

The following example shows exactly how to do so.

## Example: How to Find Uncertainty of Slope in Excel

Suppose we have the following dataset in Excel:

Suppose we would like to fit a linear regression model to this dataset and find the uncertainty of the slope of the regression line.

We can use the LINEST function to do so, which uses the following basic syntax:

```LINEST(known_y's, known_x's, const, stats)
```

where:

• known_y’s: A column of values for the response variable
• known_x’s: One or more columns of values for the predictor variables
• const: TRUE = calculate intercept normally, FALSE = force intercept to be zero
• stats: TRUE = calculate additional regression statistics, FALSE = only calculate coefficients

We can type the following formula into cell D1 to fit a simple linear regression model to this dataset:

```=LINEST(B2:B15, A2:A15, TRUE, TRUE)
```

The output from the LINEST function contains the coefficients of the regression model along with several additional statistics:

The following screenshot provides an explanation of each value in the output:

From the output we can see:

• The value for the slope is 0.693717.
• The value for the uncertainty of the slope is 0.070978.

All of the other values in the output from the LINEST function provide us with additional information about the overall fit of the regression model.