For asymptotically periodic systems, a powerful (phase) reduction of the dynamics is obtained by computing the so-called isochrons, i.e. the sets of points that converge toward the same trajectory on the limit cycle. Motivated by the analysis of excitable systems, a similar reduction has been attempted for non-periodic systems admitting a stable fixed point. In this case, the isochrons can still be defined but they do not capture the asymptotic behavior of the trajectories. Instead, the sets of interest - that we call " isostables" - are defined in the literature as the sets of points that converge toward the same trajectory on a stable slow manifold of the fixed point. However, it turns out that this definition of the isostables holds only for systems with slow-fast dynamics. Also, efficient methods for computing the isostables are missing. The present paper provides a general framework for the definition and the computation of the isostables of stable fixed points, which is based on the spectral properties of the so-called Koopman operator. More precisely, the isostables are defined as the level sets of a particular eigenfunction of the Koopman operator. Through this approach, the isostables are unique and well-defined objects related to the asymptotic properties of the system. Also, the framework reveals that the isostables and the isochrons are two different but complementary notions which define a set of action-angle coordinates for the dynamics. In addition, an efficient algorithm for computing the isostables is obtained, which relies on the evaluation of Laplace averages along the trajectories. The method is illustrated with the excitable FitzHugh-Nagumo model and with the Lorenz model. Finally, we discuss how these methods based on the Koopman operator framework relate to the global linearization of the system and to the derivation of special Lyapunov functions.