Trend lineThe line that fits the dots.
One straight line through the middle of the dots. Its slope says how much one number moves with the other; R squared says how well it fits.
- Answers Do two things move together?
- Your data two numbers per item
- Items about 10 or more
- Fit least squares
- Excel and Power BI built in
What is a trend line?
A trend line (also a line of best fit or regression line) is the straight line that fits the dots of a scatter plot best. It turns a cloud into one direction and one slope: "every extra hour adds about 3.6 points". A number called R squared (R²) says how well the line fits, from 0 (not at all) to 1 (every dot on the line).
A teacher plots 15 students' study hours against their exam scores. The trend line rises about 3.6 points per hour, and with an R² of 0.95 the dots hug it closely.
Why use a trend line?
Because it turns a cloud into a statement.
- One direction. Up, down or flat, without squinting at dots.
- A rate. The slope says how much one number changes per unit of the other.
- A fit score. R² says how much to trust the line.
- A rough forecast. Read off the line for a value you have not seen.
How does a trend line work?
Four steps find the best line.
- Step 1 of 4The dotsEach student at their hours and score.
- Step 2 of 4Try a lineA straight line through the middle of the cloud.
- Step 3 of 4Measure the missesEach red dash is how far a dot is from the line.
- Step 4 of 4Make the misses smallThe best line makes the squared misses add up to the least: least squares.
R² compares the misses with how much the scores vary at all: small misses give an R² near 1.
What are the parts of a trend line?
Four parts, and each one has a job.
- Linethe best straight fit through the dots
- Missa dot's distance from the line
- R²how well the line fits, 0 to 1
- Dotone item, as on any scatter plot
How do you read a trend line?
Three looks, in this order.
- Read the directionUp to the right: more study, higher scores.
- Read the slopeFrom 1 to 11 hours the line climbs about 36 points: about 3.6 per hour.
- Read R²The misses are small, R² is near 1: the line fits well.
What kinds of trend line are there?
The same class, three ways.
- Kind 1Straight lineThe usual linear fit, with R².
- Kind 2With the missesEach dot's distance to the line, for teaching or checking.
- Kind 3Dots onlyNo line: the reader judges the pattern alone.
Tools also offer curved fits (exponential, logarithmic, polynomial) and a moving average for data over time; pick a curve only when you know why the link should bend.
When should you use a trend line?
When the dots of a scatter plot roughly follow a straight line.
- the link looks straight
- you want a rate ("per hour")
- there are about 10 items or more
- R² will be shown with it
- the cloud bends (a curved fit or no line)
- there are clear groups (a line per group)
- the dots are a time series (a line chart with a moving average)
Trend line or plain scatter?
A line when the link is straight, plain dots when it is not clear.
The plain scatter lets readers see the pattern for themselves. The trend line states it: a direction, a slope and a fit score. A line can also make a weak pattern look stronger than it is, so always show R² with it.
How do you make a trend line?
Built into Excel and Power BI.
In Excel, click a scatter chart, choose Chart Elements > Trendline, and in its options tick Display R-squared value on chart. SLOPE, INTERCEPT and RSQ give the same numbers in cells. In Power BI, open the Analytics pane of a scatter chart and add a Trend line (the Analytics pane in Power BI).
What goes wrong with trend lines?
The most common mistake, and its fix: a straight line through a bend.
- the dots curve, but the line runs straight through
- its slope is right nowhere
- look at the dots first
- show the misses or R²
- use a curve only when you know why it bends
| Mistake | Why it hurts | Fix |
|---|---|---|
| A straight line through a curve | The slope is wrong everywhere | Look first; a curve or no line |
| No R² | Readers cannot judge the fit | Show R² beside the line |
| Reading far past the dots | The link may not hold there | Forecast only inside the data |
| One outlier pulling the line | The slope follows one item | Check the line without it |
| A line through two groups | Hides two different patterns | A line per group |
Every chart for “Do two things move together?”
- Two numbersScatter plotOne dot per item, two numbers as its position.
- Two numbersHexbin plotA scatter with too many dots, counted in hexagons.
- Two numbersContour plotRings around where dots crowd, like height lines on a map.
- Three numbersBubble chartA scatter plot whose dot size is a third number.
- Many numbersScatterplot matrixA scatter plot for every pair of numbers, in a grid.
- Many numbersCorrelation matrixA grid of how strongly each pair of numbers moves together.
- Two categoriesHeat mapA grid where colour shows the value, so patterns jump out.
- Two categoriesQuadrant chartA scatter split into four boxes, for sorting items into groups.
Read on, step by step.
Does it fit your data? Try it.
Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.