What is the formula to calculate density and units?

Density = Mass/Volume.

Conversion between units will depend on what the two units are.