In a coal mine, natural gas can leak through walls and accumulate in enclosed regions that are no longer being mined or ventilated. If there is an accidental spark in the region containing this gas, it can ignite a flame that may transition to detonation (DDT). An important problem is to assess if, when, and where DDT can occur, and thus provide information needed to design strong enough barriers to protect active mining areas. We describe results of numerical simulations of flame acceleration and DDT in obstacle-laden channels to find a scaling law for 𝐿DDT, the distance the deflagration travels before a detonation forms as a function of channel size d. The scaling law is derived for a stoichiometric natural-gas air mixture in a channel with blockage ratio 0.3 and channel sizes ranging from 0.17 to 3.0 m.