Correlation Matrix Generator
A printed Pearson correlation matrix for up to eight columns of observations.
What this page computes
Put one observation per line with the variables comma-separated. The page prints the Pearson correlation of every pair in an aligned matrix to four decimal places, with the diagonal fixed at 1, and names the strongest off-diagonal pair. Each cell uses Σ(x − x̄)(y − ŷ) over the square root of both sums of squares, with no divisor needed since n cancels. The row and column count are printed above the matrix.
A constant column is refused, because its standard deviation is zero and its correlation is undefined; ragged rows are refused by line, naming the column count. The page does not compute significances for the cells, and with many columns some will look large by chance.
The matrix is computed in this tab, so the same table always prints the same numbers.
The page prints the full Pearson correlation matrix for a pasted table, four decimal places per cell, with the strongest off-diagonal pair named underneath. Five observations across three columns give r = 0.8528 between the first two, printed in a labelled grid rather than as a sentence. It takes at most eight columns and needs at least three observations, and a column that never changes is refused because its correlation with anything is undefined.
Print a Pearson correlation matrix for every pair of columns in a table, with the strongest pair named.
How to use it
Paste one observation per line with the columns comma-separated. Every line must carry the same number of columns; a ragged row is refused by line number. Columns are labelled v1, v2 and so on in the order they appear, so the matrix reads directly against the column position in your own file.
Reading the grid
The matrix is symmetric and its diagonal is 1 by definition, which is a useful check that the pairs were aligned correctly rather than shifted by one. Off-diagonal cells are Pearson’s r with the n − 1 divisor inside the covariance, and the strongest pair is reported by absolute value so a strong negative correlation is not hidden at the bottom of the grid. No p-value is printed here; the correlation page carries the test for a single pair.
What to Expect
Best for
- Scanning many pairs at once before testing one of them
What this tool keeps
- Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.
Sample input
1, 2, 3 2, 4, 5 3, 5, 4 4, 4, 3 5, 6, 7
Sample output
Pearson r, 5 observations, 3 columns: v1 v2 v3 v1 1.0000 0.8528 0.5669 v2 0.8528 1.0000 0.7655 v3 0.5669 0.7655 1.0000 strongest pair: v1 and v2, r = 0.852803
Frequently asked questions
Why is the diagonal all ones?
A column is perfectly correlated with itself, so every diagonal cell is 1 by definition. If the diagonal reads 1 and the off-diagonal cells look plausible, the pairs were aligned correctly.
Does the matrix include p-values?
No. It prints the correlations and names the strongest pair by absolute value; the test for a single pair, with its two-tailed p and n − 2 degrees of freedom, is on the correlation coefficient page.
Is anything uploaded?
No. Every pairwise correlation is computed in this page from the pasted table, and nothing is posted to a server or stored.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.