Graphing a Function: Basics

Excel can generate many different kinds of plots. We will only discuss generated a graph of a function such as you're used to in math classes. You can use this to plot any complicated function you come across, including problems in your homework as well as the labs.

Step 1: Create a Data Table

You first need to create a table of values.

  1. Decide what range of x values you wish to plot, and what step size you will use. (Hint: Smaller step sizes make larger tables, but tend to give nicer looking graphs.)
  2. Create a column of x values by copying or filling the series down.
  3. Enter the formula for the y values in the column to the right of the x values, and then fill that formula down the column.

You now have a table of x and y values.

We will use as an example a plot of the function y = e2 x+1 on the interval from -1 to 1 using a step size of 0.1. We fill in column A with x values, then enter =EXP(2*A2)+1 in cell B2 to start the formula. (See Special Functions for information on the exponential function.) Finally we copy the formula down, and we get the table at the right. (We have cut out several intermediate rows to make it shorter.)

Now you are ready to go to Charts to make your graph.

 

A
B
1
x
y
2
-1
1.14
3
-0.9
1.17
4
-0.8
1.20
5
-0.7
1.25
6
-0.6
1.30
...
...
...
15
0.4
3.23
16
0.5
3.72
17
0.6
4.32
18
0.7
5.06
19
0.8
5.95
20
0.9
7.05
21
1
8.39

Charts

Return to Excel Guide