How to Calculate When an Excel Trendline Reaches a Target Value
Question details
The user needs to determine the specific x-value (such as a date) at which a linear trendline hits a predetermined target y-value using formulas.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Projecting future dates or performance metrics based on a linear trend to hit a specified goal.
- Observed behavior
- To achieve the goal state, the exact x-value must be calculated mathematically by deriving the slope and intercept from an existing dataset rather than relying solely on chart visuals.
Ensure that your x-values (such as dates) and y-values are formatted as numbers rather than text, as statistical functions like LINEST require pure numeric data to evaluate correctly.
Calculate the Target Value Using the LINEST Function
Use the LINEST function to extract both the slope and intercept simultaneously, then apply basic algebra to solve for the target x-value.
A linear trendline follows the mathematical equation y = mx + b, where 'm' is the slope and 'b' is the y-intercept. By calculating these two variables based on your existing data, you can solve for your target 'x' using the rearranged formula: x = (y - b) / m.
Select two adjacent empty cells horizontally. Type the formula =LINEST(known_y's, known_x's) and press Enter. The first cell will display the slope (m) and the second cell will display the intercept (b).
In a new cell, input the algebraic formula to solve for x: =(Target_Y - Intercept_Cell) / Slope_Cell, replacing 'Target_Y' with your desired goal number and referencing the respective cells for slope and intercept.
If your x-values represent dates, the result will appear as a numeric serial number. Right-click the result cell, select 'Format Cells', and choose a 'Date' format to display the exact projected date.

Calculate Using SLOPE and INTERCEPT Functions Separately
If you prefer not to use array-like outputs, you can calculate the slope and intercept in separate, dedicated cells before solving for the target value.
Calculate Trendline Target Values Easily in WPS Spreadsheet
WPS Spreadsheet provides robust statistical functions including LINEST, SLOPE, and INTERCEPT, making it simple to project data and find exact target values. It is completely free and highly compatible with Microsoft Excel.
- 1. Open your Data: Launch WPS Spreadsheet and open the file containing your dataset.
- 2. Apply Statistical Functions: Use the =LINEST() or =SLOPE() and =INTERCEPT() functions exactly as you would in standard spreadsheet software.
- 3. Calculate the Target: Input the formula =(Target - Intercept) / Slope to find your specific target date or value.

Frequently Asked Questions
Why am I getting a #VALUE! error when using the LINEST function?
This error usually occurs if your known x-values or y-values contain text strings or are numbers stored as text. Ensure all cells in your data ranges are properly formatted as numbers or standard dates.
Can I find the target value directly by looking at a chart trendline?
While a chart trendline visually projects data and you can display the equation on the chart, you cannot dynamically extract that projected mathematical point directly from the chart object into a cell. You must use functions like LINEST or SLOPE and INTERCEPT to calculate it for automated spreadsheet use.
How do I fix dates that are stored as text to use them in my trendline calculation?
Select the cells containing the text dates, go to the 'Data' tab, click 'Text to Columns', and finish the wizard by selecting 'Date' in the final step. This converts the text strings into valid numeric serial numbers that functions can process.




