How to Make Excel Calculate the Graph's Slope

How to Make Excel Calculate the Graph's Slope
••• Rawpixel/iStock/GettyImages

The slope of a graph gives you valuable information about the relationship between the two variables that were graphed. Essentially, the slope describes how much the "y" variable (on the vertical axis) moves per unit change in the "x" variable (the horizontal axis). Once you enter your data into an Excel spreadsheet, the program can produce a scatter plot graph, which is a useful tool for visualizing your numbers. Following that, you can have Excel calculate the equation for the best straight line through the graph. This equation will include the slope.

Creating a Scatter Plot

    Open a new Excel file and, in a fresh worksheet, enter your "x" data as a series of numbers going downwards in a single column. The x values on a graph are normally the ones which you can control or vary. For example, if you were plotting the relationship between hours of sleep per night and students' school grades, the hours of sleep would be the x data.

    Enter the "y" data as a vertical series of numbers in a single column immediately to the right of the "x" column. There should be one y value paired with each x value. In the example of students' sleep, the school grades would be the y data.

    Position the mouse cursor over the left uppermost data point in your two columns. Hold down the left mouse button and drag the cursor to the bottom right data point. Release the button. Your entire data series should be highlighted.

    Left click on the "Insert" tab on the upper Excel menu. A banner of options will open along the top of the window. In the "Chart" section, click the icon labeled "Scatter" and then select the icon labeled "Scatter with only Markers." Excel will create a scatter plot graph of your data and display it as an overlay on the worksheet.

Finding the Slope

    Right click the mouse on any of the data points on your scatter plot. A window of options will appear. Click on the option labeled "Add trendline..." A new window of options will appear.

    Check the box labeled "Display Equation on Chart" and then close the window.

    Examine the equation for the line, which Excel is now displaying overlaid on the scatter plot. The equation will be in the form of "y = mx + b" where m and b will be numbers. The value of "m" is the slope of the graph. For example, if the equation is y = 5.2x + 7, the slope is 5.2.

    Things You'll Need

    • Computer
    • Microsoft Excel software

    Tips

    • It is possible for the slope to be a negative number. This means that the straight line in your graph travels downwards from left to right rather than upwards.

Related Articles

Montessori-Inspired Toys & Kits for Your Little Scientist
How to Determine the Y-Intercept of a Trend Line
How to Make a Monthly Budget Circle Graph
How to Find the Slope of a Plotted Line With the TI-84...
How Do I Calculate the Relative Standard Deviation...
How to Calculate Correlation Coefficient Between Two...
How to Test Linearity in SPSS
How to Express Your Answer in Interval Notation
How to Find Correlation Coefficient & Coefficient of...
How to Calculate the Slope of a Line of Best Fit
How to Create Linear Equations
How to Subtract Matrices on Excel
How to Graph Parabolas on a TI-84 Calculator
How to Calculate Mode in Minitab
How to Make a Semi-Log Graph on Excel?
How to Calculate Slope Using the TI-83 Plus
How to Find X & Y Intercepts on a Graphing Calculator
How to Find the Domain Range of a Parabola Parameter...
How to Calculate Regression Coefficient
How to Solve 3-Variable Linear Equations on a TI-84
How to Determine the Bin Width for a Histogram