Chart & Visualization Issues

Add a Regression Equation to an Excel Scatter Plot

Amos GikundaAmos Gikunda Nov 18, 2026 871 views

Question details

The user wants to display a regression equation for the data in an Excel scatter plot.

Add a Regression Equation to an Excel Scatter Plot
Product
Microsoft Excel
Device & OS
not provided
Scenario
A scatter plot has been created to visualize the relationship between two variables.
Observed behavior
The chart does not display a trendline equation.
Before you start

Check that the scatter plot uses the intended numeric X and Y values. If the chart has multiple data series, identify the series for which you want a regression equation.

Solution 1Recommended

Display the trendline equation on the scatter plot

Use a chart trendline to show the regression equation alongside the plotted data.

1
Select the data series

Click a data point in the Excel scatter plot to select the series, then right-click it.

2
Add a trendline

Select Add Trendline and choose a model, such as Linear, in the Format Trendline pane.

3
Show the equation

In the Format Trendline pane, select Display Equation on chart. Select Display R-squared value on chart as well if you want to see the fit statistic.

Display the trendline equation on the scatter plot
Choose a suitable model: A linear trendline displays an equation in the form y = mx + b. Other trendline types use different equations.
WPS Spreadsheets

Show a Regression Equation in WPS Spreadsheets

Open your spreadsheet in WPS Spreadsheets, add a trendline to the scatter plot, and display its equation on the chart.

  1. 1. Open the workbook: Open WPS Spreadsheets and use File > Open to select your workbook.
  2. 2. Select the plotted series: Click a data point in the scatter plot, then right-click the selected series.
  3. 3. Add a trendline: Choose Add Trendline and select Linear or another model suited to your data.
  4. 4. Display the equation: In the trendline options, select Display Equation on chart. If needed, also select Display R-squared value on chart.
Display a trendline equation on a scatter plotCalculate linear coefficients with SLOPE and INTERCEPTOpen and save Microsoft Excel XLSX filesWork in a familiar spreadsheet interface
QA img-9

Frequently Asked Questions

How do I show the R-squared value on an Excel scatter plot?

Right-click the data series, select Add Trendline, and check Display R-squared value on chart in the Format Trendline pane.

How can I get the regression slope and intercept in cells?

Use =SLOPE(y_range,x_range) for the slope and =INTERCEPT(y_range,x_range) for the intercept. Replace the ranges with your worksheet's corresponding Y and X values.

Can I add equations for more than one data series?

Yes. Right-click each data series separately, choose Add Trendline, and enable Display Equation on chart for each trendline.

Why do calculations using the displayed equation differ slightly from the trendline?

The chart label may round its coefficients. Use SLOPE and INTERCEPT in worksheet cells for more precise linear calculations, or format the equation label to display more decimal places.