The causes of biodiversity change are of great scientific interest and central to policy efforts aimed at meeting biodiversity targets. Changes in species diversity and high rates of compositional turnover have been reported worldwide. In many cases, trends in biodiversity are detected, but these trends are rarely causally attributed to possible drivers. A formal framework and guidelines for the detection and attribution of biodiversity change is needed. We propose an inferential framework to guide detection and attribution analyses, which identifies five steps—causal modelling, observation, estimation, detection and attribution—for robust attribution. This workflow provides evidence of biodiversity change in relation to hypothesized impacts of multiple potential drivers and can eliminate putative drivers from contention. The framework encourages a formal and reproducible statement of confidence about the role of drivers after robust methods for trend detection and attribution have been deployed. Confidence in trend attribution requires that data and analyses used in all steps of the framework follow best practices reducing uncertainty at each step. We illustrate these steps with examples. This framework could strengthen the bridge between biodiversity science and policy and support effective actions to halt biodiversity loss and the impacts this has on ecosystems.This article is part of the theme issue ‘Detecting and attributing the causes of biodiversity change: needs, gaps and solutions’.