Quick Navigation
SLOPE Function
Summary
The Excel SLOPE function calculates the slope of the linear regression line through specified data points, representing the rate of change between dependent y-values and independent x-values. Essential for trend analysis and forecasting.
Syntax
SLOPE(known_y's, known_x's)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| known_y's | Array/Range |
Yes | Numeric dependent data points (y-values) |
| known_x's | Array/Range |
Yes | Numeric independent data points (x-values) |
Using the SLOPE Function
SLOPE measures how much the dependent variable changes per unit change in the independent variable. Use it to quantify trends in sales data, scientific measurements, or any paired datasets requiring linear relationship analysis.
Common SLOPE Examples
Basic Sales Trend Analysis
=SLOPE(B2:B13, A2:A13)
Calculates sales growth rate per month using monthly sales data in B2:B13 against sequential months in A2:A13.
Temperature vs Performance
=SLOPE(C2:C11, D2:D11)
Measures how machine performance changes with temperature, using performance data (C) against temperature readings (D).
Marketing ROI Analysis
=SLOPE(E2:E9, F2:F9)
Determines revenue increase per marketing dollar spent.
Frequently Asked Questions
Common Errors and Solutions
#N/A Error
Cause: Different number of data points in known_y's and known_x's, or both ranges empty
Solution: Ensure both ranges contain the same number of numeric data points
#DIV/0! Error
Cause: All y-values are identical (no variation)
Solution: Verify data contains variation in dependent variable
#VALUE! Error
Cause: Non-numeric values in ranges
Solution: Clean data to contain only numbers or ensure ranges are properly formatted
Notes
- Uses formula: slope = Σ((x-x̄)(y-ȳ)) / Σ((x-x̄)²) where x̄ and ȳ are means
- Zeros are treated as valid data points
- Text, logical values, and empty cells are ignored
- Available since Excel 2007
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365
Not available in: Excel 2003 and earlier
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+