Science skills

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 scaleScatter graph with a line of best fitTemperature (°C) against time (s)
A category or nameColumn (bar) graphReaction time for different metals
How often values occurHistogramHeights 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.
0.00.20.40.60.81.01.2012345Period squared against length for a pendulumLength, L (m)Period squared, T² (s²)run = 0.80 mrise = 3.28 s²outlier
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).

Gradient
(4.10 − 0.82) ÷ (1.00 − 0.20) = 3.28 ÷ 0.80 = 4.10 s²/m
Meaning
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.

RelationshipPlot y against xGradient equals
h = ½gt² (falling object)h against t²½g
T = 2π√(L ÷ g) (pendulum)T² against L4π² ÷ g
V = IR (resistor)V against IR
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?

  1. Joining each point to the next with a ruler.

  2. Labelling the x-axis “Time (s)”.

  3. Drawing the line through the origin because “it should go through zero”.

  4. Using two points from the line, far apart, to find the gradient.

  5. Spacing 1, 2, 5 and 10 evenly along the axis.

  6. Starting the y-axis at 20 because all the data is between 20 and 30.

  7. Using a column graph for temperature against time.

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Keep going