Scatter Plot Maker

Paste x and y values and get a scatter plot with the line of best fit, its equation, r and R².

Paste two columnsLine of best fit, r and R²Editable SVG + 300 DPI PNG

1 series · 10 points · read as x and y columns

Try sample data:
Line of best fit
Point size
Colors
Shape
PNG is 2400 px wide; SVG keeps text editable.
Line of best fit (least squares)
SeriesnEquationrR²Correlation
All points10y = 4.968x + 47.040.98320.9667Very strong positive

Correlation words use a common rule of thumb for |r|: under 0.1 little or none, 0.1–0.4 weak, 0.4–0.7 moderate, 0.7–0.9 strong, 0.9 and above very strong. Your course may use different cut-offs.

Show steps
  1. 1. Means of x and yx̄ = 44 / 10 = 4.4; ȳ = 689 / 10 = 68.9
xyx − x̄y − ȳ(x − x̄)(y − ȳ)(x − x̄)²(y − ȳ)²
152-3.4-16.957.4611.56285.61
255-2.4-13.933.365.76193.21
261-2.4-7.918.965.7662.41
360-1.4-8.912.461.9679.21
468-0.4-0.90.360.160.81
5700.61.10.660.361.21
6741.65.18.162.5626.01
6791.610.116.162.56102.01
7822.613.134.066.76171.61
8883.619.168.7612.96364.81
4468900250.450.41286.9
  1. 2. Slopem = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² = 250.4 / 50.4 = 4.968
  2. 3. Interceptb = ȳ − m · x̄ = 68.9 − 4.968 × 4.4 = 47.04
  3. 4. Line of best fity = 4.968x + 47.04
  4. 5. r and R²r = Σ(x − x̄)(y − ȳ) / √(Σ(x − x̄)² · Σ(y − ȳ)²) = 250.4 / √(50.4 × 1286.9) = 0.9832; R² = r² = 0.9667

The plot and the statistics are computed on this page as you type. When you download the plot, the data and settings are saved to your history so you can reopen and edit it later. Text you submit to Describe with AI is sent to a language model to be read.

Scatter Plot Examples

Each figure below is what this scatter plot maker draws from the sample data in the tool, unedited. The car data come from R's mtcars dataset and set III from Anscombe's quartet; the other datasets are made up for demonstration. Open one in the tool to see its numbers and change any setting.

Scatter plot of test score against hours studied for 10 students with the line of best fit y = 4.968x + 47.04 and R² = 0.9667

Scatter plot with line of best fit

Hours studied and test scores for 10 students, with the least-squares line, its equation and R². This is the dataset worked by hand in the sections below.

Scatter plot of leaf width against leaf length for maple, oak and willow in three colors, each with its own line of best fit and R²

Scatter plot with groups

Leaf length and width for three tree species, read from a column that names each leaf's species. Each group gets its own color and its own line, so you can compare the slopes.

Labeled scatter plot of miles per gallon against car weight for 12 cars from mtcars, with a negative line of best fit, R² = 0.8236 and r = −0.9075

Scatter plot with labels

Weight and fuel economy for 12 of the 32 cars in R's mtcars dataset. A text column with a different name on every row becomes the point labels, placed so they avoid each other.

Scatter plot of ice creams sold against temperature for a beach kiosk (circles) and a town café (squares), each with its own line of best fit and equation

Scatter plot with two sets of data

One temperature column and two sales columns. Each y column becomes a series with its own marker shape, so the plot still reads in black and white.

Scatter plot of Anscombe's quartet set III with one outlier at x = 13 and the line of best fit y = 0.4997x + 3.002, R² = 0.6663, r = 0.8163

How one outlier moves the line

Set III of Anscombe's quartet. Ten points lie almost exactly on one line; the eleventh pulls the least-squares line up and lowers r to 0.8163. Plot your data before trusting r.

Scatter plot of quiz score against shoe size showing no clear pattern, with R² = 0.0288 and r = −0.1696

Scatter plot with no correlation

Shoe size and quiz score for 12 students. The points form a shapeless cloud and r is −0.17, close to zero, so the line explains almost none of the variation.

What is a scatter plot?

A scatter plot is a graph that shows the relationship between two numeric variables, with one point for each pair of values. It is also called a scatter graph, scatter diagram, scattergram or XY chart. Each observation is one point: its x value sets how far along the horizontal axis it sits, and its y value how high it sits. The x axis usually holds the explanatory variable (the one you change or that comes first) and the y axis the response.

The pattern of the points shows whether the two variables are related: the direction (do they rise together or move in opposite directions), the strength (how tightly the points follow a line), the form (straight or curved) and any outliers. A line of best fit, also called a trend line or regression line, summarizes a straight-line pattern with an equation, y = mx + b, that you can use to describe the relationship and make predictions.

How to make a scatter plot, step by step

To make a scatter plot, put one variable on each axis, scale both axes to cover your data, plot one point for each pair of values, then describe the pattern and add a line of best fit. Here are the five steps on one small dataset: the hours 10 students studied and the score each one got on a test.

Hours studied (x)1223456678
Test score (y)52556160687074798288
  1. Choose the x and y variables

    Put the explanatory variable on the x axis and the response on the y axis. Study time may affect the score, not the other way round, so hours studied goes on x and test score on y. Label each axis with the variable name and its units.

  2. Scale both axes

    Each axis must cover its smallest to largest value with even steps: hours run from 1 to 8, so mark the x axis 0 to 8 in steps of 1 or 2; scores run from 52 to 88, so mark the y axis from 50 to 90 in steps of 10. The axes do not have to start at 0; if one does not, many teachers ask for a zigzag break near the origin.

  3. Plot each pair as a point

    For the first student, go across to 1 on the x axis and up to 52, and draw a dot at (1, 52). Repeat for all 10 pairs. Two students studied 2 hours, so there are two dots above x = 2. Do not join the dots: a scatter plot shows separate observations, not a sequence.

  4. Describe the pattern

    Read the cloud of points from left to right. Here the scores rise as hours rise (positive direction), the points follow a straight path (linear form) and they stay close to it (strong). No point sits far from the others, so there are no clear outliers.

  5. Add the line of best fit

    Draw a straight line through the middle of the points with about as many points above it as below, or calculate it exactly with least squares (worked in the next section). For this data the line is y = 4.968x + 47.04, so a student who studies 5 hours would be predicted to score about 4.968 × 5 + 47.04 ≈ 72.

Scatter plot of the 10 students' test scores against hours studied, drawn by the tool, with the line y = 4.968x + 47.04, R² = 0.9667 and r = 0.9832
The same 10 points in this scatter plot maker, with the equation, R² and r turned on.

How to find the line of best fit (least squares)

The line of best fit that Excel, Google Sheets, the TI-84, Desmos and this tool draw is the least-squares regression line: of all straight lines, it is the one that makes the sum of the squared vertical distances from the points to the line as small as possible. Its slope and intercept come from two formulas:

  • Slope: m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)²
  • Intercept: b = ȳ − m · x̄

where x̄ and ȳ are the means of x and y. Here is the study-time data from the steps above, computed by this tool:

xyx − x̄y − ȳ(x − x̄)(y − ȳ)(x − x̄)²
152-3.4-16.957.4611.56
255-2.4-13.933.365.76
261-2.4-7.918.965.76
360-1.4-8.912.461.96
468-0.4-0.90.360.16
5700.61.10.660.36
6741.65.18.162.56
6791.610.116.162.56
7822.613.134.066.76
8883.619.168.7612.96
44689Sums250.450.4
  • x̄ = 44 / 10 = 4.4, ȳ = 689 / 10 = 68.9
  • m = 250.4 / 50.4 = 4.968
  • b = 68.9 − 4.968 × 4.4 = 47.04
  • y = 4.968x + 47.04, r = 0.9832, R² = 0.9667

So the line of best fit is y = 4.968x + 47.04. The slope says each extra hour of study goes with about 5 more points on the test, on average. The intercept, 47.04, is the predicted score for 0 hours; it sits outside the data (the fewest hours studied was 1), so treat it as the place the line crosses the axis rather than a real prediction.

r = 0.9832 measures how closely the points follow the line, from −1 to 1, and R² = 0.9667 says the line accounts for about 97% of the variation in scores. Open Show steps under the table in the tool to get this same working for your own data, with every row and sum, and to predict y for any x.

How to Use This Scatter Plot Maker

Three steps in your browser

The plot and the line of best fit redraw as you type, so you can try a setting and see the effect straight away.

1

Paste Your x and y Values

Copy two columns from Excel or Google Sheets (x first, then y, with names in the first row if you have them) and paste, or open a CSV file. For two sets of data, add more y columns or a group column; a text column with a different name on every row becomes point labels. Numbers buried in a paragraph or a PDF? Paste them into Describe with AI.

2

Add the Line and Style the Plot

Turn on the line of best fit (one per series or one for all points) and choose what to show on the plot: the equation, R² and r. Type a title and axis labels, start the axes at 0 if your teacher asks for it, and pick colors or marker shapes.

3

Download and Copy the Results

Download a 300 DPI PNG for Google Docs, Word or slides, or an SVG whose text stays editable. Copy the table of equations, r and R², or open Show steps to check the slope and intercept against your own working.

How to read a scatter plot: correlation, r and outliers

Describe a scatter plot by four things:

  • Direction. Points rising from left to right show a positive correlation (taller people tend to weigh more); points falling show a negative correlation (heavier cars tend to get fewer miles per gallon). A shapeless cloud means no correlation.
  • Strength. The tighter the points hug a line, the stronger the relationship. The correlation coefficient r puts a number on it: r = 1 is a perfect rising line, r = −1 a perfect falling line, and r near 0 means no straight-line relationship.
  • Form. If the points bend, a straight line is the wrong summary, and r can be small even when the two variables are clearly related.
  • Outliers and clusters. A single point far from the rest can pull the line toward it, as in the Anscombe example above.

Two cautions apply to every scatter plot. Correlation is not causation: ice cream sales and sunburn rise together because both follow the weather. And look before you trust r: Anscombe's four datasets share the same r, 0.816, and the same line, yet look completely different when plotted. If you have one measurement per subject in several groups rather than two measurements per subject, compare the groups with a box plot instead.

r vs R²: what's the difference?

r, the Pearson correlation coefficient, runs from −1 to 1. Its sign gives the direction of the relationship and its size the strength. R², the coefficient of determination, runs from 0 to 1 and is the share of the variation in y that the line accounts for. For a straight line fitted to one x variable, R² is simply r squared: r = 0.9 gives R² = 0.81.

Report r when the question is how strongly two variables are related, and R² when the question is how well the line predicts y. R² loses the sign, so with R² alone readers cannot tell a rising line from a falling one; the equation's slope tells them. This tool shows both, along with a correlation word (weak, moderate, strong) based on a common rule of thumb.

What data can you paste?

Paste numbers in any of these layouts:

LayoutLooks likeUse when
x and y columnsHours, Score in row 1, pairs belowOne set of paired data, as in most class exercises
One x column, several y columnsTemperature, Kiosk, CaféTwo or more sets of data measured at the same x values
Group columnspecies, length, width per rowData exported from R, Python, SPSS or a form
Label columncar, weight, mpg with a different name per rowYou want the name written next to each point
Ordered pairs(1, 52), (2, 55), (3, 61)Copied from a worksheet or textbook
RowsHours, 1, 2, 3 and Score, 52, 55, 61 on two linesThe table in your worksheet runs sideways

Tabs (what spreadsheets copy), commas, semicolons and spaces all work. Rows with a missing x or y are left out, and cells such as NA are skipped and counted under the box. The first column of numbers is always used as x.

Scatter plots in Excel, Google Sheets, Desmos, the TI-84, R and Python

  • Excel: select the two columns, then Insert › Insert Scatter (X, Y) › Scatter. For the line, right-click a point › Add Trendline › Linear, and tick Display Equation on chart and Display R-squared value on chart.
  • Google Sheets: select the columns, Insert › Chart, set Chart type to Scatter chart, then in Customize › Series tick Trendline and set Label to Use Equation and tick Show R².
  • Desmos: type the pairs into a table, then in a new line type y1 ~ mx1 + b to get m, b, r and R².
  • TI-84: enter x in L1 and y in L2, turn on STAT PLOT with the scatter type, then STAT › CALC › LinReg(ax+b). Turn on DiagnosticOn to see r and r².
  • R: ggplot(df, aes(x, y)) + geom_point() + geom_smooth(method = "lm"), with summary(lm(y ~ x, data = df)) for the numbers.
  • Python: plt.scatter(x, y) in matplotlib, with numpy.polyfit(x, y, 1) or scipy.stats.linregress(x, y) for the line.

All of these fit the line by least squares, so on the same data they give the same slope, intercept, r and R² as this tool, up to rounding. Use this page when you need the figure now, want the working shown, or want labeled points and several groups without building the chart by hand.

What if the points curve?

This tool fits straight lines only. If your points bend (growth that speeds up, a curve that levels off, a U shape), a straight line will miss the pattern and r will understate how related the variables are. For a curve of best fit, use Desmos (y1 ~ a·x1² + b·x1 + c or y1 ~ a·b^x1), Excel's Exponential, Logarithmic, Polynomial or Power trendlines, or geom_smooth() in R. A scatter plot from this tool, with the line turned off, is still a good way to see the shape first.

What to include with a scatter plot in a report

Whoever reads your figure, a teacher, a lab supervisor or a reviewer, will look for the same things:

  1. Axis labels with units: Weight (1,000 lb), not Weight.
  2. n, the number of points, in the caption or the text.
  3. The line's equation and r or R², if you drew a line, with the slope interpreted in words.
  4. Which variable is x, and why: the explanatory variable goes on x.
  5. A test of significance if your course asks for a p-value. This tool reports the equation, r and R² only, so get the p-value from Excel's Data Analysis › Regression, a TI-84 LinRegTTest, R or SPSS.

A caption you can adapt: “Scatter plot of test score against hours studied for 10 students. The line is the least-squares fit, y = 4.968x + 47.04 (R² = 0.967).”

What This Scatter Plot Maker Does

Built for numbers you can check

Every point, line and statistic is computed on this page from the values in the data box. AI only reads your text into numbers when you ask it to; nothing is drawn by an image model, so the line on the plot is exactly the one in the table.

Scatter plot drawn by the tool with the line of best fit and the box y = 4.968x + 47.04, R² = 0.9667, r = 0.9832Line

Line of Best Fit, Equation, r and R²

Least squares, like Excel and the TI-84

Turn on the line and choose what to write on the plot: y = mx + b, R² and the correlation coefficient r. The box moves to the emptiest corner.

Scatter plot of three tree species in three colors, each with its own line of best fitGroups

Several Groups on One Plot

A color and a line for each

A group column or extra y columns become separate series, each with its own color, line and equation, or one line for all points.

Scatter plot of car weight and fuel economy with each car's name written next to its pointLabels

Labels Next to the Points

From a name column

A text column with a different name on every row is written beside each point, placed to avoid the other labels and points.

Black and white scatter plot with two sets of data drawn as circles and squaresPrint

Marker Shapes for Black and White

Circles, squares, triangles

Give each series its own marker shape, or switch to black points, so the plot still reads on a printed worksheet or in a grayscale journal.

Screenshot of the scatter plot maker preview with the PNG (300 DPI) and SVG (editable) download buttons and the table of equationsExport

Editable SVG and 300 DPI PNG

Docs, slides, posters

The SVG keeps real text, so labels stay editable in PowerPoint, Illustrator or Inkscape. The PNG carries 300 DPI and sits at the right size in Word and Google Docs.

Screenshot of Show steps: means, a table of deviations and products with sums, then the slope, intercept, r and R²Steps

Show the Working

Check it against your own notes

Open Show steps to see the means, a table of x − x̄, y − ȳ and their products, the slope, intercept, r and R², and predict y for any x.

Scatter Plot Maker — Common Questions

FAQ

Pasting data, adding the line of best fit, changing settings and downloading the SVG and the 300 DPI PNG are free, and the downloads carry no watermark; that part runs in your browser and never uses credits. Describe with AI uses 2 credits per run. New accounts get 5 credits plus daily check-in credits, and paid plans and credit packs are on the pricing page.

Set Line of best fit to On (or One per series for several groups) and the least-squares line is drawn through your points. Turn on Show the equation, Show R² and Show r to write y = mx + b and the statistics on the plot; the same numbers are in the table under the plot.

Yes. Excel's linear trendline, SLOPE and INTERCEPT, Google Sheets' trendline, the TI-84's LinReg(ax+b), Desmos' y1 ~ mx1 + b and R's lm() all use least squares, the same method as this tool, so on the same data the slope, intercept, r and R² agree up to rounding. The tool shows coefficients to 4 significant figures and r and R² to 4 decimal places.

Paste one x column followed by a y column for each set, for example Temperature, Kiosk, Café, or paste three columns with a group name on each row. Each set becomes a series with its own color and its own line of best fit; choose One for all points for a single line, and turn on Different marker shapes for black-and-white printing.

Yes. Add a text column with a different name on each row, such as a car model or a country, and the names are written next to the points, placed to avoid overlapping each other. Turn Label the points off to hide them.

r, the correlation coefficient, runs from −1 to 1: the sign gives the direction and the size the strength of the straight-line relationship. R² runs from 0 to 1 and is the share of the variation in y that the line accounts for. With one x variable, R² equals r squared. As a rough guide, |r| above 0.7 is usually called strong and below 0.4 weak, though courses differ. Remember that even a strong correlation does not show that one variable causes the other.

Yes. Select the x column and the y column (names in the first row are optional), copy, and paste into the data box. Spreadsheets copy cells as tab-separated text, which the tool reads directly. You can also save the sheet as CSV and open it with Open CSV.

No. This tool fits straight lines only. For a quadratic, exponential or logarithmic curve of best fit, use Desmos, Excel's trendline options or R; you can still use this tool to plot the points and see the shape first.

Yes. Open Show steps under the table to see the means of x and y, a row-by-row table of x − x̄, y − ȳ, their product and squares with the sums, then the slope, intercept, r and R² worked from those sums. You can also type an x value to predict y from the line.

Yes, as an image. Download the 300 DPI PNG and insert it into Google Slides, PowerPoint, Keynote, Google Docs or Word, where it stays sharp. In PowerPoint for Microsoft 365 you can also insert the SVG and use Convert to Shape to edit labels and colors.

The plot is drawn in your browser, so nothing is uploaded while you type and edit. When you download a plot, its data and settings are saved to your history (your account, or this browser if you are not signed in) so you can reopen it. Text you submit to Describe with AI is sent to a language model to be read and is saved the same way.

Yes. Switch to Describe with AI and paste text that contains the paired numbers, such as a table or sentences copied from a report. A text model copies only the numbers in your text into the data box, and the plot, the line of best fit, r and R² are computed by code from them; points whose numbers do not appear in your text are dropped. If you describe a relationship without giving numbers, the plot is an illustrative example labeled 'Simulated data', for teaching or trying layouts, never as results. It uses 2 credits per run; pasting data yourself stays free.

No. The tool reports the equation, r, R² and n, but not a p-value or a significance test. To test whether r differs from zero, use Excel's Data Analysis › Regression (Analysis ToolPak), a TI-84 LinRegTTest, JASP, R's cor.test() or SPSS, and report the p-value next to r.

Yes. ChatGPT can draw a scatter plot and fit a line with Python, but you have to ask for the equation, r and R², and the image it returns is not easy to edit. Here you paste your x and y values and get the textbook y = mx + b, r and R² on the plot, Show steps for the working, and an SVG whose labels you can still change.

Yes. Type a chart title and the x and y axis labels with units, then download a 300 DPI PNG to drop into your lab report, Google Doc or science fair board, or an SVG you can edit later. When you download, the data and settings are saved to your history, so you can reopen the plot the next day and keep editing.

Make Your Scatter Plot Now

Paste your x and y values, add the line of best fit, download an editable SVG or a 300 DPI PNG. Free, and drawn in your browser.

Featured on Findly.tools