Résumé : Environmental managers must decide how to invest available resources. Researchers have previously determined how to allocate conservation resources among regions, design nature reserves, allocate funding to species conservation programs, design biodiversity surveys and monitoring programs, manage species and invest in greenhouse gas mitigation schemes. However, these issues have not been addressed with a unified theory. Furthermore, uncertainty is prevalent in environmental management, and needs to be considered to manage risks. We present a theory for optimal environmental management, synthesizing previous approaches to the topic and incorporating uncertainty. We show that the theory solves a diverse range of important problems of resource allocation, including distributing conservation resources among the world's biodiversity hotspots; surveillance to detect the highly pathogenic avian influenza H5N1 virus in Thailand; and choosing survey methods for the insect order Hemiptera. Environmental management decisions are similar to decisions about financial investments, with trade-offs between risk and reward.