linear function

Occasional Visitor

What is the formula for

if x=5 y=1

if x=10 y=3

if x=15 y=5

if x=12,5 what is the value of y

2 Replies



Not sure that what you've set forth is actually linear.



(resubmitted to correct critical typo)




At the risk of doing your class or exam assignment for you, use LINEST to determine the coefficients of the linear approximation est y = m*x + b.




F3:G5:  =LINEST(B3:B5, A3:A5, TRUE, TRUE)

C3:       =A3*$F$3 + $B$3


Select F3:G5 and type the formula.  In some versions of Excel, we must commit by pressing ctrl+shift+Enter instead of just Enter.


In this case, the linear "approximation" is an exact fit.  This is indicated by r^2 = 1 in F5.


PS....  In general, it is unwise to use LINEST results blindly.  The first step should be to use an XY Scatter chart to visually inspect the relationship between x and y.  You can even create a (linear) trendline to determine the fit.