How to Make a Scatter Plot and Read the Trend Line

Learn how to make a scatter plot, add a line of best fit, and read correlation (r) and R², with a worked example and a free scatter plot maker.

Published

Free tool: Scatter Plot Maker

A scatter plot shows whether two measurements are related. Each point is one observation, such as one student or one day, placed by its two values: how many hours a student studied and the score they got, or the temperature and the number of ice creams sold. If the points drift upward, the two rise together; if they drift downward, one falls as the other rises. This guide explains how to make a scatter plot, add a trend line and read what it tells you, using the free Scatter Plot Maker.

When to use a scatter plot

Use a scatter plot when you have pairs of numbers and want to know whether they're related, for example:

  • study time and exam scores
  • advertising spend and sales
  • height and weight
  • house size and price
  • temperature and electricity use

If one of your variables is a category, such as a region or a product name, use a bar graph instead. If one is time, a line graph usually shows the change better.

Worked example: study hours and exam scores

Twelve students recorded how many hours they studied and the score they got (this is the sample data the Scatter Plot Maker opens with):

Hours studied122344566789
Exam score525561586570687479778588

Plotted, the points climb from lower left to upper right: more study, higher scores. The trend line through them is:

Score = 4.48 × hours + 48.03

So each extra hour of study goes with about 4.5 more points, and the correlation is r = 0.973.

How to read the trend line, r and R²

  • The trend line (line of best fit) is the straight line that sits as close as possible to all the points. It's found by least-squares regression, which keeps the squared vertical distances from the points to the line as small as possible.
  • The slope is how much y changes for each one-unit increase in x: 4.48 points per hour here.
  • The correlation coefficient, r, runs from −1 to 1. Values near 1 mean a strong upward straight-line relationship, near −1 a strong downward one, and near 0 no straight-line relationship. As a rough guide, above 0.7 (or below −0.7) is strong and below 0.3 is weak.
  • R² is r squared: the share of the variation in y that the line explains. Here R² = 0.946, so study time accounts for about 95% of the differences in these scores.

Using the line to predict, carefully

The line gives a reasonable estimate inside the range of your data. A student who studies 5 hours would be expected to score about 4.48 × 5 + 48.03 ≈ 70.

Outside that range, predictions break down. The same line says 20 hours of study would give a score of about 138, which is impossible on a test out of 100. Relationships often level off or change beyond the data you have, so avoid extrapolating far.

Correlation isn't causation

A strong correlation shows that two things move together, not that one causes the other. Ice cream sales and sunburns rise together because both increase in hot weather. Before concluding that x causes y, look for a third factor that could drive both, and remember that a few unusual points (outliers) can create or hide a pattern.

How to make a scatter plot with Graph Maker

  1. Open the Scatter Plot Maker.
  2. Add a title and axis titles, such as "Hours Studied vs Exam Score", "Hours studied" and "Exam score".
  3. Enter your numbers. Type the X values in one box and the Y values in the other, separated by commas, spaces or new lines; you can paste two spreadsheet columns. The first X pairs with the first Y, and so on. If one list is longer, the tool warns you and uses only the complete pairs.
  4. Keep Show trend line ticked to draw the line of best fit. Its equation and R² appear under the chart.
  5. Tick Connect the points in order of X only if your data form a sequence, such as measurements over time. Ordinary scatter plots leave the points unconnected.
  6. Pick the colors of the points, the trend line, the background, the title and the axis text.
  7. Check the figures under the chart: the number of points, the correlation r, R², the slope, the intercept and a plain-language description of the relationship.
  8. Download the scatter plot as a PNG, JPG or SVG.

Frequently asked questions

What does a scatter plot show?

Whether two numeric variables are related: points rising to the right show a positive relationship, falling to the right a negative one, and a shapeless cloud little or no relationship.

What is a good R² value?

It depends on the field. In controlled experiments, values above 0.9 are common; for messy real-world data such as people's behavior, an R² of 0.3 can still be meaningful. A high R² describes how well a straight line fits, not whether the relationship is causal.

What if the points follow a curve?

Then a straight trend line is the wrong summary, and r will understate the relationship. Look at the plot first; if the pattern bends, describe it in words or use a curved model in a statistics tool.

Share this post :