Site icon Codanics

Correlation and Regression Calculator

Correlation and Regression Calculator: free online tool by Codanics that runs in your browser
Statistics

Correlation and Linear Regression Calculator with Scatter Plot

Paste two columns of numbers to see how strongly they move together. You get Pearson’s r, Spearman’s ρ, the regression line, R² and a clean scatter plot for your thesis.

100% freeNo sign-upRuns in your browser
Correlation and Regression Calculator🔒 Your data never leaves your device

How to use the Correlation and Regression Calculator

  1. Type or paste your X values in the first box and your Y values in the second, in the same order. Or use Paste from Excel or Upload CSV / Excel and pick the two columns; rows with a missing value are skipped.
  2. Rename the variables so the sentence and chart labels make sense.
  3. Click Calculate to get Pearson’s r, Spearman’s ρ, the regression equation, R² and a scatter plot.
  4. Optionally type an X value to predict Y, with a prediction interval.
  5. Copy the APA sentence and download the scatter plot.

Pearson or Spearman?

Pearson rSpearman ρ
MeasuresLinear relationshipMonotonic relationship (always up or always down)
DataTwo continuous, roughly normal variablesOrdinal data, skewed data or outliers
Sensitive to outliers?Yes, stronglyMuch less

Formulas

Pearson r r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² Σ(y − ȳ)²] Test t = r √(n − 2) / √(1 − r²), df = n − 2 95% CI tanh( atanh(r) ± 1.96 / √(n − 3) ) (Fisher z) Spearman ρ Pearson r computed on the ranks (average ranks for ties) Regression b = Sxy / Sxx, a = ȳ − b x̄, R² = r²
Correlation is not causation. A strong r tells you that two variables move together, not that one causes the other. Always plot your data, because a single outlier or a curved pattern can make r misleading.
Learn the statistics behind these numbers. Codanics has free statistics, R and Python lessons on YouTube and full courses for researchers.

Frequently asked questions

What is a strong correlation?

A common rule of thumb for |r|: below 0.1 negligible, 0.1–0.3 weak, 0.3–0.5 moderate, 0.5–0.7 strong and above 0.7 very strong. What counts as strong depends on your field; in social sciences r = 0.3 is often meaningful.

What does R² mean?

R² is the proportion of variation in Y explained by X. An R² of 0.64 means 64% of the differences in Y are accounted for by the straight-line relationship with X.

Is the Spearman p-value exact?

This tool uses the t approximation for Spearman’s ρ, which is accurate for about 10 or more pairs. For very small samples, exact tables or R’s cor.test give slightly different p-values.

Can I do multiple regression here?

No, this calculator handles one predictor (simple linear regression). For several predictors, use R, Python, SPSS or JASP.

How do I report a correlation in APA style?

Write r(df) = value, p = value, where df = n − 2, for example r(8) = .98, p < .001. Leave out the leading zero, because r cannot exceed 1.

Is my data private?

Yes. Everything is calculated in your browser.

More free tools

See all Codanics tools →

Made by Dr. Muhammad Aammar Tufail, Codanics. Found a bug or have an idea for a new tool? Tell us on the WhatsApp channel or in the YouTube comments. Results are for learning and planning; check important analyses with a statistician or your supervisor.
Exit mobile version