The structural, thermal, and dielectric properties of the ferroelectric phase of HfO2, ZrO2 and Hf0.5Zr0.5O2 (HZO) are investigated with carefully validated density functional computations.We find, that the free bulk energy of the ferroelectric orthorhombic Pca21 phase is unfavorable compared to the monoclinic P21/c and the orthorhombic Pbca phase for all investigated stoichiometries in the HfχZr1-χO2 system. To explain the existence of the ferroelectric phase in nanoscale thin films we explore the Gibbs / Helmholtz free energies as a function of stress and film strain and find them unlikely to become minimal in HZO films for technological relevant conditions. To assess the contribution of surface energy to the phase stability we parameterize a model, interpolating between existing data, and find the Helmholtz free energy of ferroelectric grains minimal for a range of size and stoichiometry. From the model we predict undoped HfO2 to be ferroelectric for a grain size of about 4 nm and epitaxial HZO below 5 nm.Furthermore we calculate the strength of an applied electric field necessary to cause the