How to Add R2 Value in Excel Graph

Cody Schneider8 min read

Trying to figure out how well your data fits a trendline in an Excel chart? You're likely looking for the R-squared value. This surprisingly simple metric is a powerful way to understand the relationship between two variables, and adding it to your graph takes just a few clicks. This tutorial will walk you through exactly what R-squared is, why it matters, and how to display it directly on your Excel graph.

What is R-Squared, Anyway? (And Why Should You Care?)

Before we jump into the "how," let's quickly cover the "what" and "why." In simple terms, R-squared (also known as the coefficient of determination) is a statistical measure that tells you how much of the variation in your dependent variable (the Y-axis) can be explained by your independent variable (the X-axis).

Think of it as a "goodness of fit" score for your data model. It's represented as a value between 0 and 1, where:

  • An R-squared of 0 means the model explains none of the variability of the data around its mean.
  • An R-squared of 1 means the model explains all the variability of the data around its mean.

In practice, you'll rarely see a perfect 0 or 1. If you get an R-squared value of 0.82, it means that 82% of the movements in your Y-axis variable are predictable from the movements in your X-axis variable. The remaining 18% is due to other, unexplained factors.

A Practical Marketing Example

Let's make this more concrete. Imagine you're a marketer tracking monthly ad spend and website traffic. You want to know if spending more money on ads is actually leading to more visitors.

  • Your independent variable (X-axis) is your "Ad Spend." This is the variable you control.
  • Your dependent variable (Y-axis) is your "Website Visits." This is the outcome you hope to influence.

After plotting this data, you add a trendline and find an R-squared value of 0.79. This is a powerful insight! It suggests that 79% of the changes in your website traffic can be directly attributed to how much you're spending on ads. The other 21% might be driven by other factors like organic SEO, social media buzz, seasonality, or competitor activity.

A low R-squared, like 0.15, would tell you that your ad spend isn’t a very good predictor of your website traffic - something else is driving the results.

Creating Your Scatter Plot in Excel

To add an R-squared value, you first need a chart that can display a trendline, and the best chart for this is a scatter plot. A scatter plot is perfect for visualizing the relationship between two different variables.

Here’s how to set one up quickly:

  1. Organize Your Data: Make sure your data is in two columns. For our example, Column A would be "Ad Spend ($)" and Column B would be "Website Visits."
  2. Select Your Data: Click and drag to highlight both columns of data, including the headers.
  3. Insert the Chart:

Excel will instantly generate a scatter plot with your Ad Spend on the X-axis and Website Visits on the Y-axis. Now we have a visual foundation to work from.

How to Add a Trendline and R-Squared Value to Your Excel Graph

With your scatter plot ready, adding the trendline and the R-squared value is straightforward. There are a couple of equally easy ways to do this. We'll cover the most common approach first.

Method 1: Using the 'Chart Elements' Button

This method is quick and works on all modern versions of Excel.

  1. Select Your Chart: Simply click anywhere on your scatter plot to select it. You’ll see a border appear around it.
  2. Open Chart Elements: A small green plus sign (+) icon will appear in the top-right corner of the chart. Click this "Chart Elements" icon to open a menu of available chart components.
  3. Enable the Trendline: In the menu, find Trendline and check the box next to it. Excel will immediately add a standard linear trendline to your chart.
  4. Access More Options: Hover your mouse over Trendline in the menu again. This time, click the small black arrow that appears to the right. In the sub-menu that opens, click More Options....
  5. Display the R-Squared Value: A "Format Trendline" pane will slide out on the right side of your screen. Scroll all the way to the bottom of the options in this pane. You will see two checkboxes: "Display Equation on chart" and "Display R-squared value on chart." Check the box for Display R-squared value on chart. Many analysts also check the equation box to see the underlying formula.

Instantly, a small text box with your R² value will appear on your chart. You can click on this text box and drag it around to a better position so it doesn't overlap with your data points or trendline.

Method 2: The Right-Click Method

If you're a fan of right-click menus or working on an older version of Excel, this method is for you.

  1. Select the Data Points: Click directly on any one of the data points in your scatter plot. This will select the entire data series (all the dots should be highlighted).
  2. Right-Click to Open the Menu: Now, right-click on any of the selected data points. A context menu will appear.
  3. Add Trendline: Find and click Add Trendline... from the menu.
  4. Display the R-squared Value: This action will immediately open the same "Format Trendline" pane we saw in the first method. Just like before, scroll to the bottom and check the box for Display R-squared value on chart.

Both methods achieve the same goal in just a few clicks. Use whichever workflow feels most natural to you.

Interpreting Your R-Squared Value: Caution and Context

Seeing that R² = 0.79 on your chart is great, but what should you do with that information? Here are a couple of things to keep in mind.

First, an important reminder: correlation does not equal causation. A high R-squared shows a strong relationship, but it doesn’t automatically prove that changes in your X variable cause the changes in your Y variable. While it stands to reason that ad spend drives traffic in our example, there could be other scenarios where a hidden third factor influences both variables. Always apply critical thinking to your data models.

Second, what counts as a "good" R-squared value is highly dependent on your field.

  • In tightly controlled fields like physics or chemistry, researchers might expect R-squared values of 0.95 or higher to consider a model valid.
  • In more unpredictable fields like marketing or social sciences, where human behavior is a core factor, an R-squared of 0.60 or even 0.50 can be considered very strong and insightful.

The key is to use R-squared as a diagnostic tool. It helps you understand how much confidence you can have in the relationship shown by your trendline.

Bonus: Calculating R-Squared with an Excel Formula

What if you want the R-squared value for a report but don't need the chart? You can calculate it directly in a cell using Excel's RSQ function. This is incredibly useful for summaries, dashboards, or when you need to use the R-squared value in another calculation.

The syntax is simple:

`=RSQ(known_y's, known_x's)`

Using our example data:

  • known_y's would be the range containing your "Website Visits" data (e.g., B2:B13).
  • known_x's would be the range containing your "Ad Spend" data (e.g., A2:A13).

In any empty cell, just type:

`=RSQ(B2:B13, A2:A13)`

Press Enter, and Excel will calculate and display 0.79, the same value shown on your chart.

Final Thoughts

In this post, we covered what R-squared means, how to quickly add it to any Excel scatter plot using a few simple clicks, and how to interpret the value to get real insights from your data. Whether you display it on a chart or calculate it with the RSQ formula, it’s an essential tool for understanding the strength of the relationships in your analysis.

Manually preparing data and creating these charts in Excel is useful, but it can become tedious when you're managing multiple data sources across platforms. That’s what we designed Graphed to help with. We connect directly to your marketing and sales sources like Google Analytics, Shopify, and Facebook Ads, so you can stop wrestling with CSV files. You can just ask a question in plain English - like "show the relationship between advertising cost and revenue this year" - and instantly receive a live, interactive visualization, R-squared and all, in seconds. It saves you the manual work, so you can spend your time acting on insights, not just finding them.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.