Graphs and the line of best fitAxes, scales, the line of best fit, gradients and outliers
A good graph turns a table of numbers into a pattern you can see and use. Graphs come up in almost every practical report and HSC science exam, and most lost marks come from the same handful of mistakes.
Years 7 to 12
Physics, Chemistry, Biology, Science
Updated November 2026
The short answer
Scatter graph
Plot the points. Don’t join the dots.
Use it whenever both variables are numbers measured on a scale.
Line of best fit
One line that follows the trend.
A straight line or a smooth curve, with roughly as many points above it as below.
Gradient
Rise over run, using points on your line.
Its units are the y-axis units divided by the x-axis units.
Choosing the right type of graph
Your independent variable is…
Use a…
Example
A number on a continuous scale
Scatter graph with a line of best fit
Temperature (°C) against time (s)
A category or name
Column (bar) graph
Reaction time for different metals
How often values occur
Histogram
Heights of students in a class
What every graph needs
Before you hand it in, check
A title that says what the graph shows, such as “Bounce height against drop height for a tennis ball”.
The independent variable on the x-axis and the dependent variable on the y-axis.
Both axes labelled with the quantity and its unit, such as “Time (s)”.
Even scales that use most of the grid. The axes don’t have to start at zero.
Points plotted clearly as small crosses or dots.
A single line of best fit, not lines joining the points.
At least six points if you expect a straight line, and more if you expect a curve.
Labelled axes with units, a single straight line of best fit, a large gradient triangle drawn on the line, and one outlier left out of the fit for a stated reason.
Drawing the line of best fit
If the points follow a straight trend, draw one straight line with a ruler. If they follow a curve, draw one smooth curve.
Aim for roughly as many points above the line as below it, spread along its length.
The line doesn’t have to pass through any of the points, or through the first and last points.
Don’t force the line through the origin. Where it crosses the axis can tell you something, such as a zero error in an instrument.
You can extend the line beyond your data (extrapolate), but the further you go, the less certain it is, because you are assuming the trend continues.
Finding the gradient
Pick two points on your line, not data points, as far apart as possible. A big triangle gives a more precise gradient.
gradient = riserun = y₂ − y₁x₂ − x₁
Worked example: finding g from a pendulum graph
Physics
A graph of period squared (T², in s²) against length (L, in m) is a straight line. Two points on the line are (0.20, 0.82) and (1.00, 4.10).
Theory says T² = (4π² ÷ g) × L, so the gradient equals 4π² ÷ g.
Result
g = 4π² ÷ 4.10 = 9.63 m/s²
Outliers
An outlier is a point that doesn’t fit the pattern of the others. Before you do anything with it:
What to do with an outlier
If you spot it during the practical, measure that point again.
Look for a reason: a misread scale, a step done differently, a number written down wrongly.
You can leave it out when drawing the line of best fit, but only if you can justify it, and you must say so in your report.
If several odd points sit at one end of the graph, they may be real. The relationship might only be a straight line over part of the range.
Turning a curve into a straight line
A straight line is much easier to analyse than a curve, because you can read its gradient. If theory tells you how the variables are related, you can plot them so the graph comes out straight.
Relationship
Plot y against x
Gradient equals
h = ½gt² (falling object)
h against t²
½g
T = 2π√(L ÷ g) (pendulum)
T² against L
4π² ÷ g
V = IR (resistor)
V against I
R
Light intensity ∝ 1 ÷ d²
Intensity against 1 ÷ d²
a constant
If graphing software gives an R² value, it tells you how well a straight line fits the points. The closer to 1, the better; above about 0.95 usually suggests a linear relationship. R² says nothing about whether the results are accurate or the experiment is valid.
Practice: good practice or mistake?
Joining each point to the next with a ruler.
Mistake. Draw one line of best fit through the trend instead.
Labelling the x-axis “Time (s)”.
Good practice. Quantity and unit, exactly right.
Drawing the line through the origin because “it should go through zero”.
Mistake. Draw the best fit. If it misses the origin, that may reveal a systematic error.
Using two points from the line, far apart, to find the gradient.
Good practice. A large triangle gives a more precise gradient.
Spacing 1, 2, 5 and 10 evenly along the axis.
Mistake. Scales must go up in equal steps.
Starting the y-axis at 20 because all the data is between 20 and 30.
Good practice. This spreads the data out so the trend is easier to see.
Using a column graph for temperature against time.
Mistake. Both are continuous numbers, so use a scatter graph.
Common mistakes
Missing units on the axes.
Instead: Every axis label needs a quantity and a unit.
Using data points to find the gradient.
Instead: Use points on your line of best fit.
Leaving out the units of the gradient.
Instead: Divide the y units by the x units, such as s²/m.
Plotting points too small to read, or in pen that can’t be fixed.
Instead: Use small, neat crosses in pencil.
Squashing the data into one corner.
Instead: Choose a scale so the points fill most of the grid.
Exam-style questions
A line of best fit on a graph of distance (m) against time (s) passes through (1.0, 3.0) and (5.0, 15.0). Calculate the gradient and state what it represents. 2 marks
Show a model answer
Gradient = (15.0 − 3.0) ÷ (5.0 − 1.0) = 12.0 ÷ 4.0 = 3.0 m/s. On a distance-time graph the gradient is the speed.
Explain why a line of best fit should not be forced through the origin. 2 marks
Show a model answer
The best fit line should follow the data. If it doesn’t pass through the origin, the intercept may show a systematic error, such as a zero error. Forcing it through the origin hides this and gives the wrong gradient.
An object falls from rest, and theory says h = ½gt². Describe how to plot the data to give a straight line, and how to find g from it. 3 marks
Show a model answer
Plot h on the y-axis against t² on the x-axis. The graph should be a straight line through the origin with gradient ½g. Find the gradient from the line of best fit, then g = 2 × gradient.
In a spring experiment, one point is far above the line formed by the others. Outline what the student should do. 2 marks
Show a model answer
Repeat that measurement if possible and look for a cause, such as a misread scale. If there is a good reason to reject it, leave it out of the line of best fit and explain this in the report.
Questions students and parents ask
Does a line of best fit have to go through the origin?
No. Draw the line that best fits the points. If theory says it should pass through the origin and it doesn’t, that is worth discussing, because it can point to a systematic error.
How many data points do I need?
At least six for a straight-line relationship. Take more if you expect a curve, especially where the dependent variable changes quickly.
Should the line of best fit be straight or curved?
Follow the data. If the points curve, draw a smooth curve. Don’t force a straight line through curved data.
Is a trend line the same as a line of best fit?
Yes. Spreadsheet software calls it a trend line. Make sure the software isn’t joining the dots, which is often the default.