  Elpasolite is the predominant quaternary crystal structure (AlNaK$_2$F$_6$
prototype) reported in the Inorganic Crystal Structure Database. We have
developed a machine learning model to calculate density functional theory
quality formation energies of all $\sim$2 M pristine ABC$_2$D$_6$ elpasolite
crystals which can be made up from main-group elements (up to bismuth). Our
model's accuracy can be improved systematically, reaching 0.1 eV/atom for a
training set consisting of 10 k crystals. Important bonding trends are
revealed, fluoride is best suited to fit the coordination of the D site which
lowers the formation energy whereas the opposite is found for carbon. The
bonding contribution of elements A and B is very small on average. Low
formation energies result from A and B being late elements from group (II), C
being a late (I) element, and D being fluoride. Out of 2 M crystals, 90 unique
structures are predicted to be on the convex hull---among which NFAl$_2$Ca$_6$,
with peculiar stoichiometry and a negative atomic oxidation state for Al.
