I expect this has been asked before...

How do I calculate points on a line?

If I have to points (x1,y1) and (x2,x2) how do I calculate any y value for a given x?

so if x1< x < x2 how do I calculate y?