December 13th, 2002, 10:18 AM
Gradient of Line Graph in Excel
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.
December 13th, 2002, 07:40 PM
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"?
December 16th, 2002, 04:29 AM
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.
December 16th, 2002, 05:10 AM
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.
December 16th, 2002, 05:16 AM
Thanks, I appreciate your help.
December 16th, 2002, 05:46 AM
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".
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.
December 16th, 2002, 05:55 AM
Thank you very much, my colleague thinks this will help him.
December 16th, 2002, 05:57 AM
Pleased to assist one of our mates across the water!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)