EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Statistical Functions in Excel SLOPE Function in Excel
Secondary Sidebar
Excel Functions
  • Statistical Functions in Excel
    • COUNTIF Formula in Excel
    • COUNTIF Multiple Conditions
    • COUNTIFS with Multiple Criteria
    • Statistics in Excel
    • Confidence Interval in Excel
    • Interpolate in Excel
    • Linear Programming in Excel
    • COUNTIFS in Excel
    • Excel Variance
    • Normal Distribution Formula in Excel
    • Count Cells with Text in Excel
    • Excel Formula For Rank
    • Linear Regression in Excel
    • COUNTA Function in Excel
    • MAX Formula in Excel
    • Excel NORMSINV
    • Count Names in Excel
    • FORECAST Formula in Excel
    • NPER in Excel
    • Excel Median Formula
    • Lognormal Distribution in Excel
    • Excel Chi Square Test
    • Count Formula in Excel
    • COUNTIF Examples in Excel
    • Excel P-Value
    • COUNTIF Not Blank in Excel
    • Excel Standard Deviation Formula
    • Excel GROWTH Formula
    • Excel Percentile Formula
    • Excel Frequency Formula
    • Excel Average Formula
    • Excel Correlation Matrix
    • Excel Z Score
    • Excel MAX IF Function
    • Z TEST in Excel
    • Excel Trendline
    • Excel F-Test
    • Excel STDEV Function
    • Excel Frequency Distribution
    • DCOUNT Function in Excel
    • Excel MIN Function
    • Excel Forecast Function
    • FREQUENCY Excel Function
    • COUNTIF with Multiple Criteria
    • Standard Deviation in Excel
    • MAX Excel Function
    • Excel QUARTILE Function
    • Excel T.Test Function
    • Excel PERCENTILE Function
    • MODE Excel Function
    • SLOPE Excel Function
    • Excel Median Function
    • Excel TREND Function
    • Excel Count Function
    • Excel LARGE Function
    • SMALL Excel Function
    • COUNTIF Excel Function
    • Excel AVERAGE Function
    • Excel CORREL Function
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (36+)
  • Maths Function in Excel (47+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Excel Tips (220+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL ADVANCED Training Certification
  • Online Excel for Marketing Course

SLOPE Function in Excel

By Jeevan A YJeevan A Y

SLOPE Function in Excel

SLOPE Function in Excel (Table of Contents)

  • SLOPE Function in Excel
  • SLOPE Formula in Excel
  • How to Use the SLOPE Function in Excel?

SLOPE Function in Excel

SLOPE Function is a statistical function in excel. SLOPE Function calculates the slope of a line generated by linear regression. In Excel, Slope is calculated by considering the data points on a straight line called Known Xs and Known Ys. A straight line equation is formed by using Slope and Intercept, where Slope is the ratio of rise and run, which are there anywhere in the straight line. For example, we have created a straight line using some values, and we need to find the Slope of that using a few or all the used values; this is done using the Slope function.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

Before going to a brief introduction on the SLOPE Function in excel, let us discuss what SLOPE is?

What is SLOPE of a Line?

The slope of a line nothing but the Steepness of the line. The slope of a straight line shows how steep the line is. “The steeper the line, the larger the slope”.

Now, look at the below lines.

slope function in excel Lines

Let me say each of the above lines represents the money in the bank account over a period.

Line 1: This line is going up. That means the amount of money in this bank account increasing over a period.

Line 2: This line is going down. That means the amount of money in this bank account decreasing over a period.

Line 3: This is a horizontal straight line neither goes up nor comes down. This is a steady line, and the amount of money remains constant.

Line 4: This is a line that is also going up like the first line. But this line seems going up faster than the first line. This line looks steeper than the first one. The amount of money in this bank account is increasing faster because of the steeper line.

What if we want to be specific about how we describe this steepness. SLOPE is described as the steepness of the line.

SLOPE = RISE / RUN

RISE is the vertical change & RUN is the horizontal change.

SLOPE Function line formula

To fund the SLOPE, we take the “change in rise over a change in run”.

Examples of SLOPE:

Example 1: Look at the below graph.

SLOPE Example 1

Slope of the line = 4/4 = 1

Example 2: Look at the below graph.

SLOPE Example 2

Slope of the line = 6/2 = 3

Example 3: Look at the below graph.

SLOPE Example 3

Slope of the line = 3/6 = 0.5

Example 4: Look at the below graph.

SLOPE Example 4

Slope of the line = -4/2 = -2

SLOPE Formula in Excel:

Below is the SLOPE Formula in Excel :

slope function Formula in Excel

SLOPE Formula includes two arguments:

  • Known_y’s: This is a range of cells of numeric dependent values.
  • Known_x’s: This is a range of cells of numeric independent values.

The length of the Known_y’s should be the same as the length of the Known_x’s, but the variance should not be zero.

How to Use the SLOPE Function in Excel?

SLOPE Function in Excel is very simple and easy to use. Let us now see how to use this SLOPE Function in Excel with the help of some examples.

You can download this SLOPE Function Excel Template here – SLOPE Function Excel Template

Example #1

In this example, I have two sets of values (Known_y’s and Known_x’s). Calculate the slope of these two ranges using the SLOPE function in excel.

slope function in excel Example 1-1

Apply the SLOPE Function to get the slope value of the line.

SLOPE Example 1-2

So the result will be :

SLOPE Example 1-3

Insert graph for it.

SLOPE Example 1-4

Example 2: We can directly enter the values to the formula itself but with curly brackets. Below images are the examples for it.

Picture 1

SLOPE Example 2-1

So the result will be :

SLOPE Example 2-2

Picture 2

SLOPE Example 2-3

So the result will be :

SLOPE Example 2-4

SLOPE as VBA Function

Below is the code for running macro for SLOPE Function :

Sub SLOPE_Example()

Step 1: Declare variables

Dim Known_X As Range

Dim Known_Y As Range

Step 2: Set the object variables

Set Known_X = Range(“A2:A7”)

Set Known_Y = Range(“B2:B7”)

Step 3: Show the result in Message Box

MsgBox Application.WorksheetFunction.Slope (Known_Y, Known_X)

End Sub

Things to Remember

  • Both the parameters are should be in the same length. For example, if Known_y’s range is A2: A10, then Known_x’s values should be in the range of the same length.
  • Both the arguments can accept only numerical values; if there are text or string values, then it excludes those values. The arguments can contain numbers or names that contain numbers.
  • Both the arguments should not be empty; if any one of the ranges is empty, then the result will be #DIV/0!
  • A variance of the two arguments should not be zero. If the variance is zero, then we will get #DIV/0!
  • Learn the basics of SLOPE to understand the working method of SLOPE in excel.

This has been a guide to the SLOPE Function in Excel. Here we discuss the SLOPE Formula in Excel and how to use the SLOPE Function in Excel along with practical examples and downloadable excel templates. You can also go through our other suggested articles –

  1. SUM Function in Excel
  2. LEN Function in Excel
  3. EVEN Excel Function
  4. Logical Functions in Excel
Popular Course in this category
Excel Advanced Training (16 Courses, 23+ Projects)
  16 Online Courses |  23 Hands-on Projects |  140+ Hours |  Verifiable Certificate of Completion
4.8
Price

View Course

Related Courses

Excel for Marketing Training (8 Courses, 13+ Projects)4.9
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

Download SLOPE Function Excel Template

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download SLOPE Function Excel Template

EDUCBA

डाउनलोड SLOPE Function Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more