Find a Linear Equation and Calculate y in Excel
Question details
Find the linear equation through three given points and calculate y when x is 12.5.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Use the points (5, 1), (10, 3), and (15, 5) to determine a linear function and evaluate it at x = 12.5.
- Observed behavior
- The points lie on y = 0.4x - 1, which gives y = 4 when x = 12.5.
Enter the x-values 5, 10, and 15 in cells A3:A5 and the corresponding y-values 1, 3, and 5 in B3:B5. Keep each point's x- and y-values on the same row.
Use SLOPE and INTERCEPT to calculate y in Excel
Calculate the coefficients from the three points, then evaluate the function at x = 12.5.
In an empty cell, enter =SLOPE(B3:B5,A3:A5). The result is 0.4.
In another empty cell, enter =INTERCEPT(B3:B5,A3:A5). The result is -1, so the equation is y = 0.4x - 1.
In an empty cell, enter =SLOPE(B3:B5,A3:A5)*12.5+INTERCEPT(B3:B5,A3:A5). The result is 4.

Find the linear equation in WPS Spreadsheets
Enter the points in WPS Spreadsheets and use SLOPE and INTERCEPT to calculate the equation and its value at x = 12.5.
- 1. Enter the points: Open WPS Spreadsheets and enter 5, 10, and 15 in A3:A5 and 1, 3, and 5 in B3:B5.
- 2. Find the slope: Select an empty cell and enter =SLOPE(B3:B5,A3:A5) to get 0.4.
- 3. Find the intercept: Select another empty cell and enter =INTERCEPT(B3:B5,A3:A5) to get -1.
- 4. Calculate y: In an empty cell, enter =SLOPE(B3:B5,A3:A5)*12.5+INTERCEPT(B3:B5,A3:A5) to get 4.

Frequently Asked Questions
How is the equation y = 0.4x - 1 derived?
Using (5, 1) and (10, 3), the slope is (3 - 1) / (10 - 5) = 0.4. Substitute (5, 1) into y = 0.4x + b to get b = -1.
What is y when x is 12.5?
Substitute 12.5 into y = 0.4x - 1: y = 0.4 × 12.5 - 1 = 4.
Can I use LINEST to find the coefficients?
Yes. Enter =LINEST(B3:B5,A3:A5) in Excel to return the slope and intercept. In older versions, select two horizontal cells and confirm the formula with Ctrl+Shift+Enter.
How can I check whether other points follow a straight line?
Select the x- and y-value columns in Excel and choose Insert > Scatter to inspect the points. You can add a linear trendline to assess how closely they fit a line.




