The work-loop method is frequently used to determine the mechanical work performed by a system, for instance, when analyzing muscles or describing the work balance at the joint level. While for these examples usually only one-dimensional movements are investigated, for two- or three-dimensional movements, such as leg function during walking and running, the work-loop has to be adapted. In this paper, we present an analytical derivation that extends the work-loop method to two-dimensional sagittal plane movements. Three effects contribute to the mechanical work of the leg: (1) forces directed along the leg axis, (2) forces acting perpendicular to the leg axis, and (3) a shift of the center of pressure (COP) during stance. These three contributors to the mechanical work performed can be interpreted as three general tasks of the leg. To demonstrate the new work-loop method, we analyzed experimental data on hopping, running and walking. The results indicate that the proposed new generalized work-loop concept is suitable for describing the overall mechanical work performed on the COM during stance with energy consistent net work balances. Depending on the type of gait, specific contributions of each work term were found that characterize leg function during locomotion.