Statistical All versions ◉ 45 views

=SLOPE()

Returns the slope of the linear regression line through data points in known_y's and known_x's. The slope is the vertical distance divided by the horizontal distance between any two points on the line, which is the rate of change along the regression line.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=SLOPE(known_y's, known_x's)
Hover argument names in the table for details.
Output typeNumber
Popularity25 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =SLOPE() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download SLOPE.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
known_y's Range Required An array or cell range of numeric dependent data points.
known_x's Range Required The set of independent data points.

▣ Examples

▦ Data
CellValue
A2 Known y
B2 Known x
A3 1/2/1900
B3 6
A4 1/3/1900
B4 5
A5 1/9/1900
B5 11
A6 1/1/1900
B6 7
A7 1/8/1900
B7 5
A8 1/7/1900
B8 4
A9 1/5/1900
B9 4
A10 Known y
B10 Known x
A11 1/2/1900
B11 6
A12 1/3/1900
B12 5
A13 1/9/1900
B13 11
A14 1/1/1900
B14 7
A15 1/8/1900
B15 5
A16 1/7/1900
B16 4
A17 1/5/1900
B17 4
Slope of the linear regression line through the data points in A3:A9 and B3:B9. =SLOPE(A3:A9,B3:B9)
Result: 0.305556

§ Remarks

  • The arguments must be either numbers or names, arrays, or references that contain numbers.
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
  • If known_y's and known_x's are empty or have a different number of data points, SLOPE returns the #N/A error value.
  • The equation for the slope of the regression line is: where x and y are the sample means AVERAGE(known_x’s) and AVERAGE(known_y’s).
  • The underlying algorithm used in the SLOPE and INTERCEPT functions is different than the underlying algorithm used in the LINEST function. The difference between these algorithms can lead to different results when data is undetermined and collinear. For example, if the data points of the known_y's argument are 0 and the data points of the known_x's argument are 1: SLOPE and INTERCEPT return a #DIV/0! error. The SLOPE and INTERCEPT algorithm is designed to look for one and only one answer, and in this case there can be more than one answer. LINEST returns a value of 0. The LINEST algorithm is designed to return reasonable results for collinear data, and in this case at least one answer can be found.

✦ Tips

  • The arguments must be either numbers or names, arrays, or references that contain numbers.
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
  • The equation for the slope of the regression line is: where x and y are the sample means AVERAGE(known_x’s) and AVERAGE(known_y’s).

⚠ Common Errors

#N/A If known_y's and known_x's are empty or have a different number of data points, SLOPE returns the #N/A error value.
Fix: Make the two ranges the same size
#DIV/0! For example, if the data points of the known_y's argument are 0 and the data points of the known_x's argument are 1: SLOPE and INTERCEPT return a #DIV/0! error.
Fix: داده‌های ورودی را بررسی کنید که هم‌خط و نامعین نباشند؛ از تابع LINEST برای داده‌های هم‌خط استفاده کنید.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.