Skip to main contentSkip to secondary navigation
HomemathCorrelation

Correlation Calculator — Pearson Correlation Coefficient r

Calculate the Pearson correlation coefficient between two variables. Shows r, r², strength, and direction with step-by-step work.

✓ Formula verified: January 2026
📐

Correlation

Results update instantly as you type

Enter Values

The Formula

r = (n∑xy − ∑x∑y) / √((n∑x² − (∑x)²)(n∑y² − (∑y)²))

Pearson's correlation coefficient r measures the strength and direction of a linear relationship between two continuous variables. The value of r always falls between −1 and +1, where r = +1 indicates a perfect positive linear relationship, r = −1 indicates a perfect negative linear relationship, and r = 0 indicates no linear relationship. The coefficient is scale-invariant, meaning it does not depend on the units of measurement used for either variable.

Variable Definitions

n

Sample Size

The number of paired observations in the dataset. Must be at least 3 for a meaningful correlation calculation.

∑xy

Sum of Cross-Products

The sum of each x value multiplied by its corresponding y value. Represents the joint variability between the two variables.

∑x, ∑y

Sum of X and Sum of Y

The sums of all x values and all y values respectively. Used to compute means and in the covariance numerator.

∑x², ∑y²

Sum of Squares

The sum of each x value squared and each y value squared. Used in the denominator to normalize the correlation coefficient.

r

Pearson Correlation Coefficient

A standardized measure of linear correlation ranging from −1 (perfect negative) through 0 (no correlation) to +1 (perfect positive).

How to Use This Calculator

  1. 1

    Enter paired X and Y values in the two text areas, separating numbers by commas, semicolons, spaces, or line breaks.

  2. 2

    Each dataset must contain at least 3 values, and both datasets must have the same number of values.

  3. 3

    The calculator computes the Pearson correlation coefficient r, along with r², covariance, and the means of both variables.

  4. 4

    Read the strength (Very strong, Strong, Moderate, Weak, or Very weak) and direction (Positive or Negative) of the relationship.

  5. 5

    Use the formula breakdown to verify each step of the calculation for learning or teaching purposes.

Quick Reference

FromTo
r = +1.0Perfect positive linear relationship
r = +0.7Strong positive correlation
r = 0.0No linear correlation
r = −0.7Strong negative correlation

Common Applications

  • Analyzing the relationship between study hours and exam scores in educational research
  • Measuring the correlation between advertising spend and sales revenue in marketing analytics
  • Evaluating the relationship between temperature and energy consumption in utility forecasting
  • Assessing test-retest reliability in psychological and medical measurements
  • Investigating correlations between economic indicators such as GDP growth and unemployment rates

Scatter plot demonstrating a strong positive linear correlation (r ≈ 0.9)

Understanding the Concept

The Pearson correlation coefficient, denoted as r, is the most widely used measure of linear association between two continuous variables. Developed by Karl Pearson in the late 19th century, it is computed as the covariance of the two variables divided by the product of their standard deviations. This normalization ensures that r is always between −1 and +1, regardless of the scales of the original variables. The square of r, called the coefficient of determination (r²), represents the proportion of variance in one variable that is predictable from the other variable. For example, an r of 0.8 means that 64% (0.8² = 0.64) of the variability in Y can be explained by X. It is crucial to note that correlation does not imply causation — a high correlation between two variables may be due to a confounding third variable, coincidence, or reverse causation. Additionally, Pearson r only captures linear relationships; variables with a strong nonlinear relationship (such as a U-shaped curve) may have an r close to zero even though they are clearly related. Always visualize your data with a scatter plot before interpreting correlation coefficients.

Frequently Asked Questions

Related Calculators

Reviews

No reviews yet. Be the first to share your experience with Correlation Calculator — Pearson Correlation Coefficient r.

Write a Review

Your Rating *

0/1000

0/50

Related Calculators

Medical Disclaimer: The health and fitness calculators on this site are for informational and educational purposes only. They are not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider with any questions about your health.

Financial Disclaimer: The finance calculators on this site are for informational purposes only and do not constitute financial advice. Results are estimates based on the inputs provided and may vary. Consult a qualified financial advisor before making investment or financial decisions.

© 2026 TheCalcUniverse. All results are for informational purposes only.

Fast, free, and privacy-first.