How to Show Equation on Google Sheets Graph
Seeing the equation behind your trendline in Google Sheets can turn a simple chart into a powerful predictive tool. It quantifies the relationship between your data points, allowing you to make forecasts and deeply understand the trends you're seeing. This article will guide you through the exact steps to add an equation to any graph, explain what the different parts of that equation actually mean, and show you how to choose the right model for your data.
Why Does the Trendline Equation Matter?
Displaying a trendline is useful, but revealing its underlying equation provides a whole new level of insight. It’s the difference between seeing a hill and knowing its exact steepness. This simple line of text transforms your chart from a static picture into an interactive model that helps you answer critical business questions.
Here are a few reasons why you’d want to show the equation on your graph:
- Make Projections (Forecasting): The primary benefit is forecasting. An equation lets you plug in future values to predict potential outcomes. If you have an equation for website user growth, you can predict how many users you might have in three months. If you know the formula linking ad spend to sales, you can estimate the revenue from an increased budget.
- Quantify Relationships: It clearly defines the mathematical relationship between two variables. Instead of just saying, "When we spend more on ads, sales go up," you can say, "For every additional $1 we spend on ads, our revenue increases by $2.50." This is a precise, actionable insight.
- Model Your Data: Sometimes your data is messy. A trendline and its equation provide a simplified "line of best fit" that smooths out the noise and represents the central tendency of your data, making it easier to see and describe the overall pattern.
How to Show the Equation on a Google Sheets Graph
Getting the trendline equation to appear on your chart involves just a few clicks. Let's walk through it with a practical example. Imagine we're tracking clicks to our website over the last six months.
Step 1: Set Up Your Data
First, you need at least two columns of data: an independent variable (the X-axis) and a dependent variable (the Y-axis). The independent variable is what you control or what changes predictably (like time), and the dependent variable is what you measure.
In our example, "Month #" is our X-axis and "Website Clicks" is our Y-axis.
Your data should be organized like this:
Month # | Website Clicks 1 | 2,100 2 | 2,750 3 | 3,100 4 | 3,900 5 | 4,250 6 | 4,800
Step 2: Create Your Chart
With your data ready, highlight the entire data set (including the headers). Then, go to the menu and click Insert > Chart. Google Sheets will automatically generate a chart for you. For analyzing trends between two variables, a Scatter chart is usually the best choice, but this also works well with Line charts and Bar charts.
If Google Sheets defaults to another chart type, you can change it in the Chart editor pane that appears on the right. Under the Setup tab, find the Chart type dropdown and select Scatter chart.
Step 3: Add a Trendline to Your Chart
Now it's time to add the trendline. Double-click on the chart itself to bring up the Chart editor if it isn't already open. From there, follow these steps:
- Navigate to the Customize tab.
- Click to expand the Series section.
- Scroll down and check the box labeled Trendline.
You'll immediately see a straight line drawn through your data points on the chart.
Step 4: Display the Trendline Equation
This is the final and most important step. In the same Series options, right below the Trendline checkbox, you'll find a dropdown menu for Label. By default, it's set to None.
Click on the dropdown and select Use Equation from the list. Instantly, the mathematical equation for your new trendline will appear directly on your chart.
For some extra analytic power, you can also check the box right below it for Show R². The R-squared value tells you how well your line fits the data points (a value of 1 is a perfect fit, and anything above 0.8 is generally considered a strong fit).
Anatomy of the Equation: Understanding what Y = mX + b Means
Okay, you have an equation like y = 520x + 1673.3 on your chart. What do you do with it? Let's break down the classic linear equation format to make it useful.
A linear equation is typically shown as y = mx + b.
- y is the dependent variable - the value you want to predict. In our example, it's "Website Clicks."
- x is the independent variable - the input value you have. In our case, it's the "Month #."
- m is the slope of the line. This is the most important part for understanding the trend. It tells you the rate of change. For every one-unit increase in x, y will increase by the value of m. In our example (m = 520), it means that for each passing month, we can expect to gain approximately 520 website clicks.
- b is the y-intercept. This is the starting point - the theoretical value of y when x is zero. In our example (b = 1673.3), it represents the baseline number of clicks at "Month 0."
Using the Equation for Forecasting
Let's use our equation (y = 520x + 1673.3) to predict website clicks for Month 10:
- Replace x with the value you want to predict for: 10.
- Calculate the multiplication:
520 * 10 = 5200. - Add the y-intercept:
5200 + 1673.3 = 6873.3.
Based on our historical data, we can forecast that we will receive approximately 6,873 clicks in Month 10.
Bonus Tip: Calculate Trendline Formulas Directly in Cells
While showing the equation on the chart is visually helpful, you can also calculate its components directly in your spreadsheet cells. This is great for building financial models or forecast dashboards.
Use these two functions:
- To find the slope (m):
=SLOPE(range_of_y_values, range_of_x_values) - To find the y-intercept (b):
=INTERCEPT(range_of_y_values, range_of_x_values)
For our example, you would use =SLOPE(B2:B7, A2:A7) to get 520 in a cell, and =INTERCEPT(B2:B7, A2:A7) to get 1673.3 in another. This allows you to build forecasting models without ever needing to look at the chart.
Beyond a Straight Line: Other Trendline Types
Not all data follows a perfectly straight line. Sometimes a brand's growth accelerates rapidly, or sales level off after an initial surge. Google Sheets provides several trendline types to model these different scenarios. You can find them under Customize > Series > Type.
- Linear: The default and most common type. Use this for data that increases or decreases at a relatively steady rate.
- Exponential: Use for data where the growth rate is proportional to the current value. Think of viral content or compound interest - trends that get faster and faster over time. The trendline will be a curve that gets progressively steeper.
- Polynomial: This creates a more complex curved line that can have peaks and valleys. It's useful for modeling data with natural fluctuations, such as seasonal sales cycles, but be careful not to overcomplicate it. The equation gets much more complex.
- Logarithmic: The opposite of exponential. Use this for data that grows quickly at first but then levels off over time, approaching a plateau. Think of an app's user base in a new, but limited, market.
- Moving Average: This type doesn't have an equation. It's used to smooth out volatile data by plotting the average of data points over a specific period, making it easier to identify the general direction of a trend.
Look at the shape of your data points and pick the trendline type that seems to follow the visual pattern. The R² value can be your guide here, the type with an R² value closest to 1.0 is the best mathematical fit for your data.
Final Thoughts
Adding an equation to a trendline in Google Sheets elevates your chart from a simple picture to a functional forecasting tool. By moving beyond a visual line and uncovering the y = mx + b formula behind it, you gain the ability to quantify your data's relationships and make smarter, data-driven predictions about the future.
This process of connecting different data sets to find answers is a core part of business intelligence. And while doing it in a spreadsheet is powerful, it often means pulling data manually from a dozen different sources. We created Graphed to remove that friction. By connecting your Google Analytics, Shopify, Facebook Ads, and other tools, you can simply ask questions in plain English - like "show me a trendline and forecast for user signups this quarter” - and get an interactive, real-time dashboard built for you in seconds.
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.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?