In this paper we present a general strategy for the calculation of the effective Center of Mass (CoM) of humanoid robots, allowing the reduction of the error between the virtual robot model and the real platform. The method is based on an algorithm that calculates the real position of the CoM of a biped humanoid robot using only 2 force/torque sensors located on the feet of the robot. By means of this algorithm, it is possible to reduce the gap between the real and the virtual posture of the robot and consequently the errors between the ZMP trajectory calculated by the offline pattern generator and the ZMP trajectory calculated by the real-time pattern generator of the humanoid robot. Thus, the influence of the real-time control in the static and dynamic balance of a humanoid platform is minimized. Experimental results using SABIAN platform are provided to validate the proposed method. The results support the applicability of the method to more complex systems.