Existing simulation models for fire protection planning rely on a containment algorithm which fails to account for the interaction between the production of containment line and a fire's capacity to spread. This paper describes a technique for simulating wildland fire containment which explicitly accounts for this interaction by extending, generalizing, and, in some cases, simplifying methods reported earlier (Anderson 1983, Albini et al. 1978, Mees 1985, Anderson 1989). Representing the containment boundary in parametric form [i.e., expressing its Cartesian (x, y) or polar (r, ) coordinates as functions of a dimensionless parameter instead of specifying y as a function of x or r as a function of ], leads to a formalism with two significant advantages: (1) it allows a free choice for the shape of the free burning fire boundary, and (2) it is appropriate for simulations of parallel (indirect) attack as well as direct head and tail attack. In general, the technique requires solution of a first-order, nonlinear, differential equation, a task easily accomplished using numerical methods. The dependence of final fire size and containment time on the line-building rate and eccentricity of the free burning fire boundary are illustrated with the special case of an expanding ellipse and constant line-building rate, for which the containment boundary can be obtained by a simple quadrature. Our General Formulation algorithm is demonstrated with a series of simulations that span the range of likely parameters for fire spread and fireline production. Comparisons made on representative fires between predictions of the General Formulation and models currently in use indicate that current models almost always overestimate fire size, sometimes by as much as an order of magnitude. For. Sci. 42(3):267-281.