Scatter Plot Generator

Enter your X values and Y values (one pair per line) to generate a scatter plot with instant correlation analysis. Add an optional chart title and axis labels, then choose whether to overlay a line of best fit and highlight outliers. You get back a visual scatter plot plus key statistics: Pearson correlation coefficient (r), R² value, regression equation, and correlation strength classification.

Enter one X value per line. Must match the number of Y values.

Enter one Y value per line. Must match the number of X values.

Overlay a linear regression trendline on the scatter plot.

Marks data points that fall more than 2 standard deviations from the regression line.

Results

Pearson Correlation (r)

--

R² (Coefficient of Determination)

--

Regression Equation

--

Correlation Strength

--

Number of Data Points (n)

--

Slope (m)

--

Y-Intercept (b)

--

Scatter Plot

Results Table

Frequently Asked Questions

How do I create a scatter plot with a regression line using this tool?

Enter your X values in the left text box and corresponding Y values in the right text box — one value per line. Make sure both lists have the same number of entries. Check the 'Show Line of Best Fit' option and click Generate. The tool will render your scatter plot and overlay the linear regression line automatically.

What is the Pearson correlation coefficient (r) and what does it mean?

The Pearson correlation coefficient (r) measures the strength and direction of the linear relationship between your X and Y variables. Values range from -1 to +1: r near +1 means a strong positive correlation, near -1 means a strong negative correlation, and near 0 means little to no linear relationship.

How do I interpret the R² value?

R² (the coefficient of determination) tells you what proportion of the variation in Y is explained by X. For example, an R² of 0.85 means that 85% of the variability in Y can be explained by the linear relationship with X. The remaining 15% is due to other factors or random variation.

What does it mean to highlight outliers on the scatter plot?

When outlier highlighting is enabled, data points whose residuals (the difference between actual Y and predicted Y) are more than 2 standard deviations from the regression line are marked distinctly. These points may be measurement errors, special cases, or genuinely unusual observations worth investigating.

How is the regression equation calculated?

The regression equation takes the form y = mx + b, where m is the slope and b is the y-intercept. The tool uses the ordinary least squares (OLS) method, minimising the sum of squared residuals to find the best-fitting straight line through your data points.

Can this scatter plot generator handle non-linear data?

This tool fits a linear (straight-line) regression model. If your data follows a curve, the linear r and R² values will be lower, indicating a poor linear fit. For non-linear relationships you would need polynomial or logarithmic regression, which is outside the scope of this tool. The scatter plot itself will still display your data accurately regardless of its shape.

How many data points do I need for a meaningful scatter plot?

A minimum of 3 data points is required to generate a regression line, but at least 10–20 points are recommended for statistically meaningful correlation results. With very small samples, even a high r value may not be statistically significant. The table below the chart shows all individual points and their residuals for your review.

Is this scatter plot generator free, and do I need to install anything?

Yes, the scatter plot generator is completely free and runs entirely in your browser — no installation, sign-up, or software download required. Your data stays on your device and is never stored or transmitted.

More Math Tools