The analytical study of grounding systems is only possible for basic electrodes, i.e., hemispherical and spherical electrodes, rods, and horizontal wires. However, it is normal practice to employ more complex earthing systems, such as grounding grids integrated with rods, in order to obtain lower resistances to ground and improve the electrical safety of substations. This paper introduces a semianalytical (or seminumerical) method, consisting of an analytical approach integrated with a numerical solution, to study grounding grids of complex geometry and their effects on non stratified soils. The algorithm that was created and realized with MATLAB allows the determination of all the quantities of interest for the design and the analysis of such grounding systems, i.e., ground resistance, ground potentials, and distribution of the ground-fault current along the grid's components (i.e., horizontal wires and rods). The model is based on the assumption that conductors forming grids have very small radii if compared with their lengths and that the wires can be considered equipotential cylindrical elements. A verification of the proposed algorithm through a finite-element method has been also carried out to confirm the validity of the results. Exemplary calculations of the ground resistance of grids are included in this paper. [ABSTRACT FROM AUTHOR]