The distance represented by one pixel (S) is given by
S=C*cos(y)/2^(z+8)
where...
C is the (equatorial) circumference of the Earth z is the zoom level y is the latitude of where you're interested in the scale.
Make sure your calculator is in degrees mode