We model the observed black hole mass function under the assumption that black hole formation is controlled by the compactness of the stellar core at the time of collapse . Low compactness stars are more likely to explode as supernovae and produce neutron stars , while high compactness stars are more likely to be failed supernovae that produce black holes with the mass of the helium core of the star . Using three sequences of stellar models and marginalizing over a model for the completeness of the black hole mass function , we find that the compactness \xi _ { 2.5 } above which 50 % of core collapses produce black holes is \xi _ { 2.5 } ^ { 50 \% } = 0.24 ( 0.15 < \xi _ { 2.5 } ^ { 50 \% } < 0.37 at 90 % confidence ) . While models with a sharp transition between successful and failed explosions are always the most likely ( \xi _ { 2.5 } ^ { min } = \xi _ { 2.5 } ^ { max } ) , the width \xi _ { 2.5 } ^ { max } - \xi _ { 2.5 } ^ { min } of the transition between the minimum compactness for black hole formation \xi _ { 2.5 } ^ { min } and the compactness \xi _ { 2.5 } ^ { max } above which all core collapses produce black holes is not well constrained . The models also predict that f = 0.18 ( 0.09 < f < 0.39 ) of core collapses fail assuming a minimum mass for core collapse of 8 M _ { \odot } . We tested four other criteria for black hole formation based on \xi _ { 2.0 } and \xi _ { 3.0 } , the compactnesses at enclosed masses of 2.0 or 3.0 rather than 2.5 M _ { \odot } , the mass of the iron core , and the mass inside the oxygen burning shell . We found that \xi _ { 2.0 } works as well as \xi _ { 2.5 } , while the compactness \xi _ { 3.0 } works significantly worse , as does using the iron core mass or the mass enclosed by the oxygen burning shell . As expected from the high compactness of 20 - 25 M _ { \odot } stars , black hole formation in this mass range provides a natural explanation of the red supergiant problem .