To add a trendline in Google Sheets, open the chart editor by double-clicking your chart, choose Customize > Series, select the data series if needed, and turn on Trendline. Then choose a model, such as linear, and adjust its label or display options.
A trendline is a visual model of the overall direction in a set of chart data. It can help make a pattern easier to see, but it does not prove what caused that pattern or guarantee what will happen next. The steps below are for Google Sheets in a desktop web browser.
What a trendline does in Google Sheets
A trendline is drawn over a chart series to summarize the relationship between its values. For example, if a scatter chart plots advertising spend on the horizontal axis and sales on the vertical axis, a rising linear trendline indicates that higher spend tends to coincide with higher sales in the displayed observations. It is a summary of the data, not another set of measured observations.
Google Sheets calculates the line or curve from the selected series. The exact shape depends on the trendline type. A line can be useful for showing a broad direction even when individual points vary, while a curved model can represent a relationship that changes more quickly or slowly across the range.
Trendlines are available for supported chart types, including scatter, line, column, and bar charts. A scatter chart is usually the clearest choice when you want to examine how one numeric variable relates to another: it gives the horizontal axis numeric values rather than treating each item as a category. The chart type and data layout affect how meaningful the fitted line is.
Prepare the chart data first
For a useful trendline, organize the source data so each observation has a clear pair of values. For example, put weekly study hours in one column and test scores in another, with one week or student per row. Use a header for each column, avoid mixing text labels into the numeric observations, and check for blanks or values stored as text.
When the relationship involves two measurements, create a scatter chart and assign the explanatory measurement to the X-axis and the outcome measurement to the series. To do that, select the relevant cells, choose Insert > Chart, and use the chart editor’s Setup tab to set the chart type, X-axis, and series. If Sheets puts the columns in the wrong roles, change those fields before assessing a trendline.
A line chart can make sense when the horizontal axis is time or an ordered sequence and you want to show how a value changes. However, a line chart often treats horizontal-axis entries as categories. A line fitted to categories may not answer the same question as a regression based on numeric X values. If spacing between X values matters—for instance, measurements taken at uneven time intervals—a scatter chart is often more appropriate.
Steps to add a trendline
- Click the chart once, then double-click it to open the chart editor. You can also use the chart’s three-dot menu and choose Edit chart.
- In the chart editor, open Customize, then expand Series.
- If the chart has more than one series, use the series selector or Apply to control to choose the series you want. A trendline applies to a series, not automatically to every series in the chart.
- Check Trendline. Sheets adds the line to the selected series and shows trendline settings in the same section.
- Choose a trendline type and, if useful, change the label, line appearance, or other available options. Close the chart editor when you are finished; the chart updates in the sheet.
If the Trendline option is missing, first check that you are editing the chart rather than a cell, that the chart type supports trendlines, and that you have selected a series under Customize > Series. A chart with no usable data series will not have a line to fit.
Choose a trendline type
Google Sheets offers several model types. The names describe the mathematical shape, so the best choice depends on the pattern and the question—not on which line looks most attractive.
- Linear: A straight line that summarizes a roughly steady increase or decrease. It is a sensible starting point for many scatter charts.
- Exponential: A curve for a pattern that grows or falls at a changing amount but a roughly consistent rate. Its mathematical form generally requires positive observed Y values.
- Logarithmic: A curve that changes rapidly at first and then levels off, or the reverse. The logarithm model requires positive X values.
- Polynomial: A flexible curve that can bend to follow a non-linear pattern. Sheets lets you set its degree; higher degrees can create more turns and may fit the plotted points closely without describing a dependable underlying relationship.
- Power: A curved relationship in which one variable changes according to a power of the other. This model generally requires positive X and Y values.
Try a linear model first when the data look broadly straight. Choose a curved model only when the shape has a meaningful reason and enough observations to support it. A complicated curve can fit a small dataset closely simply because it has more flexibility; that does not make it a better forecast.
Customize the equation, label, and appearance
In the trendline settings, the Label menu controls what appears beside the line. You can leave the label off, use the equation, or enter a custom label, depending on the options shown for the chart. The displayed equation is useful when you want to communicate the fitted relationship or calculate an estimate from it, but read it in the context of the chart’s axes and units.
For a linear trendline, the equation represents an intercept and a slope. The slope describes the model’s change in Y for a one-unit change in X; its practical meaning depends on the units. If X is months and Y is dollars, for example, the slope is in dollars per month. The intercept is the model’s estimated Y value at X equal to zero, which may not be meaningful if zero is outside the observed range.
Turn on Show R² when you need a summary of how closely the fitted model corresponds to the displayed data. R² is not a measure of whether the model is causally correct, whether the data are unbiased, or whether predictions outside the observed range will work. A high value can occur in misleading or over-fitted data, and a lower value does not automatically mean the data are useless.
Use the line color and thickness controls to make the trendline visible without confusing it with the observations. If several series are present, use clearly different colors and add an informative legend or custom label. A chart title and axis titles can also make the model easier to interpret, particularly when sharing the chart outside the spreadsheet.
Read the result without overclaiming
Start by checking whether the line follows the broad pattern, then look for exceptions and clusters that it hides. A single line can obscure seasonal behavior, separate groups, or a sudden change in the process. For example, monthly sales may rise overall while dropping every January. A straight trendline can summarize the long-term direction but cannot explain that seasonal cycle.
Be cautious about extrapolation: extending a trendline beyond the observed X values can produce estimates, but the chart does not establish that the same relationship will continue. If a store’s sales rose over six months, projecting the same slope for several years assumes conditions remain comparable. Changes in pricing, supply, customer behavior, or measurement can invalidate that assumption.
Also distinguish association from causation. If two series move together, the chart alone cannot show that one caused the other. A third factor may affect both, or the apparent relationship may be coincidental. For decisions that matter, examine the data source, sample size, collection method, and relevant context rather than treating the line as proof.
Common problems and fixes
- The trendline checkbox is absent: Open Customize > Series, select a series, and confirm the chart type supports trendlines. Try a scatter, line, column, or bar chart if appropriate.
- The line looks flat or oddly steep: Check the axis scales, units, and which column is assigned to X. A large outlier can also pull a fitted line toward itself.
- The curve will not fit: Some model types require positive values. Check for zero, negative, blank, or text entries and use a model that fits the data’s range and shape.
- The equation is missing: Set the trendline label to use the equation rather than leaving the label off. Make sure you are editing the intended series.
- The line appears on the wrong data: Return to the series selector in Customize > Series and apply the setting to the intended series.
Before changing the chart type, review the data range in the chart editor. If new rows were added after the chart was created, the chart may not include them. Correcting the range or X-axis assignment can resolve an apparent mismatch without changing the trendline model.
Google Sheets and Excel differences
The core idea is similar in Google Sheets and Microsoft Excel, but the controls are in different places. In Sheets, use the chart editor’s Customize > Series section. In Excel for Microsoft 365 on Windows, select the chart and use Chart Design > Add Chart Element > Trendline; choose a type or open more trendline options. Excel’s exact chart controls differ from Sheets, so steps written for one program should not be assumed to match the other.
In either program, a trendline is a chart feature and does not add a new column of fitted values to the source table. If you need estimates for individual rows, reproducible calculations, or a model to reuse elsewhere, you may need to calculate those values separately or use a suitable analysis tool. The chart’s displayed equation may help, but take care to preserve full precision if you use its rounded display values in further calculations.
Frequently Asked Questions
Can I add a trendline to a Google Sheets scatter chart?
Yes. Open the chart editor, choose Customize > Series, select the series if necessary, and check Trendline. Scatter charts are especially useful when both variables are numeric.
Can I add a trendline to only one series?
Yes. In Customize > Series, choose the series you want to format before enabling the trendline. Repeat the process for another series only if you want a separate fitted line for it.
How do I show the trendline equation in Google Sheets?
Open the trendline settings under Customize > Series and set Label to the equation option. The choices can depend on the selected chart and series.
What does R² mean on a Google Sheets trendline?
R² summarizes how closely the fitted model accounts for variation in the plotted data under that model. It does not prove causation or guarantee accurate predictions, especially outside the data range.
Why can’t I see the Trendline option?
Check that the chart editor is open, a data series is selected, and the chart type supports trendlines. If the data are not arranged or recognized as a usable series, correct the chart setup first.
Related
- Excel Time Format: Show Hours and Minutes Only Correctly
- Excel Time Difference in Seconds: How to Calculate
- Excel Date Without Year: Display a Date Without Its Year
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Dual Axis Line Chart in Excel: Create and Format ItTo make a dual axis line chart in Excel for Microsoft 365 on Windows, select your data, then…
- Excel to PowerPoint Gantt Chart: Create and Share ItTo put an Excel Gantt chart in PowerPoint, build it in Excel as a stacked bar chart, select…
- Excel Chart Filter: How to Show or Hide DataAn Excel chart filter lets you show or hide selected data series or categories without changing the chart’s…
- Bar Chart Pivot Table: How to Create and Format in ExcelA bar chart pivot table is a PivotChart that displays summarized PivotTable data as horizontal bars. In Excel…
- Excel Pivot Chart Type Changes With Slicer?No: in Excel for Microsoft 365, a slicer filters the data shown in a PivotChart, but it does…
- Google Sheets Chart Examples: Types, Uses, and TipsGoogle Sheets chart examples include a line chart for monthly sales trends, a bar chart for comparing products,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.