The covariance between two random variables XXX and YYY measures the joint variability, and has the formula:

$$ Cov(X,Y) = E[XY] - E[X]E[Y] $$