# How to Make Excel Calculate the Graph's Slope Automatically

Save

You have a line and you want to find out how steep it is. You might manually calculate its slope by taking its slant or rise and dividing by its run, or length. But this takes time and you want to do it quickly. Slope can be automatically calculated by using a software program such as Excel by following a few basic steps.

### Things You'll Need

• Microsoft Excel 2007
• Open Excel and enter the data into a table format with two columns, the first column should be labelled "X" and the second column should be labelled "Y". Enter your x and y coordinates into the table.

The first column might look like this:

X

2

3

4

5

7

The second column, entered directly to the right of the first, might look like this:

Y

5

6

7

8

19

Each of these coordinates represents a point on the line. In this example the points are: (2,5), (3,6), (4,7), (5,8) and (7,19).

• Click on the "Data" option from the main menu using your left mouse button. Click on the "Data Analysis" sub-option which is to the far right. A "Data Analysis" dialog box will open. Select the "Regression" option with your mouse and click the "OK" button with your left mouse. The "Regression" dialog box will open with the cursor blinking in the "Input Y Range" box.

• Use your left mouse button to click the picture of the spreadsheet to the right of the "Input Y Range" box. Select the "Y" column from the spreadsheet by clicking with your left mouse on cell B2, which should have the value 2 in it. Hold down the left mouse button and drag the mouse to the last number in the "Y" column, the value 19 in cell B6. Tap on the "Enter" key on your keyboard and the values you selected will be inserted into the "Regression" dialog box.

• Select the "X Input Range" in the same manner. Use your left mouse button to click the picture of the spreadsheet to the right of the "Input X Range" box. Select the "X" column from the spreadsheet by clicking with your left mouse on cell A2, which should have the value 5 in it. Hold down the left mouse button and drag the mouse to the last number in the "X" column, the value 7 in cell A6. Tap on the "Enter" key on your keyboard and the values you selected will be inserted into the "Regression" dialog box. Select the "OK" option with the left mouse button and the regression table will be inserted into a new spreadsheet in Excel.

• Read the output. The slope is in row 18; the row with the label "X Variable 1". The slope is in cell B18. In this example, the slope is 2.7.

## Tips & Warnings

• This set of instructions applies to Microsoft Excel 2007. Instructions will differ slightly, based on what version of Excel you are using.

## References

• Photo Credit Hemera Technologies/Photos.com/Getty Images
Promoted By Zergnet

## Related Searches

Check It Out

### How to Build and Grow a Salad Garden On Your Balcony

M
Is DIY in your DNA? Become part of our maker community.