PDA

View Full Version : Angle of a trend line



CPerry
08-10-2018, 04:35 AM
I am a little confused on how to find the angle of a trend line.

If I have as a basic example:

A B

1 0
2 50
3 100

When inputting a scatter chart, this will create a nice 45 degree angle looking trend line (by eye).

=SLOPE(B2:B4,A2:A4) gives me 50... ok, 50 is half of 100, 45 degrees is half of 90. Makes sense. But then I get
=ATAN(SLOPE(B2:B4,A2:A4)) returning 1.55079899... which makes no sense?

I saw somewhere else on google that I should use:
=ATAN(SLOPE(B2:B4,A2:A4))/(2*PI())*360 and this gives me 88.8542372...

I am so confused?

Basically I want a formula that shows me the trend is 45% (I then /90*100 to express this as 50%) to show the general direction of the trend of sets of data. Hope this makes sense? It's been a couple of years since I've had to use any kind of a level maths so I'm obviously misremembering a pretty crucial part.

pike
08-10-2018, 04:31 PM
Hi CPerry,
88 degrees correct. For 45 degree slope the data would need to be
0,0
50, 50
100,100
Change the chart x and y scales to the same. Then you will see the true linear slope


the formula is =DEGREES(ATAN(SLOPE(B1:B3,A1:A3)))
excel calculates in radians d will need to be converted o degrees

CPerry
08-12-2018, 01:31 AM
Brilliant thank you! Makes sense now :)