Paste your data to get a full correlation matrix for up to 20 variables. Choose Pearson, Spearman or Kendall, see two-sided p-values and 95% confidence intervals, correct for multiple testing, and export a heatmap or CSV. Everything runs in your browser; no data is uploaded.
Step 1
Paste your data
Comma, tab or semicolon separated. The first row can hold variable names. Missing values: blank, NA, N/A, null, or —. Up to 20 variables.
Step 2
Correlation matrix
Coefficients and p-values
Each cell shows the coefficient with significance stars, and the p-value below it. The diagonal is always 1. Hover a cell for the sample size and confidence interval.
Pairwise details
Unique variable pairs, sorted by absolute correlation.
Interpretation
What is a correlation matrix?
A correlation matrix is a square table that shows the correlation coefficient for every pair of variables in a dataset. The rows and columns list the same variables, so a five-variable matrix has five rows and five columns. Each off-diagonal cell answers one question: how strongly do these two variables move together?
The diagonal is always 1 because every variable is perfectly correlated with itself, and the matrix is symmetric: the correlation between X and Y is the same as the correlation between Y and X. That is why most reports show only the lower or upper triangle.
Correlation coefficients usually range from −1 to +1:
- +1 is a perfect positive relationship: when one variable increases, the other increases in exactly the same proportion.
- 0 means no linear relationship. The variables can still be related in a curve; a zero correlation does not prove independence.
- −1 is a perfect negative relationship: when one variable increases, the other decreases in exactly the same proportion.
Because the coefficient is unitless, you can compare variables measured in different units — hours, dollars, test scores, temperatures — in the same table. That is the main advantage of correlation over covariance, whose size depends on the scales of the variables.
How to read a correlation matrix
Read each cell in four steps: sign, magnitude, p-value and sample size.
- Sign. A positive value means the two variables tend to rise together. A negative value means one tends to rise while the other falls.
- Magnitude. The closer |r| is to 1, the stronger the linear association. The closer it is to 0, the weaker the linear association.
- p-value. The p-value tests the null hypothesis that the population correlation is zero. A small p-value is evidence against that null; it does not measure the strength of the relationship.
- Sample size. A coefficient of .80 based on 8 observations is far less trustworthy than the same coefficient based on 800. Always look at the n behind the cell.
Rules of thumb for |r| vary by field. In many social-science settings, .10 is small, .30 is moderate and .50 is strong. In physics, engineering and some biomedical assays, values below .90 may be considered weak because measurement noise is low. Use the conventions of your field, not a universal cutoff.
| |r| | Typical description | What to check |
|---|---|---|
| 0.00–0.19 | Very weak | Could be noise; inspect the scatterplot for a non-linear pattern. |
| 0.20–0.39 | Weak | Small effect; may still matter with a large sample. |
| 0.40–0.59 | Moderate | Worth interpreting; check confidence interval width. |
| 0.60–0.79 | Strong | Check for outliers and overlapping constructs. |
| 0.80–1.00 | Very strong | Check multicollinearity; the variables may be near-duplicates. |
A heatmap makes the pattern easier to see. Blue cells are negative, red cells are positive, and pale cells are close to zero. Blocks of dark cells reveal groups of variables that move together. The calculator draws the heatmap from the same coefficients as the table, so the two views always agree.
How to calculate a correlation matrix
The Pearson correlation between two variables X and Y is:
r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²]
In words: mean-center both variables, multiply the centered values for each observation, sum those products, and divide by the product of the two sums of squares. Repeat for every pair.
Here is a small worked example with three variables and five observations:
- X = 1, 2, 3, 4, 5
- Y = 2, 1, 4, 3, 5
- Z = 5, 4, 3, 2, 1
The means are all 3. The centered X values are −2, −1, 0, 1, 2; the centered Y values are −1, −2, 1, 0, 2; their products sum to 8. The sum of squares is 10 for each variable, so rXY = 8 / √(10 × 10) = 0.80.
Repeating the calculation gives the full matrix:
| X | Y | Z | |
|---|---|---|---|
| X | 1.00 | 0.80 | −1.00 |
| Y | 0.80 | 1.00 | −0.80 |
| Z | −1.00 | −0.80 | 1.00 |
X and Z are perfectly negatively related in this toy dataset, while X and Y rise together. Real data rarely produces exact ±1 values unless one variable is a deterministic function of another.
Pearson vs Spearman vs Kendall
The calculator offers three coefficients because they answer slightly different questions.
| Method | What it measures | Best for | Sensitive to outliers? | Symbol |
|---|---|---|---|---|
| Pearson | Linear association | Interval data with a roughly linear pattern | Yes | r |
| Spearman | Monotonic association, using ranks | Ordinal data, skewed data, outliers | Less | ρ |
| Kendall tau-b | Concordance of ordered pairs | Small samples, many ties, ordinal data | Less | τ |
Pearson is the default in most reports. It is the most familiar and the easiest to connect to covariance and regression. Its weakness is that a single extreme point can move it a lot, and it only detects straight-line patterns.
Spearman converts each variable to ranks and then computes Pearson correlation on the ranks. It detects any monotonic relationship — one that consistently rises or falls, even if the curve is not a straight line — and is much less sensitive to outliers. It is a good choice for Likert items, ratings and other ordinal variables.
Kendall tau-b counts concordant and discordant pairs and adjusts the denominator for ties. It is often preferred for small samples and for data with many tied values. The interpretation is slightly different: τ is a measure of concordance rather than a standardized covariance.
If you are unsure, report Pearson and Spearman side by side. If they disagree substantially, the relationship may be non-linear or driven by outliers, and a scatterplot should be the next step.
p-values, confidence intervals and multiple testing
Each coefficient in the matrix comes with a two-sided p-value and, where the sample size allows, a 95% confidence interval.
For Pearson and Spearman, the test statistic is:
t = r × √[(n − 2) / (1 − r²)]
which is compared with a t distribution with n − 2 degrees of freedom. For Kendall tau-b, the calculator uses a normal approximation with a tie correction. These are the standard approximations used by statistical software; exact permutation tests are available elsewhere but are not needed for most routine work.
The confidence interval uses the Fisher z transformation. The correlation is transformed to a roughly normal scale, a standard error of 1 / √(n − 3) is applied, and the limits are transformed back. A wide interval means the estimate is imprecise, even if the point estimate looks impressive.
Multiple testing is the part most calculators ignore. A matrix with k variables contains k(k − 1) / 2 unique pairs. Ten variables produce 45 tests; twenty produce 190. At α = .05, a 10-variable matrix would be expected to show about two “significant” correlations by chance alone if none of the variables were related.
- Bonferroni multiplies each p-value by the number of tests. It controls the family-wise error rate — the chance of even one false positive — and is conservative when there are many tests.
- Benjamini–Hochberg controls the false discovery rate: the expected proportion of significant results that are false. It is less conservative and is usually the better choice for exploratory screens.
The calculator applies the correction to the p-values and to the significance stars. The pairwise table shows both the raw and adjusted p-values so you can report either, as long as you say which one you used.
Missing data: pairwise vs listwise
Real datasets rarely have a value in every cell. The calculator offers two standard ways to handle missing values.
| Approach | How it works | Advantages | Trade-offs |
|---|---|---|---|
| Pairwise deletion | Each correlation uses every row where both variables are present. | Keeps more data; n can differ by pair. | Different sample sizes; the matrix may not be positive semi-definite. |
| Listwise deletion | Drop any row with a missing value in any variable. | Same n everywhere; cleaner matrix algebra. | Can discard a large share of the data. |
Use listwise deletion when you need a coherent matrix for PCA, regression or other matrix operations. Use pairwise deletion when you want to preserve as much information as possible and you are willing to report the varying sample sizes. Neither method fixes data that are missing for a reason related to the values themselves; that situation calls for multiple imputation or a sensitivity analysis.
Multicollinearity and feature selection
High correlations are not automatically a problem, but they matter when variables are used together in a model. If two predictors correlate at .95, they carry almost the same information. Regression coefficients become unstable, standard errors inflate, and small changes in the data can flip the sign of an effect.
A common diagnostic is the variance inflation factor:
VIFⱼ = 1 / (1 − Rⱼ²)
where Rⱼ² comes from regressing variable j on the other predictors. Values above 5 or 10 are often flagged, depending on the field. The correlation matrix is the first screen: look for |r| ≥ .80, then compute VIFs for the variables you plan to model.
Options include dropping one of the redundant variables, combining them into a scale, using PCA to extract uncorrelated components, or using a regularized model such as ridge regression. Do not drop a variable solely because it correlates with another; consider its measurement quality and its role in the research question.
Correlation vs causation
A correlation matrix describes association, not causation. Two variables can move together because one causes the other, because both are caused by a third variable, because the causal direction is reversed, or because the pattern is a coincidence in this sample.
A classic example is ice cream sales and drowning rates. Both rise in summer, but eating ice cream does not cause drowning; hot weather increases both. In observational data, confounding, selection and measurement error can create or hide correlations. Only a randomized experiment or a strong causal design — with explicit assumptions — supports a causal claim.
How to report a correlation matrix in APA style
A complete report usually includes the method, the sample size, a table of means and standard deviations, the correlations with significance stars, and a note about any correction. Correlations are typically reported to two decimals without a leading zero.
Example sentence:
“A Pearson correlation matrix was computed for five variables (N = 14). The strongest association was between study hours and exam score, r(12) = .84, p < .001, 95% CI [.56, .95].”
The calculator generates a sentence like this from your own results, including the confidence interval and the correction method when one is selected. Adapt the variable labels to the names used in your paper, and report exact p-values below .001 rather than writing “p = .000.”
Calculator methodology and limitations
- Pearson and Spearman p-values use the t approximation with n − 2 degrees of freedom. Kendall p-values use the normal approximation with a tie correction.
- Confidence intervals use the Fisher z transformation for Pearson and Spearman, and a normal approximation for Kendall tau-b.
- Pairwise deletion can produce a matrix that is not positive semi-definite. That is a property of the missing-data pattern, not a calculation error.
- Constant columns have zero variance and no defined correlation; they are reported as undefined and excluded from the pair count.
- Not included: survey weights, complex sampling designs, polychoric or tetrachoric correlations, partial correlations, and robust correlations. These are candidates for future versions.
- Privacy: all calculations run in your browser. The data you paste is not uploaded, stored or sent to a server. A share link encodes the data in the URL only when you explicitly create one.
Frequently asked questions
What is a correlation matrix?
A square table showing the correlation coefficient for every pair of variables. The rows and columns list the same variables, the diagonal is 1, and each off-diagonal cell summarizes how two variables move together.
How do I read a correlation matrix?
Start with the sign and magnitude. Positive values mean the variables tend to rise together; negative values mean one tends to fall as the other rises. Values near ±1 are strong, values near 0 are weak. Check the p-value and sample size before trusting a cell.
What is a good correlation coefficient?
There is no universal cutoff. In many social-science contexts, .10 is small, .30 is moderate and .50 is strong, but physics and engineering often expect much higher values. Judge a coefficient against measurement quality, sample size and the decision it will inform.
Should I use Pearson, Spearman, or Kendall?
Use Pearson for roughly linear, interval data without severe outliers. Use Spearman for monotonic relationships, ordinal data or outliers. Use Kendall tau-b for small samples, many ties or a concordance interpretation. When in doubt, report Pearson and Spearman side by side.
What does a p-value tell me in a correlation matrix?
It estimates how often a correlation at least this large would appear if the true correlation were zero. A small p-value is evidence against zero correlation, not proof of a strong or causal relationship. With many variables, correct for multiple testing.
What is the difference between correlation and covariance?
Covariance measures how two variables vary together in their original units, so its size depends on the scales. Correlation standardizes covariance by the two standard deviations, producing a unitless value between −1 and +1 that is easier to compare.
How do I handle missing data?
Pairwise deletion uses every observation available for each pair; listwise deletion keeps only rows complete across all variables. Pairwise preserves more data but can produce inconsistent matrices. Listwise is cleaner for matrix algebra but may discard many rows. Check whether missingness is random.
What is pairwise deletion?
Pairwise deletion computes each correlation using all rows where both of those variables are present. Different cells can therefore use different sample sizes, which is why the calculator reports n for every pair.
Why do I need a multiple-testing correction?
A 10-variable matrix contains 45 tests. At α = .05, about two would be significant by chance even if nothing were related. Bonferroni controls the chance of any false positive; Benjamini–Hochberg controls the expected share of false discoveries and is less conservative.
Can I use this calculator for Likert or survey data?
Yes, but treat individual Likert items as ordinal. Spearman or Kendall is usually safer than Pearson for single items. For multi-item scales, compute subscale scores first. Polychoric correlations are the specialized option for ordinal items and are not yet included.
How do I report a correlation matrix in APA style?
State the method and sample size, present a table with means, standard deviations, correlations and significance stars, and note any correction. Report coefficients to two decimals without a leading zero, and give exact p-values below .001. The calculator generates a ready-to-adapt sentence.
Does correlation imply causation?
No. A correlation can come from a common cause, reverse causation, selection or coincidence. Only a randomized experiment or a strong causal design supports a causal claim; the correlation matrix is a description of association.
Related calculators and guides
- Confusion Matrix CalculatorAccuracy, precision, recall, F1 and MCC for classification models.
- Principal Component Analysis (PCA) ExplainedHow PCA uses the covariance or correlation matrix to reduce dimensions.
- Feature Scaling: Normalization vs StandardizationWhy scaling changes covariance and when to standardize before PCA.
- Data Leakage in Machine LearningWhy fitting a correlation matrix or PCA before the train-test split leaks information.
