Discretization methods for ordinary differential equations are usually not exact; they commit an error at every step of the algorithm. All these errors combine to form the global error, which is the error in the final result. The global error is the subject of this thesis. In the first half of the thesis, accurate a priori estimates of the global error are derived. Three different approaches are followed: to combine the effects of the errors committed at every step, to expand the global error in an asymptotic series in the step size, and to use the theory of modified equations. The last approach, which is often the most useful one, yields an estimate which is correct up to a term of order h2p, where h denotes the step size and p the order of the numerical method. This result is then applied to estimate the global error for the Airy equation (and related oscillators that obey the Liouville–Green approximation) and the Emden–Fowler equation. The latter example has the interesting feature that it is not sufficient to consider only the leading global error term, because subsequent terms of higher order in the step size may grow faster in time. The second half of the thesis concentrates on minimizing the global error by varying the step size. It is argued that the correct objective function is the norm of the global error over the entire integration interval. Specifically, the L2 norm and the L∞ norm are studied. In the former case, Pontryagin’s Minimum Principle converts the problem to a boundary value problem, which may be solved analytically or numerically. When the L∞ norm is used, a boundary value problem with a complementarity condition results. Alternatively, the Exterior Penalty Method may be employed to get a boundary value problem without complementarity condition, which can be solved by standard numerical software. The theory is illustrated by calculating the optimal step size for solving the Dahlquist test equation and the Kepler problem.