Skip to main content
statistics

Correlation Coefficient Calculator

Calculate Pearson's correlation coefficient (r) from summary statistics to measure the strength and direction of the linear relationship between two variables. Values range from -1 to +1.

Reviewed by Chase FloiedUpdated

This free online correlation coefficient calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Correlation Coefficient Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Correlation Coefficient Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Correlation Coefficient Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Correlation Coefficient Calculator when you need accurate results quickly without the risk of manual computation errors or unit conversion mistakes.
  • Use it to verify calculations made by hand or in spreadsheets — an independent check can catch errors before they lead to costly decisions.
  • Use it to explore how changing input parameters affects the output — a quick way to develop intuition and identify the most influential variables.
  • Use it when collaborating with others to ensure everyone is working from the same numbers and applying the same assumptions.

About This Calculator

The Correlation Coefficient Calculator is a free, browser-based calculation tool for engineers, students, and technical professionals. Calculate Pearson's correlation coefficient (r) from summary statistics to measure the strength and direction of the linear relationship between two variables. Values range from -1 to +1. It implements standard formulas and supports both metric (SI) and imperial unit systems with automatic unit conversion. All calculations are performed instantly in your browser with no data sent to a server. Use this calculator as a quick reference and sanity-check tool during design, analysis, and learning. Always verify results against primary engineering references and applicable standards for any safety-critical application.

About Correlation Coefficient Calculator

The Correlation Coefficient Calculator computes Pearson's r — the most widely used measure of the linear relationship between two variables. The correlation coefficient ranges from -1 to +1, where +1 indicates a perfect positive linear relationship, -1 a perfect negative relationship, and 0 indicates no linear relationship. This single number, developed by Karl Pearson in the 1890s, has become indispensable in research, finance, science, social sciences, and data analytics. Whether you're investigating whether study time predicts grades, if temperature relates to ice cream sales, if exercise affects blood pressure, or if marketing spend drives revenue, Pearson's r tells you the strength and direction of those linear relationships in a standardized, comparable way.

The Math Behind It

Pearson's correlation coefficient (r) measures the strength and direction of a LINEAR relationship between two variables. It's the most fundamental statistic for understanding bivariate relationships. **The Formula**: r = (nΣxy - ΣxΣy) / √[(nΣx² - (Σx)²)(nΣy² - (Σy)²)] Or equivalently: r = Σ[(x - x̄)(y - ȳ)] / √[Σ(x - x̄)² × Σ(y - ȳ)²] **Range and Interpretation**: | r | Strength | |---|----------| | +1.0 | Perfect positive | | +0.8 to +1.0 | Strong positive | | +0.5 to +0.8 | Moderate positive | | +0.3 to +0.5 | Weak positive | | 0 to +0.3 | Very weak/no relationship | | 0 | No linear relationship | | -0.3 to 0 | Very weak negative | | -0.5 to -0.3 | Weak negative | | -0.8 to -0.5 | Moderate negative | | -1.0 to -0.8 | Strong negative | | -1.0 | Perfect negative | **Examples of Correlations**: - **Height vs weight**: r ≈ 0.7 (strong positive) - **Education vs income**: r ≈ 0.5 (moderate positive) - **SAT score vs GPA**: r ≈ 0.4 (moderate positive) - **Temperature vs ice cream sales**: r ≈ 0.8 (strong positive) - **Cigarette smoking vs lung cancer**: r ≈ 0.7 (strong positive) - **Hours of TV vs grades (children)**: r ≈ -0.3 (weak negative) **Coefficient of Determination (r²)**: The square of the correlation coefficient (r²) represents the proportion of variance in y explained by x. - r = 0.5 → r² = 0.25 (25% of variance explained) - r = 0.7 → r² = 0.49 (49% of variance explained) - r = 0.9 → r² = 0.81 (81% of variance explained) This is why correlations of 0.3 are 'weak' — they only explain 9% of variance. **Critical Insight: Correlation ≠ Causation** A strong correlation does NOT prove causation. There are several possibilities: 1. **X causes Y**: Smoking causes lung cancer 2. **Y causes X**: Reverse causation 3. **Z causes both**: Confounding variable (lurking variable) 4. **Coincidence**: Random correlation Classic example: Ice cream sales and drowning deaths are highly correlated. But ice cream doesn't cause drowning — both increase in summer (the lurking variable). **Famous Spurious Correlations**: - US spending on science vs suicides by hanging (r ≈ 0.99) - Per capita cheese consumption vs civil engineering doctorates (r ≈ 0.96) - Number of pirates vs global warming (inverse correlation) These are coincidences, not causal relationships. **Assumptions of Pearson's r**: 1. **Linear relationship**: Doesn't capture curves 2. **Both variables continuous** and approximately normal 3. **No extreme outliers** 4. **Homoscedasticity**: Equal variance across x values Violations require alternative methods: - **Spearman's rho**: For ordinal data or non-linear monotonic - **Kendall's tau**: Similar to Spearman, less sensitive to ties - **Mutual information**: For non-linear, non-monotonic **Sample Size Effects**: With small samples, even strong correlations may not be statistically significant. Required sample sizes for significance: | r | n needed for p < 0.05 | |---|----------------------| | 0.3 | ~44 | | 0.5 | ~16 | | 0.7 | ~9 | | 0.9 | ~5 | **Hypothesis Testing**: To test if r is significantly different from 0: t = r × √(n-2) / √(1-r²) Compare to t-distribution with n-2 degrees of freedom. **Computing by Hand** (Example): Given 5 data points: (1,2), (2,4), (3,5), (4,7), (5,8) n = 5 Σx = 15, Σy = 26 Σxy = 1×2 + 2×4 + 3×5 + 4×7 + 5×8 = 2 + 8 + 15 + 28 + 40 = 93 Σx² = 1 + 4 + 9 + 16 + 25 = 55 Σy² = 4 + 16 + 25 + 49 + 64 = 158 r = (5×93 - 15×26) / √[(5×55 - 15²)(5×158 - 26²)] r = (465 - 390) / √[(275 - 225)(790 - 676)] r = 75 / √(50 × 114) r = 75 / √5700 r = 75 / 75.50 r = 0.993 **Practical Tips**: 1. **Always plot the data first** — see if relationship looks linear 2. **Check for outliers** that may distort r 3. **Use larger samples** for stable estimates 4. **Don't overinterpret** small correlations 5. **Report r² along with r** for context 6. **Test for significance** before drawing conclusions

Formula Reference

Pearson's r

r = (nΣxy - ΣxΣy) / √[(nΣx² - (Σx)²)(nΣy² - (Σy)²)]

Variables: n = sample size

Worked Examples

Example 1: Strong Positive Correlation

5 students' study hours and test scores: (2,65), (4,75), (6,85), (8,95), (10,100). Calculate r.

Step 1:n = 5
Step 2:Σx = 30, Σy = 420
Step 3:Σxy = 130 + 300 + 510 + 760 + 1000 = 2700
Step 4:Σx² = 4 + 16 + 36 + 64 + 100 = 220
Step 5:Σy² = 4225 + 5625 + 7225 + 9025 + 10000 = 36100
Step 6:r = (5×2700 - 30×420) / √[(5×220 - 900)(5×36100 - 176400)]
Step 7:r = (13500 - 12600) / √(200 × 4100)
Step 8:r = 900 / √820000 = 900 / 905.5 = 0.994

r = 0.994 — extremely strong positive correlation. Study hours strongly predict test scores in this dataset.

Example 2: Weak Correlation

Hypothetical data: r = 0.32, n = 50.

Step 1:r² = 0.32² = 0.1024
Step 2:Only 10.24% of variance explained
Step 3:Significance test: t = 0.32 × √48 / √(1 - 0.1024) = 2.34
Step 4:p < 0.05 — significant

Although statistically significant (p < 0.05), the relationship is weak — only 10% of variance is explained. Many other factors are at work.

Common Mistakes & Tips

  • !Assuming correlation implies causation. It doesn't, ever.
  • !Using Pearson's r for non-linear relationships. The data may have a strong relationship that r misses.
  • !Ignoring outliers that can dramatically inflate or deflate r.
  • !Drawing conclusions from small samples. r is unstable with n < 30.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

What's the difference between correlation and causation?

Correlation measures whether two variables move together. Causation means one variable actually CAUSES the other to change. Correlation can exist without causation through: confounding variables (both caused by something else), reverse causation (Y causes X), coincidence, or selection bias. Establishing causation requires controlled experiments or careful causal inference methods, not just correlation analysis.

What's a 'good' correlation?

Depends on context. In physics, r > 0.99 is expected. In psychology, r = 0.3-0.5 is considered meaningful. In medicine, r > 0.6 is strong. In social sciences, r > 0.3 is interesting. Effect size matters more than statistical significance — a correlation of 0.05 might be 'significant' with a huge sample but practically meaningless.

Can correlation be greater than 1 or less than -1?

No, never. Correlation is mathematically bounded by -1 to +1. If you compute a value outside this range, there's a calculation error. The value 1 represents perfect positive linear relationship; -1 perfect negative; 0 no linear relationship. The bounds come from the Cauchy-Schwarz inequality.

How is r different from regression slope?

Correlation (r) measures the strength of linear relationship without units, ranging -1 to +1. Regression slope (β) measures the change in y per unit change in x, in original units. Related: β = r × (sy/sx). They tell different things: r is about strength of association; slope is about magnitude of effect. A strong correlation might have a small slope and vice versa.