Does anybody know if it is possible in Excel 2000 to determine the gradient of a line graph with the equation y=mx+c???
A trendline will provide the corresponding formula, but it isn't accurate enough.
Cheers
Printable View
Does anybody know if it is possible in Excel 2000 to determine the gradient of a line graph with the equation y=mx+c???
A trendline will provide the corresponding formula, but it isn't accurate enough.
Cheers
Obviously, you know enough algebra to be aware that in "y=mx+c" the "m" is the "slope" of the line.
So what do you mean when you say "gradient"?
Cheers Bill, I was asking this on behalf of a colleague.
Apparently he doesn't actually know the equation (although his question didn't make that apparent) but he would like to know the gradient. He was hoping Excel might be advanced enough to be able to calculate it.
The slope of a line in a coordinate plane can be calculated by...
(vertical coordinate of second point minus vertical coordinate of first point) all divided by (horizontal coordinate of second point minus horizontal coordinate of first point)
Unfortunately, I don't know if Excel will calculate that for you. :)
I'll see if I can find it.
Thanks, I appreciate your help.
This is what I did in Excel 2002 (aka Excel XP). I'm not sure if it is the same in Excel 2000 or Excel 97.
I created a set of data that I knew would create a linear graph with a slope of 2 and a vertical axis intercept of 3, and then used the chart wizard to create that graph.
Right-click on the line (the graph).
From the context-sensitive menu, selct "Add Trendline..."
When the Add Trendline box appears, select the Options tab.
Check the box that says,"Display equation on chart".
Click OK.
The equation of the trendline will now be displayed. Since the trendline for a linear graph is the very same line, the equation of the trendline is (conveniently) the equation of the line itself.
The equation of the trendline is displayed in the form y=mx+c, and m=the slope, or gradient.
Mine was y=2x+3, just as I expected it to be. :)
Thank you very much, my colleague thinks this will help him.
Pleased to assist one of our mates across the water! :)
Good night.