Decisions about extinction risk are ubiquitous, both in everyday life and for our continued existence as a species. We introduce a new risky-choice task that can be used to study this topic: The Extinction Gambling Task. Here, we investigate two versions of this task: a Keep variant, where participants cannot accumulate any more earnings after the extinction event, and a Lose variant, where extinction also wipes out all previous earnings. We derive optimal solutions for both variants and compare them to behavioural data. Our findings suggest that people understand the difference between the two variants and their behaviour is qualitatively in line with the optimal solution. Further, we find evidence for risk aversion in the Keep condition but not in the Lose condition. We hope that this task can facilitate further research on this vital topic.