Modern business cycle theory and growth theory uses stochastic dynamic general equilibrium models. Many mathematical tools are needed to solve these models. The book presents various methods for computing the dynamics of general equilibrium models. In part I, the representative-agent stochastic growth model is solved with the help of value function iteration, linear and linear quadratic approximation methods, parameterised expectations and projection methods. In order to apply these methods, fundamentals from numerical analysis are reviewed in detail. Part II discusses methods for solving heterogeneous-agent economies. In such economies, the distribution of the individual state variables is endogenous. This part of the book also serves as an introduction to the modern theory of distribution economics. Applications include the dynamics of the income distribution over the business cycle or the overlapping-generations model. Through an accompanying home page to this book, computer codes to all applications can be downloaded.