Intermediate

Scatter Plot Calculator — Correlation & Linear Regression

Enter your X and Y values to visualise a scatter plot, measure the strength and direction of the linear relationship with Pearson r, and fit a least-squares regression line.
Comma or space separated
Must match the number of X values
Correlation (r)
0.9643

Pearson correlation: −1 = perfect negative, 0 = none, +1 = perfect positive

Data points (n)
7
0.9298
Mean X
4
Mean Y
5
Regression slope
0.9643
Regression line
y = 0.9643x + 1.1429
Step by step
  1. 1

    Mean X

    x̄ = Σx ÷ 7 = 4
  2. 2

    Mean Y

    ȳ = Σy ÷ 7 = 5
  3. 3

    Cross-deviations Σ(x−x̄)(y−ȳ)

    27
    Sum of products of each point's deviation from its mean.
  4. 4

    √(Sxx × Syy)

    √(28 × 28) = 28
    Denominator: geometric mean of the X and Y variance sums.
  5. 5

    Pearson r

    27 ÷ 28 = 0.9643
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Enter X and Y lists to plot a scatter chart and compute Pearson r = Σ(x−x̄)(y−ȳ)/√(SxxSyy). R² reports variance explained (0–1). The least-squares line y = bx + a has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄. Values near |r| = 1 indicate a strong linear relationship.

Formula
r = Σ(x−x̄)(y−ȳ) / √[Σ(x−x̄)²·Σ(y−ȳ)²] • slope b = Σ(x−x̄)(y−ȳ) / Σ(x−x̄)²
How this is calculated

Enter your X values and matching Y values as comma- or space-separated lists of the same length (minimum 2 points). Each X is paired with the Y at the same position to form an (x, y) data point on the scatter plot.

The Pearson correlation coefficient r measures the strength and direction of the linear relationship. It is computed as the sum of cross-deviation products Σ(x−x̄)(y−ȳ) divided by the geometric mean of the X and Y variances. r = +1 is a perfect positive linear relationship, r = −1 is perfect negative, and r = 0 indicates no linear pattern. R² = r² reports the fraction of Y-variance explained by the fitted line.

The least-squares regression line y = bx + a has slope b = Σ(x−x̄)(y−ȳ) / Σ(x−x̄)² and intercept a = ȳ − b·x̄. The line always passes through the mean point (x̄, ȳ). Note that r and the regression line describe only linear relationships; a curved association may have r ≈ 0 even if the data are strongly related. Outliers can heavily influence r — always inspect the scatter plot alongside the number.

Frequently asked questions

Pearson r quantifies the strength and direction of the linear relationship between two variables. Values above +0.8 or below −0.8 are considered strong; values near 0 are weak. r does not imply causation, only correlation.

r (correlation) ranges from −1 to +1 and shows both strength and direction. R² = r² ranges from 0 to 1 and gives the proportion of Y-variance explained by the linear model — it discards direction information.

At least two valid, matching (x, y) pairs are required. If all X values are identical (zero X-variance) the slope and r are undefined. Also check that both lists have the same number of numeric entries.

Also known as

scatter plot calculator
pearson correlation calculator
correlation coefficient scatter
scatter graph tool
linear regression scatter plot
r squared scatter
data points correlation

APA

TG we-Calculate Editorial Team. (2026). Scatter Plot Calculator — Correlation & Linear Regression [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/scatter-plot-calculator

Chicago

TG we-Calculate Editorial Team. "Scatter Plot Calculator — Correlation & Linear Regression." TG we-Calculate. 2026. https://we-calculate.com/calculator/scatter-plot-calculator.

IEEE

TG we-Calculate Editorial Team, "Scatter Plot Calculator — Correlation & Linear Regression," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/scatter-plot-calculator

BibTeX

@misc{wecalculate_scatter_plot_calculator, title = {Scatter Plot Calculator — Correlation & Linear Regression}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/scatter-plot-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?