The decision about when to abandon a capital investment is formulated as a dynamic programming problem under conditions of both certain and probabilistic cash flows. One period autocorrelation is assumed in the case of uncertain cash flows. A method for developing the states and the transition matrix needed for implementing the formulation is suggested, and a computer program is developed to carry out the calculations. Examples of the methods are included.