How to Add Trendline in Google Sheets
Adding a trendline to your Google Sheets chart can instantly reveal the direction and momentum hidden in your data. It transforms a simple set of data points into a clear story about growth, decline, or stability. This article will show you two clear methods for adding trendlines in Google Sheets - the simple, built-in chart editor method and the more advanced formula-based approach for custom analysis.
What is a Trendline and Why is it Useful?
A trendline is a line drawn over a chart that shows the overall direction of the data points. Instead of focusing on the individual ups and downs of each data point, the trendline smooths them out to provide a single, easy-to-understand visual of the general pattern over time. Think of it as the "big picture" summary of your data.
Trendlines are incredibly useful for a few key reasons:
- Spotting Patterns: Are your monthly sales numbers generally going up, even with a few slow weeks? Is website traffic declining over the quarter despite a recent spike? A trendline makes these long-term patterns immediately obvious.
- Forecasting: By extending a trendline into the future, you can make an educated guess about where your data is headed. This is great for setting future goals or anticipating challenges.
- Performance Analysis: Marketers can plot ad spend against conversions to see if their efficiency is trending upward. Operations managers can track daily output to see if process improvements are having a positive impact.
In essence, a trendline helps you move from just looking at data to actually understanding it.
Method 1: Add a Trendline with the Chart Editor
This is the fastest and most common way to add a trendline in Google Sheets. It takes just a few clicks and is perfect for quick analysis and creating visual reports.
Step 1: Organize Your Data
Before you create a chart, make sure your data is set up in two columns. The first column should be your independent variable (often a unit of time, like date, month, or week), and the second column should be your dependent variable (the metric you're measuring, like sales, users, or revenue).
For example, you could have:
- Column A: Month (Jan, Feb, Mar, etc.)
- Column B: Revenue ($1,500, $1,750, $1,600, etc.)
Step 2: Create a Chart
Highlight both columns of your data, including the headers. Then, go to the menu and click Insert > Chart. Google Sheets will automatically suggest a chart type. For visualizing trends, a Line chart or a Scatter chart is usually your best option.
If Google Sheets defaults to something different, you can change it in the Chart editor that appears on the right. Under the "Setup" tab, simply change the "Chart type" to your preferred choice.
Step 3: Finding the Trendline Option
With your chart created, the Chart editor panel should be open on the right. If not, just double-click anywhere on your chart to open it.
In the Chart editor panel, click on the Customize tab. Here you'll find all the options to tweak the look and feel of your chart.
Step 4: Add and Customize the Trendline
Scroll down in the "Customize" tab and click on the Series dropdown menu. This section controls the properties of your data line.
About halfway down, you'll see a checkbox for Trendline. Check it.
And just like that, a trendline will appear on your chart, cutting through your data to show the general direction. Easy, right? But now you can customize it further to make it even more insightful.
Customizing Your Trendline in Google Sheets
Once you've added the trendline, Google Sheets gives you several options to refine it. These options can help you get a more accurate fit for your data and improve the clarity of your chart.
Trendline Type
The first and most important option is the "Type." Not all data moves in a straight line. Google Sheets offers a few models to fit different data patterns:
- Linear: This is the default and most common type. It's best for data that shows a fairly steady, constant rate of increase or decrease, like consistent monthly growth.
- Exponential: Use this when your data is growing or declining at an ever-increasing rate. Think of viral content or compounding interest - the growth starts slow and then gets faster.
- Polynomial: This type is useful for more complex data that has ups and downs (peaks and valleys). You can even set the degree of the polynomial to make the line more or less flexible to fit your data's curves.
- Logarithmic: Ideal for data that rises or falls quickly at first, but then starts to level off. For example, the initial user growth for a new product might be rapid before stabilizing.
- Moving Average: This isn't a true trendline but a smoothing technique. It calculates the average of a specific number of data points to smooth out volatility and show shorter-term trends.
Appearance and Labeling
You can also change the Line color, Opacity, and Thickness to make your trendline stand out or blend in with your design. This is especially helpful if you're presenting the chart to stakeholders.
The "Label" option lets you display the equation of the trendline on the chart (choose "Use Equation") or, more usefully, display the R² value.
Showing R-Squared (R²) – The "Goodness of Fit"
In the "Label" dropdown, you'll see an option to Show R². We highly recommend checking this box. R² (or R-squared) is a statistical measure that tells you how well your trendline actually fits your data.
- The value ranges from 0 to 1.
- An R² value of 1 means the trendline is a perfect fit for your data points.
- An R² value of 0 means there is no correlation at all.
As a rule of thumb, an R² value above 0.70 is often considered a strong fit, while anything above 0.90 is a very strong fit. If your R² is low (e.g., 0.25), it means your trendline isn't a very reliable representation of the data, and any forecasts based on it should be taken with a grain of salt. Trying a different trendline type (like Exponential or Polynomial) might help you get a better R² value.
Method 2: Create a Trendline Manually with Formulas
For users who want more control, Google Sheets allows you to calculate the components of a linear trendline using formulas. This method is useful if you want to perform calculations with the forecast data or display the trendline values directly in your spreadsheet.
Step 1: Calculate the Slope
The slope determines the steepness of the trendline. Use the SLOPE formula. You’ll need to specify your known Y values (your data, like sales) and your known X values (the time period).
=SLOPE(known_data_y, known_data_x)For example, if your revenue is in B2:B13 and the corresponding months (represented numerically as 1, 2, 3...) are in A2:A13, the formula would be:
=SLOPE(B2:B13, A2:A13)Step 2: Calculate the Y-Intercept
The intercept is the point where the trendline would cross the Y-axis if the X-axis were zero. It's the starting point of your trendline. The formula is INTERCEPT.
=INTERCEPT(known_data_y, known_data_x)Using the same data ranges:
=INTERCEPT(B2:B13, A2:A13)Step 3: Calculate Your Trendline Forecast Data
Now you can build the trendline values. The formula for a straight line is y = mx + b, where m is the slope and b is the intercept.
In a new column (e.g., Column C), you'll apply this formula for each row. Let's say you calculated your slope in cell E2 and your intercept in F2.
In cell C2, your formula would be:
=$E$2 * A2 + $F$2Note the $ signs for the slope and intercept cells. This creates an absolute reference, so when you drag the formula down to the rest of the cells in Column C, it will always refer back to E2 and F2 but use the changing month value from column A.
Step 4: Add the New Data Series to Your Chart
Now that you have a new column with the calculated trendline data, you can add it to your chart. Double-click the chart to open the Chart editor, go to the "Setup" tab, and click "Add series." Select your new data in Column C.
Google Sheets will add another line to your chart representing the trend. You can then go to the "Customize" tab, find your new series, and format it to look like a trendline (for example, make it a dashed line of a different color).
Final Thoughts
Knowing how to add trendlines in Google Sheets, whether through a few clicks in the chart editor or by building it with formulas, is a fantastic skill for anyone who handles data. Trendlines can help you quickly spot growth, forecast future performance, and make smarter decisions backed by visible patterns in your sales, marketing, or operational metrics.
While mastering spreadsheets is a valuable skill, the process of manually exporting data from various platforms like Google Analytics, Shopify, or Salesforce to create these reports can be time-consuming. We built Graphed to streamline this entire process. You can connect your marketing and sales data sources with a single click and create live dashboards in seconds using simple, natural language. Instead of wrangling formulas, you could just ask, "Show me a chart tracking my UK website traffic with a trendline for last quarter," and get an interactive visualization instantly.
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?