text: how do you calculate linearity? how is terminal endpoint linearity calculated and how is best fit line calculated? i don't know what you mean by terminal endpoints linearity.  i've never heard of it.  are you simply linearizing a function?  if so, you should be able to see how to do it in any calculus text.  as for the line of best fit, check out the least-squares method.