Presented paper shows the mathematical and numerical approaches for modelling of binary alloy solidification solved by the Finite Element Method (FEM). The phenomenon of shrinkage cavities formation process is included in the numerical model. Multiple macroscopic cavities can be modelled within the single casting volume. Solid, liquid and gaseous phases with different material properties are taken into account during solidification process. Mathematical model uses the differential equation of heat diffusion. Modification of specific heat is used to describe the heat releasing during liquid-solid phase change. Numerical procedure of shrinkage cavities evolution is based on the recognition of non-connected liquid volumes and local shrinkage computation in the each of them. The recognition is done by the selection of sets of interconnected nodes containing liquid phase in the finite element mesh. Original computer program was developed to perform calculation process. Obtained results of temperature and shrinkage cavities distributions are presented and discussed in details.