Just enter the mass in grams and volume in cubic centimeters and it will calculate whether or not it will float in water. The density of water = 1g/cm^3
Inspired by skycreator's "will it float?" , I did not use any of his code in any way. I simply added a more distinguishable water line and changed the volume measurement.