Measuring density

For my own memory. A variation of Archimedes' method for digital scales.
We need a beaker of water. We weigh first the object, then the beaker with water, then suspend the object on a string and lower it into the water so that it does not touch anything. The density of water is reasonably accurate unity, so:
Density = weight of object / (weight of beaker with water and object - weight of beaker with water)