Scatter plot maker

Paste your x and y values to get a clean scatter plot, a trend line and the correlation, with every step of the math shown.

  • Free, no sign-up
  • Step-by-step working
  • Runs in your browser

Separate values with commas, spaces or new lines. You can paste a column straight from Excel or Google Sheets. The first x pairs with the first y, and so on.

How to use the scatter plot maker

  1. Type or paste your x values in the first box and the matching y values in the second. Both lists need the same number of values.
  2. Add a chart title and axis labels, including units, so the chart makes sense on its own.
  3. Leave Show trend line on to draw the least-squares line, or turn it off for a plain scatter plot.
  4. Click Make scatter plot. You'll get the chart, the correlation coefficient r, the equation of the line and the full working.
  5. Click Download PNG to save the chart for your report, homework or slides.

The formulas behind the trend line

The trend line is the least-squares regression line: the straight line that makes the squared vertical distances from the points to the line as small as possible. Its equation is

ŷ = a + bx

The slope, intercept and correlation coefficient are calculated as:

b = Σ(x − x)(y − y)Σ(x − x)2

a = y − bx

r = Σ(x − x)(y − y)Σ(x − x)2 · Σ(y − y)2

x, y
The paired values: one x and one y for each observation
x, y
The mean of the x values and the mean of the y values
Σ
"Add up", over every pair
b
The slope: the average change in y for each one-unit increase in x
a
The intercept: the predicted y when x is 0
ŷ
The predicted ("fitted") value of y on the line
r
Pearson's correlation coefficient, from −1 to 1
r2
The coefficient of determination: the share of the variation in y explained by the line

Worked example

A small shop tracks its weekly ad spend and sales, both in thousands of dollars, for five weeks. Does spending more on ads go with higher sales?

Ad spend x: 1, 2, 3, 4, 5 · Sales y: 2, 4, 5, 4, 5

  1. Find the mean of each variable
    x = 1 + 2 + 3 + 4 + 55 = 3    y = 2 + 4 + 5 + 4 + 55 = 4
  2. Find each deviation from the mean, then the products and squares
    xyx − xy − y(x − x)(y − y)(x − x)²(y − y)²
    12−2−2444
    24−10010
    3501001
    4410010
    5521241
    Sum006106
  3. Slope
    b = 610 = 0.6
  4. Intercept
    a = 4 − 0.6 × 3 = 2.2
  5. Correlation coefficient
    r = 610 × 6 = 67.746 = 0.775
  6. Trend line and r²
    ŷ = 2.2 + 0.6x    r2 = 0.775² = 0.6

What it means: there's a strong positive relationship. Each extra $1,000 of ad spend goes with about $600 more in weekly sales on average, and the line explains 60% of the week-to-week variation in sales. With only five weeks of data, though, the shop should collect more before drawing firm conclusions. Click Load example in the tool above to try a larger data set.

How to read a scatter plot

Look at four things, in this order:

  • Direction. If the dots rise from left to right, the relationship is positive (r > 0). If they fall, it's negative (r < 0).
  • Form. Do the points follow a straight line, a curve, or no pattern at all? The correlation coefficient and trend line only describe straight-line relationships.
  • Strength. The tighter the points cluster around the line, the stronger the relationship and the closer r is to 1 or −1.
  • Unusual points. A single outlier can pull the line and change r a lot. Check whether it's a data-entry mistake before removing it.

A common rule of thumb for the size of r (ignoring the sign):

|r|Strength of the linear relationship
0 to 0.19Very weak or none
0.20 to 0.39Weak
0.40 to 0.59Moderate
0.60 to 0.79Strong
0.80 to 1Very strong

The slope is often the most useful number in practice: it tells you how much y changes, on average, for each one-unit increase in x, in the units you measured. And r² tells you how much of the spread in y the line accounts for. Remember that even a very strong correlation doesn't prove that x causes y.

Frequently asked questions

What is a scatter plot used for?

A scatter plot shows the relationship between two numeric variables measured on the same things, such as hours studied and exam score for each student. Each dot is one observation. It helps you see whether the variables move together, how strongly, whether the pattern is a straight line or a curve, and whether any points are unusual.

Which variable goes on the x-axis?

Put the explanatory variable (the one you think influences the other, or the one you control) on the x-axis, and the response variable on the y-axis. For example, ad spend goes on x and sales on y. If neither variable drives the other, either order is fine, but the trend line and slope will change if you swap them.

What is a good correlation coefficient?

It depends on the field. As a rough guide, an r closer to 1 or −1 means a stronger straight-line relationship: about 0.1 is weak, 0.3 is moderate and 0.5 or more is strong in many social science settings, while lab measurements often show values above 0.9. Always look at the plot too, because one outlier or a curved pattern can make r misleading.

Does a strong correlation mean x causes y?

No. Correlation only says the two variables move together. A third factor may drive both (ice cream sales and drowning both rise in summer), or the cause may run the other way. To show cause and effect you need a controlled experiment or careful study design.

How many data points do I need?

You need at least 3 pairs to fit and judge a line, but with so few points the correlation is very unstable. Around 20 or more pairs gives a much more trustworthy picture. This tool accepts up to 5,000 pairs.

Can I use the chart in a report or assignment?

Yes. Click "Download PNG" to save a high-resolution image with a white background, then insert it into Word, Google Docs, PowerPoint or Slides. The chart is yours to use; a credit to StatHow is appreciated but not required.

Last reviewed November 10, 2026