Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following scatter plot in Google Spreadsheet, and I would like to add a line that averages all my points.

Can I do that? And if yes how?

enter image description here

share|improve this question
Have you seen my answer? Does it answer your question? If no, can please give me some feedback on how to answer your question more properly? – Jacob Jan Tuinstra Dec 11 '12 at 21:00
up vote 6 down vote accepted

First, calculate the linear regression factors: y=ax+b with the following formula:


Then add another column next to the y-axis and name it calculated y-axis. Build the following formula to calc. the y-axis and copy that for all x-values.:


Next is a piece of cake. Add the calculated y-axis to the existing data range or add it seperately.

UPDATE: I've added the calculated mean value as well, in order to be absolutely sure to have answered your question properly, see plot: Plot with mean and linear regression

See example file for more details: plot regression example

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.