Polluted white dwarfs that have accreted planetary material provide a unique opportunity to probe the geology of exoplanetary systems. However, the nature of the bodies that pollute white dwarfs is not well understood: are they small asteroids, minor planets, or even terrestrial planets? We present a novel method to infer pollutant masses from detections of Ni, Cr, and Si. During core–mantle differentiation, these elements exhibit variable preference for metal and silicate at different pressures (i.e. object masses), affecting their abundances in the core and mantle. We model core–mantle differentiation self-consistently using data from metal–silicate partitioning experiments. We place statistical constraints on the differentiation pressures, and hence masses, of bodies which pollute white dwarfs by incorporating this calculation into a Bayesian framework. We show that Ni observations are best suited to constraining pressure when pollution is mantle-like, while Cr and Si are better for core-like pollution. We find three systems (WD0449-259, WD1350-162, and WD2105-820) whose abundances are best explained by the accretion of fragments of small parent bodies (<0.2 M⊕). For two systems (GD61 and WD0446-255), the best model suggests the accretion of fragments of Earth-sized bodies, although the observed abundances remain consistent (<3σ) with the accretion of undifferentiated material. This suggests that polluted white dwarfs potentially accrete planetary bodies of a range of masses. However, our results are subject to inevitable degeneracies and limitations given current data. To constrain pressure more confidently, we require serendipitous observation of (nearly) pure core and/or mantle material.