To make a chart in Excel with numeric X and Y axes, put the X values in one column and the matching Y values in the next, select both columns, then choose Insert > Insert Scatter (X, Y) or Bubble Chart and pick a scatter chart. This creates an XY chart that plots each row as a coordinate pair, which is useful for showing relationships, measurements, and trends between two numeric variables.
What You’ll Need
- Excel for Microsoft 365 on Windows, or a version of Excel with scatter charts.
- Two columns of paired data: one for X values and one for Y values. Each row must contain values that belong together.
- Optional column headings, such as Time and Temperature, to help identify the chart series.
Use a scatter chart when the horizontal axis represents numeric values, such as dates, distance, or quantity. A line chart can look similar, but it usually spaces category labels evenly, even when their numeric values are not evenly spaced.
Step-by-Step
- Arrange the data in two columns. Put the values for the horizontal axis in the first column and the values for the vertical axis in the second. For example, enter Distance in A1 and Time in B1, then put each distance and its corresponding time on the same row below. Keep the headings in the first row, and do not leave blank rows inside the data. Excel will use each row as one X-Y pair.
- Check that the values are usable as numbers. Select the data cells and look for values stored as text. Numbers aligned to the left unexpectedly, or cells with green error indicators, may be text rather than numeric values. Correct them before charting. If the X values are dates, use actual Excel dates rather than typed labels such as Monday or Week 1; Excel stores dates as numbers and can plot them on a value axis.
- Select the data range. Drag across both columns, including their headings. For example, if the headings are in row 1 and there are 12 observations, select A1:B13. If the columns are not next to each other, select the first range, then hold Ctrl on Windows while selecting the second range. For nonadjacent selections, confirm the chart series afterward because Excel may interpret the ranges differently than expected.
- Insert a scatter chart. On the ribbon, select Insert > Insert Scatter (X, Y) or Bubble Chart in the Charts group. Choose the first scatter option, which displays markers without connecting lines, for a basic X-Y plot. Choose a scatter option with straight lines or smooth lines if the order of the points and the connecting path are meaningful. Avoid selecting a regular Line chart when the X values are numeric measurements that need proportional spacing.
- Confirm which column is on each axis. Excel normally treats the first selected numeric column as X and the second as Y. Check the chart before adding labels: the horizontal axis should show your X values and the vertical axis should show your Y values. If the axes are reversed or the chart is missing points, right-click the chart and choose Select Data. Select the series and click Edit, then set Series X values to the cells containing the X data and Series Y values to the matching Y data. Exclude the heading cells from these value ranges.
- Add a useful chart title. Select the chart, then choose Chart Design > Add Chart Element > Chart Title > Above Chart. Click the title box and type a short description, such as Travel Time by Distance. A title should describe the relationship or measurement, not merely say Scatter Chart. You can also click the title box and use the formula bar to link it to a worksheet cell if you want the title to update when that cell changes.
- Label the X and Y axes. With the chart selected, choose Chart Design > Add Chart Element > Axis Titles, then add the Primary Horizontal and Primary Vertical titles. Click each placeholder and enter the variable name and unit, for example Distance (km) and Time (seconds). Axis titles make the chart understandable when someone sees it outside the worksheet or without the original data table.
- Adjust the axes and chart layout. Right-click an axis and choose Format Axis to open its settings. You can set minimum and maximum bounds, adjust the major unit, or change number formatting. For instance, a fixed minimum of zero may help when zero is a meaningful baseline; it is not always appropriate when the data cover only a narrow range. Drag the chart by its border to reposition it, and drag a corner handle to resize it without distorting the plotted data.
- Review the finished chart. Compare several plotted points with their source rows. Confirm that the X and Y values correspond, that the axis scales are sensible, and that labels are readable. If there are many observations, markers may overlap; make the chart larger or use smaller markers. Save the workbook after checking the chart and its underlying data.
For more than one data series, keep each series’ X and Y pairs in separate columns or ranges. Use Select Data > Add to create each additional series, and edit its name, X values, and Y values individually. Each series can have its own X range, but its X and Y ranges must contain the same number of corresponding observations.
Common Mistakes
- Choosing a line chart instead of a scatter chart. A line chart often treats horizontal values as equally spaced categories. If X values are 1, 2, and 20, it may space the three labels evenly rather than showing the large gap between 2 and 20. Choose a scatter chart when the distance between numeric X values matters.
- Reversing the X and Y data. Selecting columns in an unexpected order, or editing the wrong series range, can put the intended horizontal variable on the vertical axis. Check Select Data and verify the X values and Y values boxes.
- Including headings or extra cells in a series range. A heading included as a data point can cause a warning or an incorrect plot. Use the same number of data cells in both series ranges and leave out the column names.
- Using text that looks like a number. An apostrophe before a number, inconsistent decimal separators, or imported text can prevent Excel from plotting values correctly. Convert the cells to numbers before inserting the chart.
- Connecting points when order is not meaningful. Lines connect points in the order of the worksheet data, not necessarily in ascending X order. If you want a connected curve, sort paired rows by X value first; otherwise, markers alone may represent the data more honestly.
Tips
- Keep each observation on one row. Sorting or filtering the table then keeps its X and Y values together.
- Use descriptive axis titles and include units. A label such as Pressure (kPa) is more informative than Pressure.
- Do not force an axis to start at zero automatically. Use bounds that show the data clearly while preserving the context needed to interpret differences.
- For a chart that should grow when new rows are added, convert the source range to an Excel table by selecting it and choosing Insert > Table. Check that the table has headers. Charts based on table data generally include added rows, though you should verify the chart after extending the table.
- To change the chart type later, select the chart and choose Chart Design > Change Chart Type. You can switch between markers, straight lines, and smooth lines without rebuilding the data.
- On Excel for Mac, the same scatter-chart approach applies, but ribbon labels and dialog placement can vary slightly. In Excel for the web, use Insert and choose the scatter chart option; some formatting controls may be more limited than in the Windows desktop app.
Troubleshooting
The chart shows one point or no useful data. Right-click the chart and choose Select Data. Edit the series and confirm that the X and Y ranges point to the intended numeric cells, exclude headings, and have matching lengths. If the ranges are correct, check whether the values are stored as text.
The horizontal axis shows 1, 2, 3 instead of my X values. Excel may have inserted a different chart type or left the series X values unset. Change the chart to a scatter chart with Chart Design > Change Chart Type, then use Select Data > Edit to assign the X range explicitly.
The points are all bunched together. Right-click the relevant axis and choose Format Axis. Check for an unusually large outlier that is stretching the scale, and inspect the minimum and maximum bounds. You can change the bounds for clarity, but avoid hiding important values or implying that the data fall outside the displayed range.
The axis labels or titles are missing. Select the chart and add them through Chart Design > Add Chart Element. If the axis title placeholder is present but hard to see, click it and type the label. If the chart is too small, enlarge it or shorten the title text.
The chart changes unexpectedly after sorting. Make sure each X value stays on the same row as its matching Y value. Select the entire data table before sorting, rather than sorting just one column. If you use connected markers, sort the complete paired data by X when the line should follow increasing X values.
Frequently Asked Questions
What chart type should I use for X and Y values in Excel?
Use a scatter (X, Y) chart when both axes represent numeric values and the spacing between X values matters. Use a line chart when the horizontal axis is a sequence of categories and equal spacing is intended.
How do I switch the X and Y axes?
Right-click the chart, choose Select Data, select the series, and click Edit. Swap the cell ranges in Series X values and Series Y values. The chart will replot the points using the new assignments.
Can I make an X-Y chart with dates on the X axis?
Yes. Enter real Excel dates in the X column and insert a scatter chart. If the labels appear as serial numbers, right-click the horizontal axis, choose Format Axis, and change its number format to a date format.
How do I add a second line or group of points?
Select the chart, choose Chart Design > Select Data, and click Add. Enter a series name and the X and Y cell ranges for that group. Make sure the two ranges contain the same number of paired observations.
Why is a scatter chart better than a line chart for measurements?
A scatter chart positions points according to their numeric X values, so unequal gaps remain unequal. A line chart usually spaces categories evenly, which can misrepresent measured intervals when the values are irregular.
Related
- How to Make Every Other Row a Color in Excel (2 Ways)
- Automatic Borders in Excel: How to Apply Them as You Type
- How to Make Cell Borders White in Microsoft Excel 365
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Google Sheets Charts and Graphs: How to Create and ChooseGoogle Sheets charts and graphs turn spreadsheet data into visuals such as column, line, pie, and scatter charts.…
- Excel Copy Pivot Chart: Change Its Data Source Safely?Copying a PivotChart in Excel does not normally give the copy an independent data source: the copied chart…
- Excel Chart With Two Y-Axes: How to Make OneTo make an Excel chart with two different y-axis values, select the chart, choose Chart Design > Change…
- Excel Pivot Chart: How to Change the Data Source SafelyTo change an Excel PivotChart’s data source, select its associated PivotTable, choose PivotTable Analyze > Change Data Source,…
- Box Plot in Excel: Show Outliers and Read the ChartYes. In Excel for Microsoft 365 on Windows, select your data, choose Insert > Insert Statistic Chart >…
- How to Make a Percentage Chart in Excel (With Labels)To make a percentage chart in Excel, select your category labels and percentage values, then choose a chart…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.