In this tutorial, you will learn how to add equation to graph in google sheets.
The trendline of a scatter plot says a lot about the data in the graph, specifically, the relationship between the dependent and independent variables is defined by the slope of the trendline. By default, Google Sheets doesn’t display the equation of trendlines, but that doesn’t mean you’ll have to estimate the slope or calculate it yourself. There’s an option hidden in the Chart Editor settings that makes it easy to add a trendline equation to a graph in Google Sheets. Just follow the steps below.
Adding a Graph with Trendline
Before adding the trendline equation, we need a graph with a trendline, here’s how to add one in Google Sheets:
First, you’ll need to set up your data in two columns in Google Sheets, one for the independent variable or X axis of the plot and one for the dependent variable or Y axis. We’ll use mock width and height measurements for this example
Select the columns containing your data and open the Insert menu, then choose Chart
Google Sheets will attempt to interpret your data and guess what sort of chart will be most helpful, but if it picks the wrong chart type, simply choose the Scatter Plot option from the Chart Type menu at the top of the Chart Editor sidebar
The scatter plot will display floating over the spreadsheet cells, but will not yet have a trendline
To add a trendline, click on the Customize tab of the Chart Editor then scroll down to the Series section and click on it to expand it
Scroll to the bottom of the Series section and check the box for Trendline. A new section will appear where you can adjust the look and feel of the trendline
The trendline will immediately display on the scatter plot
To add the trendline equation, scroll down past the trendline line opacity and thickness settings to the Label dropdown and select Use Equation from the dropdown
The trendline equation will display at the top of the graph
Example Spreadsheet: Make a copy of the example spreadsheet
In this tutorial, I covered how to add equation to graph in google sheets. Want more? Check out all the Google Sheets Tutorials.