How to Add a Line to a Graph in Google Sheets

Cody Schneider9 min read

Adding a reference line to your Google Sheets chart is one of the quickest ways to add powerful context to your data. Whether you want to show performance against a goal, compare it to an average, or visualize a trend, a simple line can turn a basic graph into a compelling story. This guide will walk you through exactly how to add different types of lines to your charts, step by step.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Why Add a Line to Your Graph?

A graph shows you data, but a line gives that data meaning. Without context, a set of bars is just a collection of numbers. By adding a single line, you immediately provide a benchmark for comparison.

Here are a few common scenarios where adding a line is incredibly useful:

  • Tracking Against a Goal: Show your monthly sales figures as columns and add a horizontal line representing your sales target. You can see instantly which months you hit the target and by how much.
  • Visualizing an Average: Plot your weekly website traffic and add a line showing the average weekly traffic. This helps you quickly spot unusually high or low weeks.
  • Comparing Two Different Metrics: Display ad spend as columns and revenue as a line on the same graph to see how they relate over time.
  • Identifying a Trend: Use an automated trendline to see the general direction of your data - is it growing, declining, or staying flat over time?

The good news is that creating all of these in Google Sheets is much easier than you might think.

The Best Method: Creating a Combo Chart

The most flexible and common way to add a line to a graph is by using a combo chart. This chart type allows you to represent different data series as different things - for example, one series as columns and another as a line. This is perfect for comparing a primary metric against a benchmark like a goal or an average.

Let's walk through an example. Imagine you're a content creator tracking monthly blog traffic and you want to see how it compares to your monthly traffic goal of 10,000 visitors.

Step 1: Set Up Your Data to Include the Line

First, arrange your data in columns. You'll need one column for your labels (the x-axis), one for your primary data (the columns), and one for the data you want to display as a line.

In our example, it would look like this:

  • Column A: Month (Jan, Feb, Mar, etc.)
  • Column B: Actual Traffic
  • Column C: Traffic Goal

Your sheet should look something like this:

Important: For a horizontal goal line, make sure you fill the goal value down for every row. This tells Google Sheets to plot a consistent point for each month, creating a straight line across your chart.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Step 2: Insert a Chart

Highlight all your data, including the headers (from cell A1 to C5 in our example). Then, go to the menu and click Insert > Chart.

Google Sheets will usually make its best guess at the chart you want. It might start you off with a column chart showing both "Actual Traffic" and "Traffic Goal" as bars, which isn't quite what we want. No problem - the next step fixes this.

Step 3: Change the Chart Type to a Combo Chart

With your chart selected, the Chart editor pane should appear on the right side of your screen. If not, just double-click on the chart to open it.

  1. Under the Setup tab, find the Chart type dropdown.
  2. Scroll down until you find the Combo chart option and select it.

Google Sheets will automatically convert the chart, usually keeping the first series as columns and making the second series a line. You now have a visual comparison of your performance against your goal!

Step 4: Customize Your Chart and Line

Now it's time to polish your chart to make it clear and easy to read.

  1. In the Chart editor, click on the Customize tab.
  2. Expand the Series section.
  3. Use the dropdown menu to select the series you want to format. For instance, select "Traffic Goal" to style your line.
  4. You can also adjust the columns. Select the "Actual Traffic" series and adjust its fill color.

Finally, click on Chart & axis titles to give your chart a descriptive title, like "Monthly Blog Traffic vs. Goal," to ensure anyone looking at it understands what they're seeing.

How to Add a Dynamic Average Line to Your Chart

While a fixed goal line is useful, you'll often want to compare your performance to a dynamic average calculated directly from your data. The process is almost identical to creating a goal-line chart, with one simple formula.

Let's say you have monthly sales data and want to add a line for the average monthly sales.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Step 1: Calculate the Average in a New Column

You have your Month in column A and Sales in column B. In cell C2, you'll calculate the average of the Sales column.

The key here is to use an absolute reference in the AVERAGE formula. This ensures that when you drag the formula down, it always references the entire range of sales data. You make a reference absolute by adding $ symbols.

In cell C2, type this formula:

=AVERAGE(B$2:B$13)

This formula calculates the average of cells B2 through B13. The $ signs lock the rows, so even when you auto-fill this formula down to C13, it will still calculate the average of B2:B13 every time.

Step 2: Add the Data to Your Chart

If you don’t have a chart yet, select all three columns (Month, Sales, and Average Sale) and go to Insert > Chart.

If you already have a chart showing just your sales over time:

  1. Click on the chart to select it.
  2. In the Chart editor > Setup tab, click the data grid icon next to the Data range field.
  3. Adjust the range to include your new average column (e.g., change A1:B13 to A1:C13).

Step 3: Convert the Average Series to a Line

Just like before, Google Sheets will probably add the average as another set of columns. To fix this:

  1. Go to the Customize > Series tab in the Chart editor.
  2. Select your 'Average Sale' series from the dropdown menu.
  3. Change its display by selecting "Line" under the format options, or use the "combo chart" type again under the Setup tab.
  4. Customize the color and style. A dashed gray line is often a good choice for showing an average, as it provides a reference without stealing the spotlight from the actual sales data.

Now your chart clearly shows which months were above and below your average performance, giving your data story much more depth.

Adding a Trendline for Forecasts and Analysis

Sometimes you don’t want to compare against a static number, but instead want to see the direction your data is heading. Google Sheets has a built-in trendline feature for this, and it’s extremely easy to use.

Trendlines are especially useful for scatter plots and line charts to analyze the relationship between variables or see patterns over time.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Step 1: Create a Line or Scatter Chart

First, create a chart with the data you want to analyze. For example, create a chart showing daily user signups over the last 90 days. A simple line chart would be perfect here.

To do this, highlight your two columns (Date and Signups) and select Insert > Chart. Choose either Line Chart or Scatter Chart.

Step 2: Add the Trendline

  1. Double-click your chart to open the Chart editor.
  2. Go to the Customize tab and expand the Series section.
  3. At the bottom of the series options, you’ll see a checkbox labeled Trendline. Tick it.

That's it! A trendline will instantly appear on your chart, overlaying your data.

Step 3: Customize The Trendline

Google Sheets gives you a few options to make your trendline more useful:

  • Type: The default is a Linear trendline, which is a straight line showing the general increase or decrease. You can also pick Exponential for data that's growing at an accelerating rate or Polynomial for data with more "curves" in its trend. For most business reporting, Linear is the best place to start.
  • Color and Thickness: You can change the appearance of the trendline to make it more visible.
  • Show R²: The R-squared value tells you how well your trendline fits your data (from 0 to 1). A value closer to 1 means the trend represents your data more accurately. This is a great way to show how predictable or volatile a metric is.
  • Label: You can choose to display the equation of the line, which can be useful for forecasting.

This simple checkbox can reveal powerful insights - like confirming that your new user growth is consistently trending upward, even with daily fluctuations.

Final Thoughts

Adding a comparative line - whether it's an average, a specific goal, or an automated trendline - upgrades your Google Sheets graph from a simple data visualization to a powerful analytical tool. Using combo charts and the built-in trendline feature enables you to quickly show context, measure performance, and communicate insights more effectively.

We know that even with these tips, getting your marketing and sales data into perfectly structured charts can feel like a chore. You still have to export data from multiple platforms, calculate averages, and manually fine-tune every dashboard. At Graphed, we've built a way to eliminate that friction. Instead of building these charts yourself, you can simply connect your data sources (like Google Analytics, Shopify, or Salesforce) and just describe what you want to see - "Show me last month's sessions as a bar chart with a line for the monthly average" - and get a live, interactive dashboard in seconds. You can start building reports and getting answers for free with Graphed.

Related Articles