Why an Excel Trendline Does Not Touch the First and Last Points
Question details
Understand why an Excel trendline does not necessarily touch the first and last data points and how to connect those points instead.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user is viewing a chart with a trendline and expects the line to pass through the first and last observations.
- Observed behavior
- The trendline is fitted using the available data points and may not pass through either endpoint.
Check whether you want a statistical fit across all observations or a straight line connecting only the first and last points. Identify the X and Y values of those endpoints if you want to draw a connecting line.
Inspect the fitted Excel trendline
Use the trendline options to understand the model plotted across your data.
A linear trendline is a best-fit line: Excel chooses it to minimize the sum of squared vertical differences between the observed and predicted values. It does not have to pass through the first or last point.
Select the chart, then right-click the trendline and choose Format Trendline.
In Trendline Options, confirm the trendline type. For a linear fit, select Linear.
Select Display Equation on chart to see the fitted formula. Optionally, select Display R-squared value on chart to see a measure of fit.

Connect the endpoints with a separate chart series
Use an XY scatter series when you need a straight line between the first and last X-Y observations.
Connect Chart Endpoints in WPS Spreadsheets
Use a scatter chart in WPS Spreadsheets to draw a straight line between the first and last X-Y values, without treating the line as a statistical trendline.
- 1. Open the workbook: Open your Excel workbook in WPS Spreadsheets and locate the first and last X-Y observations.
- 2. Prepare the endpoints: In empty worksheet cells, enter the first and last X values in one column and their corresponding Y values in the next column.
- 3. Insert a scatter chart: Select the two endpoint columns, then choose Insert > Chart and select a scatter chart with straight lines.
- 4. Review the chart: Check that the line connects the two endpoint markers. Use the chart's data selection controls if you also want to add the full data set.

Frequently Asked Questions
Is my Excel trendline wrong if it misses the endpoints?
Not necessarily. A linear trendline fits all available observations by minimizing squared vertical errors, so it may miss both endpoints.
How can I see the trendline equation in Excel?
Right-click the trendline, choose Format Trendline, and select Display Equation on chart.
How do I draw a straight line between only the first and last points?
Put those two X-Y pairs in a separate worksheet range, add them as a series through Chart Design > Select Data, and use Scatter with Straight Lines for that series.
Will changing the trendline type make it touch both endpoints?
Not necessarily. Changing the type in Format Trendline changes the fitted model, but the resulting curve or line is not guaranteed to pass through both endpoints.




