The line of best fit, defined by what it minimizes
Draw any line through a scatter of points and every point misses it by some vertical amount. The line of best fit is the one whose squared misses sum to the smallest possible total: the least squares line. It is not drawn by eye and it is not negotiated. Given the data, algebra fixes it uniquely, which is why two honest analysts given the same numbers produce the same line.
Weekly advertising spend (2 to 16, hundreds of dollars) against sales (15, 19, 26, 24, 31, 36, 35, 42). The best fit line: ŷ = 12.11 + 1.82x, with r = 0.975 and R² = 0.951. Read it as a sentence: weeks start at a baseline of about 12.1 (hundreds) in sales, and each extra hundred of spend accompanies about 1.82 hundred of extra sales. Extending the pattern, spend of 18 predicts sales of about 44.9.
Best fit is a claim about a specific dataset
Add one outlier week, a misrecorded sale, and the line tilts toward it: squared misses give distant points outsized votes. Remove the top few spend weeks and the line re-fits to a narrower range with a different slope. None of this is a defect. It does mean the phrase "the line of best fit" always carries an unspoken suffix: for these data, under squared-error loss.
Judging the line by how it looks at the centre. The least squares line always passes through the centre of mass of the data, the point (x-mean, y-mean): here (9, 28.5). A line can pass through the middle beautifully and still be the wrong shape for curved data. Check the residuals, or plot the curve alternative.
From line to decisions
A fitted line earns its keep in two ways: interpolation, predicting inside the observed range where the pattern is supported, and summarization, compressing a cloud into one slope. The slope is usually the quotable output. "Each extra hundred of advertising accompanies about 182 dollars of weekly sales in this data" is a finding. Just keep the verb honest: accompanies, predicts, is associated with. Causation needs a design, not a line.
Frequently asked questions
How is the line of best fit calculated?
Least squares: the slope is Sxy / Sxx, and the intercept places the line through the means point. The regression calculator above shows both, with the residuals for your data.
Is the line of best fit the same as a trend line?
In spreadsheets, yes: the trendline feature fits this same least squares line (its 'linear' option). Spreadsheet exponential and polynomial trendlines are the corresponding curve fits.
Why does my spreadsheet line differ slightly from a hand calculation?
Rounding, usually. Software carries full precision. If the difference is large, check that both used the same pairs: a stray blank row can silently drop a point from one calculation.
Can the line of best fit be horizontal?
Yes: when the slope is 0, the best prediction is the mean of Y everywhere, which is what the data are saying when X carries no linear information about Y.