#### How to use SLOPE function

The SLOPE function in Excel is a statistical function that calculates the slope of a line through a set of data points. The slope is the rate of change between the dependent variable (y-axis) and the independent variable (x-axis). It’s used to determine the linear relationship between two data sets, which is useful in forecasting and linear regression analysis.

### Syntax

The SLOPE function syntax is:

SLOPE(known_y’s, known_x’s)

• known_y’s: The set of dependent variables.
• known_x’s: The set of independent variables.

Both arguments must be arrays or ranges with the same number of data points; otherwise, Excel returns an error.

### Steps to Use the SLOPE Function

1. Arrange your data in two columns. One column should represent the independent variable (X), and the other should represent the dependent variable (Y).
2. Click on the cell where you want the slope result to appear.
3. Type =SLOPE( into the selected cell.
4. Click and drag to select the range for the dependent variable (Y) data, type a comma, then click and drag to select the range for the independent variable (X) data.
5. After selecting the ranges, close the parenthesis and press Enter. Excel will calculate the slope of the line that best fits your data based on the least squares method.

### Example

Suppose you have data for advertising costs (independent variable) in column A and sales revenue (dependent variable) in column B. You want to find the slope of the line that best fits this data to understand how sales revenue changes with advertising costs.

• A (Advertising Costs): \$100, \$200, \$300, \$400
• B (Sales Revenue): \$500, \$700, \$900, \$1100