Deciding when to protect threatened species habitat when complete knowledge about the habitat extent is uncertain is a common problem in conservation. More accurate habitat mapping improves conservation outcomes once that habitat is protected. However, delaying protection to improve accuracy can lead to species decline or, at worst, local extinction when threats to that habitat continue unabated before protection is implemented. Hence, there is a trade-off between gaining knowledge and taking conservation action. We quantified this trade-off and determined the optimal time to spend learning about a species' habitat before protecting that habitat. We used a range of hypothetical learning curves to model improvements in the accuracy of predicted habitat over time, and receiver operating characteristic (ROC) curves to model the corresponding increase in the proportion of habitat protected. We used rates of habitat loss to model the impact of delaying habitat protection and de-rived analytical solutions to the problem for different types of learning curves. We illustrate our approach using two threatened species, the koala Phascolarctos cinereus in Australia and northern abalone Haliotis kamtschatkana in Canada. Our approach confirms that when impacts of threatening processes are incurred rapidly, the need for timely protection is high, and the optimal time to spend learning is short for all learning curves. When the rate of habitat loss is low, we benefit from better habitat identification, and the optimal time to protect is sensitive to assumptions about how we learn and the proportion of non- habitat we are willing to protect unnecessarily. Navigating the trade-off between information gain and timely action is a common problem in conservation. By optimizing the trade-off between the benefits of improving mapping accuracy and the costs of delaying protection, we provide guide-lines on the effective allocation of resources between habitat identification and habitat protection. Importantly, by explicitly modelling this trade-off with a range of learning curves and estimates of the rates of habitat loss or other threatening processes, we can predict the optimal time to spend learning even when relatively little is known about a species and its habitat.