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. TOC:Representative Agent Models.- Basic Models and Elementary Algorithms. Linear Quadratic and Linear Approximation Methods. Parameterized Expectations. Projection Methods. Heterogenous Agent Models.- Computation of Stationary Distributions. Dynamics of the Distribution Function. Overlapping Generations Model. Tools.- Numerical Methods. Various Other Tools. Epilogue.