▚DATAJIN

Correlation coefficient calculator (Pearson and Spearman)

A correlation coefficient measures how strongly two variables move together, from −1 (perfect negative) through 0 (no relationship) to +1 (perfect positive). Pearson’s r measures linear association; Spearman’s ρ uses ranks and captures any monotonic relationship, so it is robust to outliers and skewed data.

No sign-up, nothing to install. Calculations run in your browser; the worksheets, results and charts you create are stored by AI Walay to improve DATAJIN.

When to use it

  • Asking whether two measurements are related, such as height and weight.
  • Pearson for roughly normal, linearly related data; Spearman for ranks, ordinal scales, outliers or curved but monotonic trends.

Assumptions

  • Pairs of values sit on the same row; observations are independent.
  • Pearson: the relationship is linear and there are no extreme outliers.
  • Correlation does not imply causation.

How to run it in DATAJIN

  1. Put the two variables in two columns, one observation per row.
  2. Open Analyze and choose Correlation.
  3. Select the two columns, pick Pearson or Spearman and click Run.

Example: open the Auto MPG dataset (car weight against fuel economy (mpg)) and follow the steps above.

What you get

  • Correlation coefficient (r or ρ)
  • R² (shared variance)
  • N, t statistic, degrees of freedom and two-tailed p-value

How to interpret the result

The sign gives the direction and the size gives the strength: roughly 0.1 is weak, 0.3 moderate and 0.5 or more strong in the social sciences. R² is the proportion of variance the two variables share. A p-value below 0.05 means the correlation is unlikely to be zero in the population. Always look at a scatter plot as well.

Frequently asked questions

Pearson or Spearman: which should I use?

Use Pearson when both variables are roughly normal and the scatter plot looks linear. Use Spearman for ordinal data, outliers, or a relationship that is consistently increasing or decreasing but not straight.

What is a good correlation coefficient?

It depends on the field. A common guide is |r| ≈ 0.1 small, 0.3 medium, 0.5 large. In physical measurements you would often expect much higher values.

Can I correlate many variables at once?

Yes: use the Correlation matrix analysis, and the Correlation heatmap chart to visualise it.