Abstract. The largest uncertainties in the Standard Model calculation of the anomalous magnetic moment of the muon (g − 2) µ come from hadronic effects, and in a few years the subleading hadronic light-by-light (HLbL) contribution might dominate the theory error. We present a dispersive description of the HLbL tensor, which is based on unitarity, analyticity, crossing symmetry, and gauge invariance. This opens up the possibility of a data-driven determination of the HLbL contribution to (g − 2) µ with the aim of reducing model dependence and achieving a reliable error estimate.Our dispersive approach defines unambiguously the pion-pole and the pion-box contribution to the HLbL tensor. Using Mandelstam double-spectral representation, we have proven that the pion-box contribution coincides exactly with the one-loop scalar-QED amplitude, multiplied by the appropriate pion vector form factors. Using dispersive fits to high-statistics data for the pion vector form factor, we obtain a π-box µ = −15.9(2) × 10 −11 . A first model-independent calculation of effects of ππ intermediate states that go beyond the scalar-QED pion loop is also presented. We combine our dispersive description of the HLbL tensor with a partial-wave expansion and demonstrate that the known scalar-QED result is recovered after partial-wave resummation. After constructing suitable input for the γ * γ * → ππ helicity partial waves based on a pion-pole left-hand cut (LHC), we find that for the dominant charged-pion contribution this representation is consistent with the two-loop chiral prediction and the COMPASS measurement for the pion polarizability. This allows us to reliably estimate S -wave rescattering effects to the full pion box and leads to a π-box µ + a ππ,π-pole LHC µ,J=0 = −24(1) × 10 −11 .⋆