Find the mean of the first variable in your data set. The mean is the sum of all the values divided by the number of values. For example, if your data set has values for the heights, weights and ages of people, find the mean of height.
For each value, find the difference between the value and the mean for that variable.
Square the differences found in step 2.
Add the squares found in step 3. This is the variance for that variable.
Repeat steps 1 to 4 for each remaining variable.
Multiply the values of the first two variables in your data set. In the example, multiply the height of each person by the weight of that person.
Find the mean of the product in step 1.
Multiply the mean of the first variable by the mean of the second variable. In the example, multiply the mean height by the mean weight that were found in section 1.
Subtract the product in step 3 from the product in step 2. This is the covariance of the first two variables (in the example, height and weight).
Repeat steps 1 through 4 for each remaining pair of variables. In the example, these would be height and age and weight and age.
Make a table with one more row and one more column than the number of variables. In the example, this would equal four rows and four columns
Label the rows and columns with the variable names. In the example, the labels would be "height," "weight" and "age."
Write the variances in the main diagonal. In the example, write the variances of height, weight and age in the second, third and fourth cell along the main diagonal.
Write the covariances in the off-diagonal cells. Each covariance is written twice, in a symmetric fashion. In the example, write the covariance of height and weight in the cell for the height column and the weight row and also in the cell for the height row and the weight column. Do this for each pair of variables.