Regression Excel Scatter Plot: Add a Trendline and Read It

Charts & pivot tables · Updated November 21, 2026

To make a regression scatter plot in Excel, put the independent variable in one column and the dependent variable in the next, select both columns, then choose Insert > Insert Scatter (X, Y) or Bubble Chart > Scatter. Select the chart and use Chart Design > Add Chart Element > Trendline > Linear; to display the regression equation and R-squared value, open More Trendline Options and select the corresponding checkboxes.

What a regression scatter plot shows

A scatter plot places paired numeric observations on a graph: each row becomes one point, with the first selected data series supplying the horizontal X value and the second supplying the vertical Y value. A regression trendline summarizes the relationship between those values. For a linear trendline, Excel fits a straight line that minimizes the sum of the squared vertical differences between the observed points and the line.

This is useful when you want to see whether two measurements tend to change together and to describe that pattern with a line. For example, a business might compare advertising spending with weekly sales, or a researcher might compare a plant’s height with the number of days since planting. A chart makes clusters, outliers, and bends visible; the line and its statistics provide a compact numerical summary.

Excel’s scatter chart is important here because it treats X values as numbers on a continuous horizontal scale. A line chart, despite its name, generally treats its horizontal labels as categories. If your numeric X values are irregularly spaced, a line chart can therefore place observations misleadingly evenly apart. Use an XY scatter chart for ordinary two-variable regression.

Prepare the data before charting

Arrange observations in two columns with a clear heading for each variable. Put the independent or explanatory variable in the left column and the dependent or response variable in the right column. Keep each pair on the same row: the X value in a row must correspond to the Y value beside it. For instance, a weekly record might have “Ad spend” in column A and “Sales” in column B, with one week per row.

Check the data before inserting the chart. Both variables should be numeric, and the paired rows should represent the same observations. Blank cells, text values, totals mixed into the records, or a header included as a data point can cause an incorrect chart or an unintended fit. If there are multiple groups, decide whether they should be plotted as separate series or combined; a single regression line across distinct populations may conceal important differences.

  • Use one row per observation and avoid merged cells in the data range.
  • Keep units consistent, such as dollars throughout rather than dollars in some rows and thousands of dollars in others.
  • Inspect unusual values rather than deleting them automatically. An outlier may be a data-entry error, but it may also be a meaningful observation.
  • If a measurement is missing, do not shift the remaining values up a row; that would pair the wrong X and Y observations.

Create the scatter plot and add a linear trendline

In Excel for Microsoft 365 on Windows, select the two columns of paired data, including their headings. Go to Insert > Insert Scatter (X, Y) or Bubble Chart and choose the scatter option with markers. The first column should appear along the horizontal axis and the second along the vertical axis. If Excel assigns the axes incorrectly, use Chart Design > Select Data to inspect or edit the series X and Y values.

  1. Select a point in the chart, then choose Chart Design > Add Chart Element > Trendline > Linear. You can also use the Chart Elements button beside the chart and select Trendline, then open More Options.
  2. In the Format Trendline pane, make sure Linear is selected. Select Display Equation on chart and Display R-squared value on chart if you want those labels visible.
  3. Add meaningful labels with Chart Design > Add Chart Element > Chart Title or Axis Titles. Include measurement units where they help explain the scale.
  4. Review the plotted points and the fitted line. A line should not be treated as an adequate summary merely because Excel can draw one.

On Excel for Mac, the chart type and trendline options are available from the chart-design controls, although ribbon placement can differ slightly by release. Excel for the web supports scatter charts and trendlines, but some chart-formatting controls may be more limited or arranged differently than in the Windows desktop app. If a named trendline option is not visible, open the chart’s formatting pane or use the desktop version.

Read the equation and R-squared correctly

A linear regression equation is usually written as y = mx + b. Here, m is the slope: the estimated change in Y for a one-unit increase in X. The intercept, b, is the fitted Y value when X equals zero. The intercept may have little practical meaning if zero is outside the observed range or impossible in the real situation.

Excel’s displayed equation may be rounded, so use the label as a visual summary rather than a source for precision-sensitive calculations. To show more digits, right-click the equation label, choose Format Trendline Label, and adjust its number formatting. A change in displayed decimal places does not change the fitted regression; it only changes how the equation is printed.

R-squared, often written R², describes the proportion of the observed variation in Y accounted for by the fitted line in this dataset. A value closer to 1 means the points fit the line more closely in this limited sense. It does not say that the relationship is causal, that predictions will be accurate for new data, or that the model is appropriate. A high R² can coexist with a curved pattern or influential outliers, so inspect the scatter itself.

Check the result with worksheet formulas

For a small dataset, worksheet functions can verify the line’s slope, intercept, and R-squared without relying on the chart label. Suppose A1:B6 contains headings, with X values 1, 2, 3, 4, 5 in A2:A6 and Y values 3, 5, 4, 8, 10 in B2:B6. With X in A2:A6 and Y in B2:B6, enter =SLOPE(B2:B6,A2:A6); the result is 1.7. With those same ranges, enter =INTERCEPT(B2:B6,A2:A6); the result is 0.9. The fitted equation is therefore y = 1.7x + 0.9.

For the same layout, enter =RSQ(B2:B6,A2:A6) to calculate R²; the result is 0.85. In this example, the line explains 85% of the variation in the five observed Y values under the linear model. The chart may show a rounded version such as y = 1.7x + 0.9 and R² = 0.85. These figures describe the supplied observations, not a guarantee about future measurements.

For more detailed regression output, Excel’s Analysis ToolPak includes Regression under Data > Data Analysis. If Data Analysis is absent, enable the Analysis ToolPak through File > Options > Add-ins, select Excel Add-ins in the Manage box, choose Go, and check Analysis ToolPak. The tool returns additional statistics and a residual output option. For a quick chart, a trendline is simpler; the ToolPak is useful when you need a fuller report or diagnostic values.

Choose a trendline that fits the pattern

A linear trendline is a sensible starting point when the points form an approximately straight band and the relationship is meaningful over the range shown. It is not automatically the right model for every scatter plot. A curve can indicate a nonlinear relationship, while separate clusters can indicate different groups or conditions that should be investigated rather than forced into one line.

Excel offers other trendline types, including exponential, logarithmic, polynomial, and moving average. Their availability and suitability depend on the data. An exponential fit requires positive Y values; a logarithmic fit requires positive X values. A polynomial can follow curvature, but a high-order polynomial may bend sharply between or beyond observations and can overfit a small dataset. A moving average is primarily a way to smooth ordered data, not a general substitute for regression on paired observations.

Do not choose a more complicated curve solely because its chart R² is higher. More flexible models often fit the existing data more closely by construction. Consider whether the shape makes sense, whether there are enough observations, and whether the model performs acceptably on data not used to fit it. If prediction matters, holdout data or other validation methods provide information that the chart’s in-sample R² does not.

Common chart and interpretation problems

  • The chart looks like points at equal intervals. Check that you inserted an XY scatter chart, not a line chart with category labels. This matters especially when X values are dates, measurements, or other numbers with gaps of different sizes.
  • The equation looks wrong. Confirm that the intended X range and Y range are assigned to the correct series. A reversed assignment models X as a function of Y, which is a different regression.
  • The trendline does not match every point. That is expected. A regression line summarizes the overall least-squares fit; it is not meant to pass through every observation.
  • R² is low or surprising. Look for curvature, multiple groups, data-entry errors, restricted measurement ranges, or influential observations. Do not remove valid points just to improve the statistic.
  • The chart label has too few decimals. Format the trendline label to show more digits or use worksheet functions for the coefficients. Avoid copying rounded coefficients into calculations that need greater precision.

Limits of regression and responsible use

A scatter plot and regression line show association, not cause and effect. If advertising and sales rise together, the plot alone cannot establish that advertising caused the change; seasonality, pricing, distribution, or other factors may affect both. A regression using only two columns also cannot control for unmeasured influences.

Be cautious about extrapolation. A line fitted to observations between X = 1 and X = 5 is not automatically reliable at X = 20. The relationship may change outside the measured range, and the line may produce impossible predictions. Predictions within the observed range can still be uncertain, particularly when the data are sparse or noisy. For consequential decisions, use a suitable statistical model, assess uncertainty, and seek qualified analysis rather than relying on a chart label alone.

Frequently Asked Questions

How do I add a regression line to a scatter plot in Excel?
Select the scatter chart, then choose Chart Design > Add Chart Element > Trendline > Linear. In the Format Trendline pane, select Display Equation on chart or Display R-squared value on chart if you want those statistics shown.

Is a scatter plot the same as a regression plot?
No. A scatter plot displays the paired observations. A regression line is a model fitted to those observations and can be added to the chart as a trendline. The points remain the measured data; the line is the model’s summary.

What does the slope mean in an Excel trendline?
For a linear equation y = mx + b, the slope m estimates the change in Y associated with a one-unit increase in X. Interpret it using the variables’ units and the range of data. It does not, by itself, prove that changing X causes Y to change.

What is a good R-squared value?
There is no universal cutoff. Whether an R² is useful depends on the field, data quality, purpose, and expected variability. Assess the point pattern, model assumptions, and prediction performance rather than judging the fit by one number.

Can Excel calculate regression without a chart?
Yes. SLOPE, INTERCEPT, and RSQ return common linear-regression statistics from paired ranges. For a fuller set of regression output, use the Regression tool in the Analysis ToolPak. A chart is still valuable for spotting patterns that summary statistics can hide.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.