How to Make an X Y Graph in Excel

Cody Schneider

Trying to see how two different sets of numbers are related is a fundamental part of data analysis. Whether it's ad spend and website traffic or study hours and exam scores, a well-built X-Y graph, also known as a scatter plot, is the best tool for the job. This article guides you step-by-step through creating, customizing, and interpreting a professional-looking X-Y graph right within Microsoft Excel.

What is an X-Y Graph (and When Should You Use One)?

An X-Y graph, or scatter plot, is a chart that plots pairs of numerical data, with one variable on the horizontal axis (the "X" axis) and the other on the vertical axis (the "Y" axis). Each data point on the chart represents a single observation where the two variables intersect, giving you a clear visual on their relationship, or correlation.

Unlike a line graph that connects individual data points to show a trend over time, a scatter plot shows how one variable might be affecting another. This makes it incredibly useful for testing hypotheses and uncovering patterns in your data.

Key Components of an X-Y Scatter Graph

Every X-Y graph has a few core components that you need to understand to set up your data correctly:

  • X-Axis (Independent Variable): This is the variable that you believe causes a change in the other variable. It's the factor you manipulate or observe to see what effect it has. For example, if you're analyzing advertising effectiveness, your ad spend would be the independent variable. It's plotted on the horizontal axis.

  • Y-Axis (Dependent Variable): This is the variable that you measure to see if it's affected by changes in the X-axis variable. Its value depends on the independent variable. In our advertising example, the number of sales or website clicks would be the dependent variable. It's plotted on the vertical axis.

  • Data Points: Each dot on the chart represents a single, paired measurement of your X and Y variables. For example, a point might represent a day where you spent $150 on ads (X) and received 500 clicks (Y).

Common Use Cases for X-Y Graphs

You can use X-Y graphs to spot relationships in almost any area of business, science, or academics. They’re perfect for answering questions like:

  • Marketing Analysis: Does increasing our social media ad budget (X) lead to more conversions (Y)?

  • Sales Performance: Is there a relationship between the number of sales calls a rep makes (X) and the total revenue they close (Y)?

  • Operations: Does manufacturing a product at a higher temperature (X) reduce the number of product defects (Y)?

  • E-commerce: Do higher customer satisfaction scores (X) correlate with repeat purchase rates (Y)?

How to Create an X-Y Scatter Graph in Excel: A Step-by-Step Guide

Let's create an X-Y graph from scratch. For this example, we'll use a simple dataset to determine if there's a relationship between daily ad spend and the number of website clicks.

Step 1: Set Up Your Data

The most important step is organizing your data correctly. Excel needs two columns of numerical data side-by-side. Make a rule for yourself: the independent variable (X) should always be in the left column, and the dependent variable (Y) should always be in the right column.

For our example, Daily Ad Spend ($) is the independent variable (X), as we believe it influences the Website Clicks (Y). So, your data should look like this in your spreadsheet:

Step 2: Select Your Data

Click on the header of your first column (in this case, Daily Ad Spend ($)) and drag your cursor to highlight all the data in both columns, including the headers. Making sure to include headers helps Excel automatically label your graph later on, saving you a step.

Step 3: Insert the Scatter Chart

With your data highlighted, navigate to the Insert tab on the Excel ribbon at the top of your screen. Look for the 'Charts' group. In this group, click on the small icon that looks like a few scattered dots. This is the Insert Scatter (X, Y) or Bubble Chart menu.

A dropdown will appear showing different chart types. The first option, simply named Scatter, is the classic X-Y graph and the one you'll want to use most of the time. Click it.

Step 4: Your Basic Graph Appears

Instantly, Excel will generate and drop a basic scatter plot onto your worksheet. It will plot your first column (Daily Ad Spend) on the horizontal X-axis and your second column (Website Clicks) on the vertical Y-axis. The initial chart is functional, but it’s not yet clear or professional. Now we need to polish it up.

Customizing Your X-Y Graph for Maximum Impact

A graph without proper labels is just a picture of dots. To turn it into a valuable analytical tool, you need to add context. When your chart is selected, you'll see a green plus sign ('+') appear on the upper right side. Clicking this gives you access to the 'Chart Elements' menu, which is the easiest way to add essential components.

Adding Essential Chart Elements

  • Chart Title: Your chart will likely have a generic title like "Website Clicks." Double-click it and change it to something descriptive that explains what the chart shows. For example, "Relationship Between Daily Ad Spend and Website Clicks."

  • Axis Titles: This is arguably the most critical element for an X-Y graph. In the 'Chart Elements' menu, check the box for Axis Titles. This will add placeholder text boxes to both the X and Y axes. Click on them to label them accurately, including units. For our example, the X-axis should be "Daily Ad Spend ($)" and the Y-axis should be "Website Clicks." Without these, nobody can understand what the chart is measuring.

  • Gridlines: Gridlines are the horizontal and vertical lines in the plot area that help the eye trace from a data point to its value on the axis. You can use the 'Chart Elements' menu to add, remove, or format them. Softer grey lines are usually sufficient - you don’t want them to overpower your data points.

Adding a Trendline to See the Correlation

The real power of a scatter plot comes from a trendline (or 'line of best fit'). This is a single line that best represents the overall direction of your data points, making the correlation easier to see.

In the 'Chart Elements' ('+') menu, hover over Trendline and click the small arrow that appears. Choose Linear for a straight-line trend. Immediately, Excel will draw a line through your data that illustrates the prevailing trend.

Pro Tip: To get more analytical power, double-click on the trendline to open the "Format Trendline" pane on the right side of Excel. Here, scroll down and check the boxes for Display Equation on chart and Display R-squared value on chart. The R-squared value is a number between 0 and 1 that tells you how well your data fits the line - a value of 0.85 means your model explains 85% of the variability, which is a very strong correlation.

Improving Design and Formatting

With your chart selected, two new tabs will appear on the ribbon: Chart Design and Format. Use these to polish the aesthetics:

  • The Chart Design tab lets you quickly change the chart style, switch up color palettes, and even change the chart type.

  • The Format tab gives you granular control over the colors, borders, and effects of individual elements like the data points, text, and the plot area itself.

How to Read Your Finished X-Y Graph

Now that you have a beautifully formatted chart, the final step is to interpret what it's telling you.

Identify the Correlation Type

Look at the general direction of your data points and the trendline you added.

  • Positive Correlation: The points move upwards from left to right. This means that as your X variable increases, your Y variable also tends to increase. In our example, more ad spend leads to more clicks. This is a positive correlation.

  • Negative Correlation: The points move downwards from left to right. This means as your X variable increases, your Y variable tends to decrease. An example might be Hours Spent Playing Video Games (X) vs. Overall GPA (Y).

  • No Correlation: The points are scattered everywhere like random confetti, with no clear upward or downward direction. This indicates that the two variables are not related. An example would be Shoe Size (X) vs. Final Exam Score (Y).

Watch Out for Outliers

An outlier is a data point that sits far away from the main cluster of dots. They can dramatically skew your trendline and give a misleading sense of the relationship. When you see one, it’s worth investigating. Was it a simple data entry mistake? Or did something unique happen on that day, like a marketing campaign going viral? Understanding your outliers is just as important as understanding the trend.

Final Thoughts

Creating an X-Y graph in Excel is a straightforward process that turns two columns of numbers into a powerful visual story about their relationship. By setting up your data correctly, inserting a scatter chart, and customizing it with titles and a trendline, you can quickly unlock meaningful insights hiding in your spreadsheet.

While an Excel chart is great for a one-off analysis, we know the pain of manually pulling data from different sales and marketing tools and re-creating the same reports week after week. At Graphed we automate all of that. You can connect your data sources like Google Analytics, Shopify, or HubSpot in just a few clicks. Then, simply ask for what you need in plain English - like "show me a graph of Facebook Ads spend versus Shopify sales this quarter" - and get an interactive, live dashboard created for you in seconds. It saves countless hours and lets your whole team focus on making decisions, not on building reports.