When an unexpected external force is applied to a humanoid robot, its balance is compromised. Therefore, it is necessary to make the humanoid robot avoid falling. One solution to make the robot keep its balance is to use stepping. The stepping motion can favorably affect the balance of the humanoid robot. Nevertheless, such process should be executed on the background of the current task. This thesis focuses on the proper timing to start the stepping action. The purpose of our research is to create a stepping balancer that will not interfere with the original movement provided by the walking pattern generator. This thesis proposes value function that shows if the given control input for each situation is related to avoid falling or not. Using the value function, the robot can perform the current task and use stepping only in the cases where there is a possibility of falling.