About 40% of all livable land area globally is allocated to agriculture. Consequently, sustainable strategies for land use require the identification of feasible agro-ecological practices. Shade-grown coffee is a sustainable product which has been associated to the provision of various ecosystem services. The conservation of forest canopy, combined with growing coffee, provides overwinter habitat for coffee berry borer predator songbirds, reduces agrochemical dependency, improves soil health, and serves as an adaptation strategy to climate change. In addition, shade-grown coffee enhances product quality, representing a quality-price premium alternative for smallholders in developing countries who provide 80% of worldwide coffee production and are frequently exposed to price volatility and coffee diseases. Despite the advantages of shade-grown coffee, many growers have shifted to sun-grown coffee in response to coffee leaf rust crisis. This shift involves the utilization of disease-resistant high-yielding varieties, which often exhibit lower product quality. In particular, from 1990s to 2010, most Latin American countries decreased the percentage of coffee production area dedicated to traditional diversified shade coffee production, and sun-grown coffee dominated many new coffee-growing regions like Vietnam, Thailand and Indonesia. Previous studies document several broad trends that influence coffee management decisions between shade-grown and sun-grown coffee including: yield-focused government incentives and policies, subsidized agrochemicals, farm size, certifications and economic incentives linked to innovative value chain models. However, there are limited economic models shedding light on the optimal choice between shade-grown and full sun-grown coffee systems. We use a formal stochastic dynamic profit maximization model to understand the management decisions of a representative smallholder grower and the effects of quality and eco-friendly price premiums on these decisions. Our model chooses the optimal land allocation of sun- vs. shade-grown coffee that maximizes expected net present value subject to land endowments and available technology observed among smallholder growers and accounts for the ecosystems services provided by coffee borer predator birds and tree canopy. In addition, we identify optimal conditions to switch from sun- to shade-grown systems, considering uncertainty coming from disease and price volatility. We collected detailed farm level data on production costs for 265 smallholder growers’ farms in Colombia, Honduras, Mexico and Peru. In addition, we empirically measured smallholders’ discount rates using controlled inter-temporal decision games. Furthermore, we estimated consumers’ willingness to pay for product quality and “bird friendly” coffees in a survey that included 1095 US potential coffee consumers and bird’s conservationists. We employ these results to calibrate the optimization model. Results from this study shed light on cost effective strategies to mitigate and compensate risks associated with shade management. Moreover, our model can identify conditions under which smallholders can increase profits and promote biodiversity conservation simultaneously. Preliminary results suggest that shade-grown coffee could be a profitable alternative if growers were able to receive the premiums that consumers are willing to pay. These results are useful to other crops such as cacao, in which tropical region countries could benefit from having a comparative advantage based on product quality and biodiversity conservation. Keywords: Sustainable agriculture, land use, rural development.