Formulas and Functions Help
- Welcome
- Intro to formulas and functions
-
- ACCRINT
- ACCRINTM
- BONDDURATION
- BONDMDURATION
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNUM
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENCYCODE
- CURRENCYCONVERT
- CURRENCYH
- DB
- DDB
- DISC
- EFFECT
- FV
- INTRATE
- IPMT
- IRR
- ISPMT
- MIRR
- NOMINAL
- NPER
- NPV
- PMT
- PPMT
- PRICE
- PRICEDISC
- PRICEMAT
- PV
- RATE
- RECEIVED
- SLN
- STOCK
- STOCKH
- SYD
- VDB
- YIELD
- YIELDDISC
- YIELDMAT
-
- AVEDEV
- AVERAGE
- AVERAGEA
- AVERAGEIF
- AVERAGEIFS
- BETADIST
- BETAINV
- BINOMDIST
- CHIDIST
- CHIINV
- CHITEST
- CONFIDENCE
- CORREL
- COUNT
- COUNTA
- COUNTBLANK
- COUNTIF
- COUNTIFS
- COVAR
- CRITBINOM
- DEVSQ
- EXPONDIST
- FDIST
- FINV
- FORECAST
- FREQUENCY
- GAMMADIST
- GAMMAINV
- GAMMALN
- GEOMEAN
- HARMEAN
- INTERCEPT
- LARGE
- LINEST
- LOGINV
- LOGNORMDIST
- MAX
- MAXA
- MEDIAN
- MIN
- MINA
- MODE
- NEGBINOMDIST
- NORMDIST
- NORMINV
- NORMSDIST
- NORMSINV
- PERCENTILE
- PERCENTRANK
- PERMUT
- POISSON
- PROB
- QUARTILE
- RANK
- SLOPE
- SMALL
- STANDARDIZE
- STDEV
- STDEVA
- STDEVP
- STDEVPA
- TDIST
- TINV
- TTEST
- VAR
- VARA
- VARP
- VARPA
- WEIBULL
- ZTEST
SLOPE
The SLOPE function returns the slope of the best-fit line for the set using linear regression analysis.
SLOPE(y-values, x-values)
y-values: The collection containing the y (dependent) values. y-values must contain number values, date/time values or duration values. All values must be of the same value type.
x-values: The collection containing the x (independent) values. x-values must contain number values, date/time values or duration values. All values must be of the same value type.
Notes
The two collections must be of the same size or the function returns an error.
If, for example, you had data on the driving speed of a vehicle and its fuel efficiency at each speed, fuel efficiency would be the dependent variable and driving speed would be the independent variable.
To find the y-intercept of the best-fit line, use the INTERCEPT function.
Example |
---|
Suppose you kept a record of the periodic changes in the price you paid for gas and also the average temperature setting of your thermostat during the period covered by the specified price. Given the following table: |
A | B | |
---|---|---|
1 | Price | Setting |
2 | 4.50 | 64 |
3 | 4.20 | 65 |
4 | 3.91 | 65 |
5 | 3.22 | 66 |
6 | 3.09 | 66 |
7 | 3.15 | 66 |
8 | 2.98 | 68 |
9 | 2.56 | 70 |
10 | 2.60 | 70 |
11 | 2.20 | 72 |
=SLOPE(B2:B11, A2:A11) returns approximately -3.23374495288702, indicating a best-fit line sloping downwards (as prices rose, the setting on the thermostat was lowered). |