What is the average density of the earth? M = 5.97 x 10^24 kg , R = 6370 km

Density=mass/volume

volume is 4/3 PI r^3 , I would change km to m before cubing.