The paper describes a numerical algorithm for more accurate calculation of touch voltages and step voltages. The algorithm is based on the application of the Thevenin equivalent and on the application of a network model of human feet. The Thevenin equivalent is valid only for a given configuration of the grounding system, for a given location of human feet and for a given soil model. Therefore, it is recommended to use the algorithm for more accurate calculation of touch voltages and step voltages only at points on the soil surface that are of particular importance. The paper also considers the addition of a surface layer of gravel or asphalt to reduce excessively high step voltages and touch voltages.