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.
Correlation
Results update instantly as you type
Enter Values
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/math/correlation-calculator?ref=embed" title="Correlation Calculator — Pearson Correlation Coefficient r" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
The Formula
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
Sample Size
The number of paired observations in the dataset. Must be at least 3 for a meaningful correlation calculation.
Sum of Cross-Products
The sum of each x value multiplied by its corresponding y value. Represents the joint variability between the two variables.
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.
Sum of Squares
The sum of each x value squared and each y value squared. Used in the denominator to normalize the correlation coefficient.
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
Enter paired X and Y values in the two text areas, separating numbers by commas, semicolons, spaces, or line breaks.
- 2
Each dataset must contain at least 3 values, and both datasets must have the same number of values.
- 3
The calculator computes the Pearson correlation coefficient r, along with r², covariance, and the means of both variables.
- 4
Read the strength (Very strong, Strong, Moderate, Weak, or Very weak) and direction (Positive or Negative) of the relationship.
- 5
Use the formula breakdown to verify each step of the calculation for learning or teaching purposes.
Quick Reference
| From | To |
|---|---|
| r = +1.0 | Perfect positive linear relationship |
| r = +0.7 | Strong positive correlation |
| r = 0.0 | No linear correlation |
| r = −0.7 | Strong 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
Sources & References
Related Calculators
Reviews
No reviews yet. Be the first to share your experience with Correlation Calculator — Pearson Correlation Coefficient r.
Write a Review
