A method for calculating of the critical value of the porosity criterion developed at the Department of Foundry Technologies of Bauman Moscow State Technical University is proposed. The methodology is based on a computational experiment that allows us to determine with a high degree of probability the conditions for the formation of shrinkage porosity in castings, taking into account the thermophysical properties of the mould and the alloy.