Step 1: Install the Data Analysis Toolpak, if it isn’t already installed. For instructions on how to load the Data Analysis Toolpak, click here.
Step 2: Type your data into two columns in Excel. For example, type your “x” data into column A and your “y” data into column b. Do not leave any blank cells between your entries.
Step 3: Click the “Data Analysis” tab on the Excel toolbar.
Step 4: Click “regression” in the pop up window and then click “OK.”
Step 5: Select your input Y range. You can do this two ways: either select the data in the worksheet or type the location of your data into the “Input Y Range box.” For example, if your Y data is in A2 through A10 then type “A2:A10” into the Input Y Range box.
Step 6: Select your input X range by selecting the data in the worksheet or typing the location of your data into the “Input X Range box.”
Step 7: Select the location where you want your output range to go by selecting a blank area in the worksheet or typing the location of where you want your data to go in the “Output Range” box.
Step 8: Click “OK”. Excel will calculate the linear regression and populate your worksheet with the results.
Tip: The linear regression equation information is given in the last output set (the coefficients column). The first entry in the “Intercept” row is “a” (the y-intercept) and the first entry in the “X” column is “b” (the slope).