Skip to main content

Correlation Coefficient Calculator

Calculate the correlation coefficient between two variables and see what the relationship means. Enter paired data values, then get Pearson’s r, Spearman’s rank correlation, , a scatterplot, best-fit line, strength labels, significance test, outlier checks, assumptions guidance, and step-by-step work.

Background

A correlation coefficient measures the direction and strength of a relationship between two quantitative variables. In psychology, it can help students explore relationships such as sleep and memory, stress and health, study time and exam score, or reaction time and task difficulty. Correlation does not prove causation, but it is one of the most important tools for describing patterns in research data.

Enter paired data

Input format

Enter one ordered pair per line, such as 2, 5. Headers and blank rows are OK.

Paired data values

Format: one pair per line. You can use commas, tabs, or spaces. Example: 3, 72

Two-column data values

Labels and context

Labels make the interpretation easier to read and help students connect the result to the real-world study.

Options

Chips prefill psychology-friendly examples and QA edge cases.

Result

No result yet. Enter at least 3 paired observations, then click Calculate.

How to use this calculator

  • Enter paired values for two variables, such as study time and exam score.
  • Use one row per observation so each x value stays matched with its y value.
  • Add labels for your variables to make the interpretation more meaningful.
  • Click Calculate to see Pearson’s correlation coefficient, scatterplot, trend line, significance test, assumptions check, and steps.
  • Use quick picks to explore positive, negative, weak, strong, outlier-influenced, perfect, decimal, and repeated-value examples.

How this calculator works

  • It calculates the mean of each variable.
  • It measures how far each value is from its mean.
  • It compares the paired deviations to see whether the variables tend to move together or in opposite directions.
  • It divides by the total variation in both variables to produce Pearson’s r, which always falls between −1 and +1.
  • It also displays , the regression equation, Spearman rank correlation, outlier diagnostics, and a significance test.

Formula & Equations Used

Pearson correlation coefficient: r = Σ[(x − x̄)(y − ȳ)] / √[Σ(x − x̄)² Σ(y − ȳ)²]

Coefficient of determination:

Regression line: ŷ = a + bx

Slope: b = Σ[(x − x̄)(y − ȳ)] / Σ(x − x̄)²

Intercept: a = ȳ − bx̄

t-test for Pearson’s r: t = r√[(n − 2)/(1 − r²)]

Example Problem & Step-by-Step Solution

Example 1 — Study time and exam scores

  1. A psychology student records study time and exam score for several classmates.
  2. The x variable is study time in hours.
  3. The y variable is exam score.
  4. The calculator finds how each value differs from its variable’s mean.
  5. It multiplies the paired deviations, adds them, and divides by the combined variation in x and y.
  6. A positive r means higher study time tends to go with higher exam scores. A negative r means higher values of one variable tend to go with lower values of the other.

Example 2 — Stress rating and well-being score

  1. A researcher records each student’s stress rating and overall well-being score.
  2. The x variable is stress rating.
  3. The y variable is well-being score.
  4. If the points slope downward on the scatterplot, the relationship is negative.
  5. A negative r means students with higher stress ratings tend to have lower well-being scores in the sample.
  6. This still does not prove that stress directly caused the lower well-being scores. Other variables, such as sleep, workload, social support, or health, could also matter.

Example 3 — Outlier effect in a performance study

  1. A researcher studies the relationship between practice sessions and performance score.
  2. Most students show a positive pattern: more practice tends to go with higher performance.
  3. One unusual observation may sit far away from the rest of the points, such as many practice sessions but a low score.
  4. The calculator flags possible high-leverage or large-residual points so students know to inspect the scatterplot carefully.
  5. If Pearson’s r and Spearman’s ρ differ noticeably, the relationship may be affected by an outlier or may be monotonic but not very linear.
  6. Before removing any point, check whether it is a data-entry mistake or a meaningful real observation.

Frequently Asked Questions

Q: What does the correlation coefficient tell me?

It tells you the direction and strength of a relationship between two variables. Positive values mean the variables tend to increase together, negative values mean one tends to decrease as the other increases, and values near 0 suggest little linear relationship.

Q: What is a strong correlation?

Rules of thumb vary by course and research area, but values closer to −1 or +1 indicate stronger relationships. This calculator labels the relationship as very weak, weak, moderate, strong, or very strong.

Q: What does r² mean?

is the coefficient of determination. In a simple linear relationship, it describes the proportion of variation in one variable that is associated with variation in the other variable.

Q: Does correlation prove causation?

No. Correlation can show that two variables are related, but it cannot by itself prove that one variable causes the other. A third variable, reverse causation, or study design limitations may explain the relationship.

Q: What is the difference between Pearson and Spearman correlation?

Pearson correlation measures linear relationships using the original values. Spearman correlation uses ranks, so it is often helpful when the relationship is monotonic but not perfectly linear or when outliers strongly affect Pearson’s r.

All Calculators & ConvertersAll calculators