To make an XY chart in Excel, put your 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 style. An XY scatter chart plots each row as a coordinate pair, so it is useful for showing how two numeric measurements relate. Before you begin, check that each X value is paired with the correct Y value.
What You’ll Need
- A workbook in Microsoft Excel for Microsoft 365 on Windows. The steps are similar in current desktop versions of Excel.
- Two columns of paired data: one for X values and one for Y values. Include clear column headings, such as Distance and Time.
- Numeric values in both columns. Excel can plot dates as X values, but text labels such as product names are not numeric measurements for an XY axis.
Step-by-Step
- Arrange the data in pairs. Put each X measurement in one column and the corresponding Y measurement in the adjacent column. Add a descriptive heading to the top of each column. For example, enter Distance in A1 and Temperature in B1, then put each distance and its measured temperature on the same row below. Keep each observation together: if A2 is the distance for a reading, B2 must be its temperature. Remove empty rows within the data if possible, and check that values are stored as numbers rather than text.
- Select the headings and values. Drag across both columns, including the headings, such as A1:B11. Including headings helps Excel use them as the series name and axis context. If the columns are not next to each other, select the first data range, then hold Ctrl on Windows while selecting the other range. On Mac, hold Command while selecting the second range. When nonadjacent selection does not produce the intended chart, create a blank scatter chart and add each range as a series in the next steps.
- Insert a scatter chart. On the ribbon, select Insert > Insert Scatter (X, Y) or Bubble Chart. In the chart gallery, choose the plain Scatter option, usually shown as points without connecting lines. Excel inserts a chart using the selected values. Avoid choosing a Line chart: line charts treat the horizontal axis as categories, while an XY chart uses the actual numeric spacing between X values. If the chart appears empty or uses the wrong data, continue to Select Data and set the ranges explicitly.
- Confirm which values are on each axis. Click the chart, then select Chart Design > Select Data. In the Legend Entries (Series) list, select the series and click Edit. In the Edit Series dialog, set Series name to the heading cell or type a name, set Series X values to the X-value cells, and set Series Y values to the Y-value cells. For example, if headings are in row 1 and observations are in rows 2 through 11, the ranges should be A2:A11 for X and B2:B11 for Y. Do not include the headings in either values range. Click OK, then OK again.
- Choose a more suitable scatter style if needed. With the chart selected, open Chart Design > Change Chart Type, then select XY (Scatter). Choose among scatter with only markers, smooth lines, straight lines, or lines with markers. Use markers only when you want to show individual observations without implying an order. Use lines when the observations form a meaningful sequence, such as measurements taken over time. Smooth lines can suggest values between observations that were not measured, so use them only when that implication makes sense.
- Add a chart title and axis titles. Select the chart, then use Chart Design > Add Chart Element. Choose Chart Title and a position, then select the title box and type a specific description. To label both axes, choose Axis Titles and add primary horizontal and primary vertical titles. Replace the placeholders with the measurement and unit, such as Distance (m) and Temperature (°C). A clear title and units help readers understand the plot without having to inspect the source table.
- Adjust the axes and number formats. Click an axis, right-click it, and choose Format Axis. In the Format Axis pane, review the minimum and maximum bounds, major units, number format, and (for the vertical axis) the point where the horizontal axis crosses. Excel chooses bounds automatically, which is often a good starting point. Set a bound manually only when a particular scale is needed; remember that a nonzero minimum can visually exaggerate differences. If values display with too many decimal places, use the Number options in the pane to select a suitable format.
- Check the finished chart and save the workbook. Compare several plotted points with their rows in the table. Confirm that X values run along the horizontal axis, Y values run vertically, and the chart includes the intended observations. Resize the chart by dragging a corner handle, and move it by dragging its border. Save the workbook with Ctrl+S on Windows or Command+S on Mac. If your chart will be shared, make sure the source data and the chart remain in the workbook.
On Excel for Mac, the scatter-chart command is also on the Insert tab, though the gallery layout may differ. Chart Design and Format tabs appear when the chart is selected. Excel for the web offers scatter charts as well, but some detailed formatting controls may differ from the Windows desktop app; open the workbook in desktop Excel if a control described above is not available.
Common Mistakes
- Choosing a Line chart instead of a Scatter chart. A Line chart spaces its category labels evenly, even when the X values are unevenly spaced. For a numeric horizontal scale, insert an XY scatter chart.
- Reversing the X and Y ranges. Excel may guess incorrectly, especially when the selection includes extra columns or rows. Use Chart Design > Select Data > Edit and confirm the X and Y ranges separately.
- Including headings as plotted values. If a text heading is included in a series range, Excel may ignore it or interpret the series unexpectedly. Use the heading for the series name, and select only the numeric observations for X and Y.
- Mixing up paired rows. Sorting just one column breaks the relationship between the coordinates. Select the entire table before sorting so each X value stays with its matching Y value.
- Expecting text categories to work as numeric X coordinates. An XY chart needs numeric horizontal values. For names or categories, use a Line or Column chart, or convert the categories into meaningful numeric codes if a numeric scale is appropriate.
Tips
- Use column headings that identify both the measurement and its unit. This makes it easier to select the correct ranges and label the axes accurately.
- For a trend with several observations, start with markers only. Add connecting lines only if the order of observations carries meaning; for instance, a time series can be connected in time order.
- To compare multiple groups, give each group its own X and Y ranges. In Chart Design > Select Data, use Add to create a series, then set that series’ name, X values, and Y values. Keep each group on the same axis scale when comparing their positions.
- Leave axis bounds on automatic until you understand the data range. If you set fixed bounds for comparison charts, use the same bounds on each chart and note the units.
- Keep a copy of the original data before removing outliers or changing values. A point far from the others may be a valid observation, a data-entry error, or a different kind of case; check its source before deciding what to do.
Troubleshooting
The chart is blank or has only one point. Check that both series ranges contain the same number of numeric cells and that the values are not stored as text. Select a cell that looks numeric and inspect the formula bar; imported values may contain leading apostrophes or spaces. You can correct the source values, then update or reset the series ranges through Chart Design > Select Data > Edit.
The horizontal axis shows 1, 2, 3 instead of my X measurements. The chart may be using a Line chart, or the X values were not assigned to the series. Change the chart type to XY (Scatter), then edit the series and set its X values to the numeric X range. Check that the selected range excludes the heading and matches the Y range in length.
The data points are in the wrong places. Verify that the X and Y references have not been swapped and that every pair comes from the same row. Also check for accidental sorting, blank cells, or inconsistent units—for example, some distances entered in metres and others in centimetres. Correct the source table or series references, then review the plot again.
Some values disappear or bunch together. In the Format Axis pane, inspect the minimum and maximum bounds and confirm they include the data. If the chart uses a logarithmic scale, zero and negative values cannot be displayed on that scale. Turn off the logarithmic option if it is unsuitable, or correct the underlying values if they are errors. Also check whether a large outlier is stretching the scale and making the other points look compressed.
I cannot find a formatting option. Select the chart or the specific axis first; contextual chart tabs and the Format Axis pane appear only for the selected object. In the web app, switch to desktop Excel for controls that are unavailable there. If the chart is selected but the pane is closed, right-click the axis and choose Format Axis.
Frequently Asked Questions
What is an XY chart in Excel?
An XY chart, also called an XY scatter chart, plots paired numeric values as points. Each row provides one horizontal X coordinate and one vertical Y coordinate. The horizontal axis reflects the actual numerical values, including differences in spacing.
What is the difference between a scatter chart and a line chart?
A scatter chart uses numeric values on both axes and positions points according to their values. A Line chart uses a category axis, so its labels are spaced evenly. Choose Scatter when the numerical spacing of X values matters.
Can I make an XY chart with more than one data series?
Yes. Add a separate series for each group using Chart Design > Select Data > Add. Assign that group its own X and Y ranges, and give it a clear series name. The X and Y ranges for each series must contain matching numbers of observations.
Can the X values be dates?
Yes. Excel stores dates as serial numbers, so dates can be used as numeric X values in a scatter chart. Format the horizontal axis to display dates if Excel shows serial numbers, and check that the source cells contain real Excel dates rather than text that only looks like a date.
How do I show a trendline on an XY chart?
Select a data point in the series, then choose Chart Design > Add Chart Element > Trendline and select a suitable type. A trendline summarizes a pattern; it does not replace the plotted observations. Choose a type that suits the data rather than assuming a linear relationship.
Related
- Import Excel into a SharePoint List: Step-by-Step
- How to Highlight a Row in Excel with a Keyboard Shortcut
- How to Import an Excel Document Into Microsoft Word
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Power Pivot SUM Function: Syntax, Examples, and TipsIn Power Pivot, the DAX SUM function adds the numeric values in one column, returning a total that…
- Line Chart in Excel: Definition and How It WorksA line chart in Excel displays data as points connected by straight lines, making changes and trends across…
- Excel Pivot Table Variance Between Columns: How to CalculateTo show a variance between column items in an Excel PivotTable, right-click a value, choose Show Values As…
- Excel Pivot Table: How to Expand All GroupsTo expand a PivotTable field across all its items in Excel for Microsoft 365 on Windows, right-click an…
- Google Sheets: How to Move a Chart to Its Own SheetTo move a chart in Google Sheets to a new sheet, select the chart, click its three-dot More…
- P Chart in Excel: Build Control Limits and Read ResultsTo make a p chart in Excel, calculate each subgroup’s fraction nonconforming, find the overall fraction and three-sigma…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.