Correlation Matrix Calculator

A correlation matrix shows how every pair of variables moves together. Enter two or more series to calculate Pearson or Spearman coefficients, test their significance, and rank the strongest relationships.

How it works

Measure the strength and direction of linear (Pearson) or rank (Spearman) relationships between two or more series, with significance tests for every pair.

Pearson r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² · Σ(y − ȳ)²]
Spearman ρ = Pearson r computed on the ranks (ties receive average ranks)
t = r·√((n − 2) ÷ (1 − r²)),  two-tailed p-value with n − 2 degrees of freedom

Common uses

  • Selecting drivers for forecasting and regression models
  • Portfolio and risk analysis
  • Exploring relationships in operational data

Worked example

The calculator above opens with this example. Change any input to see the results update instantly, or select Reset to return to these figures.

SeriesRevenue | 412 398 436 445 468 452 441 459 487 503 498 541
Marketing spend | 38 35 42 44 47 45 41 44 50 53 51 58
Headcount | 120 121 121 123 124 126 126 127 129 130 132 133
Interest rate | 5.25 5.25 5.30 5.20 5.10 5.05 5.00 4.90 4.85 4.80 4.75 4.70
MethodPearson (linear)
Example inputs
Strongest relationshipRevenue & Marketing spend
Series4
Observations per series12
Significant pairs (p < 0.05)6
Results

Correlation does not imply causation; trending series often correlate simply because both grow over time. Test changes (first differences) to check.

Interpreting the results

  • Use Spearman when relationships are monotonic but not linear, or when outliers distort Pearson.
  • With small samples even large coefficients may not be significant; check the p-value.
  • Highly correlated drivers in the same regression create multicollinearity; keep one or combine them.

Frequently asked questions

What is the difference between Pearson and Spearman correlation?

Pearson correlation measures the strength of a linear relationship and is sensitive to outliers. Spearman correlation measures any consistently increasing or decreasing relationship using ranks, which makes it more robust to outliers and curved patterns.

What counts as a strong correlation?

As a common rule of thumb, an absolute coefficient above 0.7 is strong, 0.4 to 0.7 is moderate, and 0.2 to 0.4 is weak. Context matters: in some fields a correlation of 0.3 is meaningful.

Why might two unrelated series be highly correlated?

Series that both trend over time, such as revenue and headcount at a growing company, often correlate simply because both rise with time. Correlating period-to-period changes instead of levels helps reveal genuine relationships.

Browse all 13 Statistics & Forecasting calculators