Sensitivity analysis studies how the variation in the numerical output of a model can be quantitatively apportioned to different sources of variation in basic input parameters. Thus, it serves to examine the robustness of numerical results with respect to input parameters, which is a prerequisite for deriving economic conclusions from them. In practice, modellers apply different methods, often chosen ad hoc, to do sensitivity analysis. This paper pursues a systematic approach. It formalizes deterministic and stochastic methods used for sensitivity analysis. Moreover, it presents the numerical algorithms to apply the methods, in particular, an improved version of a Gauss-Quadrature algorithm, applicable to one as well as multidimensional sensitivity analysis. The advantages and disadvantages of different methods and algorithms are discussed as well as their applicability.