When ascending (descending) a slope, positive (negative) work must be performed to overcome changes in gravitational potential energy at the center of body mass (COM). This modifies the pendulum-like behavior of walking. The aim of this study is to analyze how energy exchange and mechanical work done vary within a step across slopes and speeds. Ten subjects walked on an instrumented treadmill at different slopes (from -9° to 9°), and speeds (between 0.56 and 2.22 m s-1). From the ground reaction forces, we evaluated energy of the COM, recovery (i.e. the potential-kinetic energy transduction) and pendular energy savings (i.e. the theoretical reduction in work due to this recovered energy) throughout the step. When walking uphill as compared to level, pendular energy savings increase during the first part of stance (when the COM is lifted) and decreases during the second part. Conversely in downhill walking, pendular energy savings decrease during the first part of stance and increase during the second part (when the COM is lowered). In uphill and downhill walking, the main phase of external work occurs around double support. Uphill, the positive work phase is extended during the beginning of single support to raise the body. Downhill, the negative work phase starts before double support, slowing the downward velocity of the body. Changes of the pendulum-like behavior as a function of slope can be illustrated by tilting the 'classical compass model' backwards (uphill) or forwards (downhill).