How to calculate the dry density formula?

How to calculate the dry density formula?

Dry density refers to the weight of soil particles in a unit volume of soil, that is, the ratio of the mass of solid particles to the total volume of soil. Dry density reflects the void ratio of soil, so it can be used to calculate the porosity of soil. It is often obtained by calculating the density and moisture content of soil, but it can also be measured
It is also possible to first calculate the wet density of the excavated soil and then divide it by (1 + W), where W is the moisture content