This paper explores two methods for valuing ecosystems by valuing the services that they yield to various categories of user and that are not directly valued in the market, and illustrates the usefulness of these methods with an application to the valuation of mangrove ecosystems in Thailand. The first method is known as the production function approach and relies on the fact that ecosystems may be inputs into the production of other goods or services that are themselves marketed, such as fisheries. I discuss issues that arise in measuring the input into fisheries, particularly those due to the fact that the fishery stock is changing over time, and the shadow value of the ecosystem consists in its contribution to the maintenance of the stock as well as its contribution to current output. The second method is known as the expected damage approach and is used to value the services of storm protection in terms of the reduction in expected future storm damage that the ecosystem can provide. These two methods are shown to yield very different valuations of ecosystems from those that would be derived by the methods typically used in cost-benefit analyses. I argue that they represent a significant improvement on current practice.