Skip to main content
Pearson+ LogoPearson+ Logo
All Calculators & ConvertersAll calculators

Enter data

Tip: Paste from Excel/Sheets. Commas, tabs, and spaces all work.

One point per line. Each line: x then y (comma / tab / space).

Options

We’ll compute ŷ = a + bx.

We’ll compute x = (y − a)/b (if b ≠ 0).

Chips prefill values and calculate immediately.

Result

No results yet. Enter data and click Calculate.

How to use this calculator

  • Choose Pairs, Lists, or Summary stats.
  • Click Calculate to get ŷ = a + bx, r, and .
  • Use Predict to compute ŷ for a chosen x.
  • Turn on Residuals if you want error-by-point.

How this calculator works

  • Compute means , ȳ.
  • Compute sums Sxx, Sxy, Syy.
  • Slope: b = Sxy/Sxx.
  • Intercept: a = ȳ − b·x̄.
  • Correlation: r = Sxy/√(Sxx·Syy), and R² = r².

Formula & Equation Used

Regression line: ŷ = a + bx

Slope: b = Sxy/Sxx

Intercept: a = ȳ − b·x̄

Correlation: r = Sxy / √(Sxx·Syy)

Residual: e = y − ŷ

Example Problem & Step-by-Step Solution

Example 1 — Study hours vs exam score

  1. Data points: (1, 55), (2, 58), (3, 65), (4, 70), (5, 74)
  2. Compute and ȳ, then Sxx and Sxy.
  3. Slope: b = Sxy/Sxx, Intercept: a = ȳ − b·x̄.
  4. Final line: ŷ = a + bx lets you predict scores from hours.

Example 2 — Negative correlation (more gaming, lower grade)

  1. Data points: (1, 92), (2, 88), (3, 83), (4, 79), (5, 73)
  2. The slope b comes out negative → y tends to decrease as x increases.
  3. r will be negative; tells how tight the trend is.

Example 3 — Summary stats (exam-style)

  1. Given: n = 10, x̄ = 5, ȳ = 70, Sxx = 40, Sxy = 60, Syy = 120
  2. Slope: b = 60/40 = 1.5
  3. Intercept: a = 70 − 1.5·5 = 62.5
  4. So the line is ŷ = 62.5 + 1.5x

Frequently Asked Questions

Q: What does a negative slope mean?

It means that as x increases, y tends to decrease.

Q: What does R² mean?

It’s the fraction of variability in y explained by x (for a linear model).

Q: Why do I see an “extrapolation” warning?

Because your x is outside the data range—predictions can be unreliable there.