Chart & Visualization Issues

Create an Automatically Updating Trendline and Equation in Excel

Ayan MasoodAyan Masood Nov 18, 2026 870 views

Question details

Create an Excel chart with a regression trendline and equation that update when source data changes.

Create an Automatically Updating Trendline and Equation in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to chart X and Y values using a dynamic data range and display an appropriate regression curve.
Observed behavior
The chart should include new or edited data and recalculate the displayed trendline equation automatically.
Before you start

Arrange numeric X and Y values in two columns with headers. Decide which regression type suits the data; for example, an exponential trendline requires positive Y values.

Solution 1Recommended

Create a Trendline from an Excel Table

Use an Excel Table to expand the chart's source data as you add rows, then display the regression equation on the chart.

1
Create a table

Select the X and Y columns, including their headers, and choose Insert > Table. Confirm that My table has headers is selected, then click OK.

2
Insert a scatter chart

Select the table's X and Y columns and choose Insert > Scatter (X, Y). Choose a scatter chart style.

3
Add a trendline

Click a data point in the chart, right-click the series, and choose Add Trendline. In Format Trendline, select Linear, Exponential, Polynomial, or another type appropriate for your data.

4
Show the equation

In Format Trendline, select Display Equation on chart and, if useful, Display R-squared value on chart.

5
Test the dynamic range

Edit a table value or enter a new X and Y pair directly below the table. Check that the chart includes the point and updates the trendline and equation. If it does not, use Chart Design > Select Data to check the series' X and Y ranges.

Create a Trendline from an Excel Table
Equation precision: The displayed equation may round its coefficients. To show more digits, right-click the equation, choose Format Trendline Label, and adjust its number format.
Create charts in WPS Spreadsheet

Build an Updating Trendline Chart in WPS Spreadsheet

Use an XY scatter chart in WPS Spreadsheet to plot your data and display a fitted trendline equation. Reserve blank rows in the chart range so you can add data without changing the range each time.

  1. 1. Prepare the data range: Open the workbook in WPS Spreadsheet and arrange numeric X and Y values in adjacent columns. Include a reasonable number of blank rows below the data in the range you select.
  2. 2. Insert a scatter chart: With the data and reserved blank rows selected, choose Insert > Chart and select an XY scatter chart.
  3. 3. Add the regression curve: Right-click the chart's data series and choose Add Trendline. Select a suitable trendline type and enable the option to display the equation on the chart.
  4. 4. Add and check data: Enter new X and Y values in the reserved rows and check that the chart and equation update. If you run out of reserved rows, use the chart's Select Data option to extend the source range.
Create scatter charts with regression trendlines and equations.Open and edit Microsoft Excel XLSX and XLS files.Use familiar spreadsheet tools in a lightweight office suite.Get started with WPS Office for free.
microsoft office alternative - wps office

Frequently Asked Questions

Why didn't my Excel chart include a new row?

Enter the new values directly below the Excel Table so it expands. Then use Chart Design > Select Data to check that the series references the table's X and Y columns.

How do I display the R-squared value?

Right-click the trendline, choose Format Trendline, and select Display R-squared value on chart.

Which trendline type should I choose?

Choose a type that fits the relationship in your data. Use Linear for an approximately straight-line relationship, or consider Polynomial for a curved relationship. Exponential trendlines require positive Y values.

Why does the equation appear rounded?

Excel can display rounded coefficients even though the trendline uses more precision. Right-click the equation, choose Format Trendline Label, and increase the displayed decimal places under Number.