To create a graph in Excel with two variables, put each variable in its own column with a header row, select both columns including the headers, then click Insert > Charts and choose the chart type that fits your data: Scatter for two numeric variables (a natural X-Y relationship), Clustered Column for comparing categories against two measures, or Line if one variable is time. Excel reads the first column as categories or X values and the second as values or Y values, so the most common failure is selecting the wrong columns or leaving header text out of the selection. The whole job takes under a minute once the data is laid out correctly.
Menu labels can differ slightly by Excel version, platform and region, but the chart types and the Insert tab behave the same on Windows, Mac, the web app and the mobile apps.
What You'll Need
- Excel on desktop, Mac, the web or mobile, or another spreadsheet app that supports charts.
- Your data arranged in two columns, ideally with a header in each column.
- Both variables stored as real numbers, not text. Numbers typed with a currency symbol or followed by a space can be stored as text and will plot as zero or not at all.
- No blank rows or blank cells inside the block you select. Excel can skip a row or stop the series early when it hits a gap.
Step-by-Step
- Lay out the data. In an empty area, put one variable in column A and the other in column B. Row 1 holds labels such as Hours studied and Test score; rows 2 onward hold the matching pairs. Keep each pair on the same row so the two values belong together.
- Format both columns as numbers. Select the two data columns, right-click and choose Format Cells, pick Number or General, and click OK. If you see values lined up on the left edge of the cell instead of the right, Excel is treating them as text; retype them without stray symbols, or use Data > Text to Columns to convert them.
- Select the whole block, headers included. Click the top-left cell and drag to the bottom-right of the data, or click the first cell and press Ctrl+Shift+End. Confirm the orange-highlighted range in the selection covers both columns and does not include empty rows above the header.
- Insert the chart. Go to the Insert tab, find the Charts group and click the chart icon that matches your variable types. Choose Scatter for two numeric variables, Clustered Column for two measures across named categories, or Line if one column is a date or time sequence. On iPhone and Android the Insert tab sits in the ribbon above the sheet; tap it, then Charts.
- Check what Excel picked. Scatter should plot the first column on the X axis and the second on the Y. Column and Line charts place the first column as horizontal labels and the second as the bars or line. If the axes are swapped, click the chart and use Chart Design > Switch Row/Column, or reorder the columns on the sheet.
- Add or fix the series name. If the legend shows something like Series1, click the chart, open Chart Design > Select Data, select the series and set its Name to the header cell of your second column. This is the single most common cosmetic problem.
- Add axis titles. Click the chart, press the plus button at the chart's top-right corner, tick Axis Titles, then click each placeholder and type the variable name. Labeling both axes makes a two-variable chart readable without hunting back to the sheet.
- Tidy the scale if values cluster. Right-click an axis and choose Format Axis, then set the Minimum and Maximum bounds to sensible round numbers instead of starting every scale at zero, especially for scatter plots where all points sit far from the origin.
- Move and size the chart. Drag the chart's border to a clear area, and drag a corner handle to resize. To place it on its own sheet, right-click the chart area and choose Move Chart, then pick New sheet.
- Keep it linked or freeze it. The chart updates automatically when the source cells change. If you need a fixed picture, either copy it and use Paste Special as an image, or leave it linked and note which cells feed it before you edit the sheet later.
Common Mistakes
Using scatter when the first column is text. Scatter plots need numbers on both axes. Labels like January or product names belong in a Column or Line chart, where Excel uses them as category labels.
Selecting only the values. If you highlight just column B, Excel has no second variable to work with and draws a single flat series. Always select both columns.
Leaving the header out of the selection. Including it lets Excel name the series and axes automatically; excluding it produces Series1 and unlabeled axis titles.
Numbers stored as text. A column that looks numeric but aligns left, or has a small green triangle in the corner, will plot as zero. Use the warning icon next to the selected cells and choose Convert to Number.
Extra columns in the selection. Selecting three or four columns by accident adds series you did not want. Delete the extra series in Select Data rather than redoing the whole chart.
Blank cells inside the range. These can break a line chart or shift points onto the wrong category. Delete empty rows or fill the values.
Tips
- Sort the data before charting if you want a Line chart to read in a logical order, for example by date or by ascending X value. Scatter plots sort themselves visually, so order does not matter there.
- Use Ctrl+Shift+End after clicking your top-left data cell to grab the exact used range without dragging past it.
- Convert the range to a table with Ctrl+T. Tables grow automatically when you add rows, and a chart based on the table picks up the new rows too.
- For a relationship question (does one variable go up when the other does?), scatter is the honest choice; a column chart of two separate measures invites false comparisons.
- Add a trendline to a scatter chart via the plus button and Trendline if you want an at-a-glance direction, but do not treat it as proof of cause.
- Choose the leftmost chart style in each group rather than a 3D variant. 3D charts distort the heights readers compare.
Troubleshooting
The chart is completely empty. Almost always the selected cells are text or blank. Select the range, look for a left alignment or green warning triangle, convert the values, and the chart redraws.
Points are crammed against one edge. One axis has a huge range because of an outlier or a text value read as a number. Right-click the axis, open Format Axis and set a manual Minimum and Maximum that covers the real data.
Only one series appears. Re-check the selected range, then open Chart Design > Select Data and add the missing column as a new series with its header as the name.
The chart shows the wrong thing after an edit. Confirm the chart still points at the right cells in Select Data > Edit. Deleting source rows can leave a chart pointing at a stale range; resetting the range fixes it.
Category labels are rotated or cut off. Widen the chart or reduce label font size on the axis format pane, or set the label interval so Excel shows every other label.
A copied chart will not refresh. Pasted images do not follow the data. If you need updates, keep the chart linked and paste a picture only for final reports.
If that did not work, start fresh on a small test: type five number pairs into an empty sheet, select them, and insert a scatter chart. If that works, the problem is in the original data layout, not the chart tool.
Frequently Asked Questions
What chart type works best for two numeric variables?
Scatter (X Y) charts, because each point pairs one value from column A with one from column B. Use Clustered Column when both variables are measures compared across named categories, and Line when one variable is time.
Can I plot two variables on different axes?
Yes. Select the second series, right-click and choose Format Data Series, then plot it on the secondary axis. Use this only when the two variables have very different scales, and label both axes clearly so readers can tell which scale applies.
How do I add a third column such as a label or group?
Keep it out of the initial selection, then use Select Data to add it as a series, or use a scatter chart and add data labels from that column. Do not include an ID or name column in a scatter selection, because Excel will try to plot it as numbers.
Why does my line chart connect points across blanks?
Excel's default handling for empty cells can join or skip them. Open Select Data, choose Hidden and Empty Cells and pick how gaps should be treated, or remove the blank rows so there is nothing to guess.
Does the chart update when I change the data?
Yes, as long as it is a live chart pointing at the cells. Change a value and the plot redraws immediately. Pictures pasted as images do not update.
Can I make a two-variable chart in Excel on my phone?
Yes, basic scatter, column and line charts can be inserted from the Insert tab on the iPhone and Android apps, though the formatting options are fewer than on desktop. Build the data first and use desktop for heavy customization.