Correlation Matrix Calculator
Paste a spreadsheet with a column for each variable and get every pairwise correlation at once — Pearson or Spearman — with p-values, sample sizes, a shaded APA-style table you can copy into Word, and optional Holm or Bonferroni adjustment. It runs in your browser: nothing is uploaded. Free, no sign-up.
Paste from a spreadsheet (with a header row if you have one), or separate values with tabs, commas, semicolons or spaces. Blank cells and NA count as missing; text columns are skipped.
How to Use the Correlation Matrix Calculator
- 1. Paste your spreadsheet. One row per case, one column per variable, with a header row of variable names if you have one. Blank cells and NA are missing values; text columns such as an ID or a group label are skipped and listed.
- 2. Choose the correlation. Pearson's r for continuous, roughly linear data; Spearman's ρ for ranks, ordinal scales or data with outliers. Tick or untick variables to change what is in the matrix.
- 3. Decide how to treat missing values. Pairwise deletion uses every case each pair has; listwise deletion keeps only the cases complete on all variables, so every cell has the same n.
- 4. Read and copy the table. The APA-style table shows the lower triangle with significance stars, shaded by strength and sign. Copy it as tab-separated text for Word or Sheets, or download the full matrix as CSV.
What the Matrix Shows
A correlation matrix lists the correlation of every variable with every other. It is symmetrical — r between A and B equals r between B and A — and the diagonal is 1, so the table prints only the lower triangle. Each cell comes with a p-value for the null hypothesis that the population correlation is zero, a two-tailed t test on r with n − 2 degrees of freedom. The shading is blue for positive and orange for negative correlations, stronger the larger |r| is; the number is always printed, so the colour is a visual aid rather than the only cue.
Worked Example
The example data hold 24 students' weekly study hours, sleep, a stress rating (1–10), daily cups of coffee and exam grade. One sleep value is blank, so with pairwise deletion any pair involving sleep uses 23 cases and the rest use 24. The strongest correlations are study hours with caffeine (r = .75) and with stress (r = .70). Grade correlates .56 with study hours and .43 with caffeine, but only .14 with sleep.
Raw p-values flag six of the ten pairs as significant at .05. After a Holm adjustment across the ten tests, five remain: the correlation of grade with caffeine (raw p = .038, adjusted p = .188) no longer qualifies, and several others lose a level of stars. That shift is the whole reason to adjust: with ten tests at .05, you should expect about half a false alarm even if nothing were truly correlated.
Pairwise or Listwise Deletion?
| Pairwise | Listwise | |
|---|---|---|
| Cases used | All cases with both values | Only cases complete on every variable |
| Sample size | Differs by cell | One n throughout |
| Strength | Keeps more data, higher power | Always a valid correlation matrix |
| Weakness | Can produce a matrix that is not positive definite, which breaks factor analysis and regression from the matrix | Can discard a lot of data |
When little data is missing the two agree closely. When a lot is missing, report which one you used and the n; the table note this tool writes says so.
Many Correlations, Many Chances
A matrix of k variables holds k(k − 1) ÷ 2 tests: 45 for ten variables, 190 for twenty. At the .05 level you should expect one false positive in every twenty true-zero correlations. The Bonferroni adjustment multiplies each p by the number of tests; Holm's step-down method controls the same family-wise error rate with more power, so it is the better default. Both are the formulas of R's p.adjust. Adjusted p-values are used for the stars in the table when you choose an adjustment. Exploratory work can leave p-values unadjusted if it says so; confirmatory claims should not.
Frequently Asked Questions
- How do I make a correlation matrix with p-values?
- Paste your columns into the box above. Excel's Analysis ToolPak produces only the r values, with no p-values or significance flags, which is why many people compute the matrix elsewhere. This calculator gives r, the p-value and n for every pair, plus a table formatted for a paper.
- How do I report a correlation matrix in APA style?
- Present a table with variables in rows and numbered columns, the lower triangle only, no leading zero on r, M and SD columns, asterisks for significance, and a note defining them and stating N (the APA 7th edition conventions for correlation tables). The table above is laid out that way, and the Copy table button gives you tab-separated text for a Word table.
- Should I use Pearson or Spearman for a correlation matrix?
- Pearson if your variables are continuous, roughly linear in their relationships and free of extreme outliers; Spearman if they are ordinal, skewed or contain outliers, or if you only trust the ranking. With Likert items, Spearman is the safer default. You can switch and compare — a large difference between the two matrices suggests curvature or outliers.
- What is the difference between pairwise and listwise deletion?
- Pairwise deletion computes each correlation from every case that has both of its variables, so the n varies between cells. Listwise deletion drops any case with a missing value anywhere, so n is constant. Pairwise keeps more data; listwise guarantees all cells describe the same sample. Neither fixes data that are missing for a systematic reason.
- Do I need to adjust for multiple comparisons?
- If you will interpret the significance of many correlations as findings, yes — or at least say that the p-values are unadjusted. Holm is a good default: it is never less powerful than Bonferroni and controls the same error rate. If you only read the matrix descriptively, effect sizes matter more than p-values.
- What does a dash in the matrix mean?
- On the diagonal it marks a variable's correlation with itself. Elsewhere it means the correlation is undefined, either because one variable is constant (it has no variance to correlate) or because the pair has fewer than two cases in common.