The article describes a method for calculating the volume of spatial models when performing earthworks. It is based on the Monte Carlo method. The solution of the problem is based on the use of photogrammetric survey and the construction on this basis of a digital model of the surface and a three-dimensional digital model of the result of excavation work. Additionally, a reference three-dimensional object is introduced, covering the volume of excavation work. The dimensions and volume of the reference object are known. A random number sensor with a uniform distribution is used. The method is based on comparing relations of discrete sets and continuous sets. The concept of discrete volume is introduced. Based on comparative estimates of discrete volumes and continuous volumes, the volume of a three-dimensional object is calculated using the known volume of the standard. The method excludes geometric volume calculations for complex configurations of walls and the bottom of a three-dimensional object. The article contains an assessment of the applicability of the method and an estimate of calculation errors.