  The first stars, galaxies, star clusters, and direct-collapse black holes are
expected to have formed in low-mass ($\sim$$10^{5}-10^{9} ~ M_{\odot}$) haloes
at Cosmic Dawn ($z \sim 10 - 30$) under conditions of efficient gas cooling,
leading to gas collapse towards the centre of the halo. The halo mass cooling
threshold has been analyzed by several authors using both analytical models and
numerical simulations, with differing results. Since the halo number density is
a sensitive function of the halo mass, an accurate model of the cooling
threshold is needed for (semi-)analytical models of star formation at Cosmic
Dawn. In this paper the cooling threshold mass is calculated
(semi-)analytically, considering the effects of H$_2$-cooling and formation (in
the gas phase and on dust grains), cooling by atomic metals, Lyman-$\alpha$
cooling, photodissociation of H$_2$ by Lyman-Werner photons (including
self-shielding by H$_2$), photodetachment of H$^-$ by infrared photons,
photoevaporation by ionization fronts, and the effect of baryon streaming
velocities. We compare the calculations to several high-resolution cosmological
simulations, showing excellent agreement. We find that in regions of typical
baryon streaming velocities, star formation is possible in haloes of mass
$\gtrsim 1-2 \times 10^6 ~ M_{\odot}$ for $z \gtrsim 20$. By $z \sim 8$, the
expected Lyman-Werner background suppresses star formation in all minihaloes
below the atomic-cooling threshold ($T_{\rm vir} = 10^4 ~ \textrm{K}$). The
halo mass cooling threshold increases by another factor of $\sim$$4$ following
reionization, although this effect is slightly delayed ($z \sim 4-5$) because
of effective self-shielding.
