Lattice dynamical methods used to predict phase transformations in crystals typically deal with harmonic phonon spectra and are therefore not applicable in important situations where one of the competing crystal structures is unstable in the harmonic approximation, such as the bcc structure involved in the hcp to bcc martensitic phase transformation in Ti, Zr and Hf. Here we present an expression for the free energy that does not suffer from such shortcomings, and we show by self consistent ab initio lattice dynamical calculations (SCAILD), that the critical temperature for the hcp to bcc phase transformation in Ti, Zr and Hf, can be effectively calculated from the free energy difference between the two phases. This opens up the possibility to study quantitatively, from first principles theory, temperature induced phase transitions.Martensitic phase transformations are common, both in alloys frequently used in industry, such as shape memory alloys [1], and in the the elemental group 3 to 4 transition metals [2], not to mention martensitic transformation in iron and iron-based alloys, a crucial phenomenon for metallurgy [3]. Thus there exists a substantial interest both from an industrial, applied and an academic point of view to develop accurate and effective methods to understand and even predict martensitic phasetransformations.The hcp to bcc (or α to β) transition in Ti, Zr and Hf is a martensitic phase transformation that has been thoroughly investigated both from an experimental [2,4] and theoretical [5][6][7][8] perspective. Recently Hennings et al developed and used a classical potential of the modified embedded atom method (MEAM) [9] to accurately reproduce the phase boundary between the hcp and bcc structure in Ti. However, there is up to this date a lack of first principles theoretical studies made of the martensitic hcp to bcc phase-transformation in Ti, Zr and Hf. The problem is that anharmonic effects in lattice dynamics [10] are of crucial importance for finite-temperature structural phase transitions, and their quantitative firstprinciple treatment is a real challenge.A straightforward calculation using DFT molecular dynamics (DFT-MD) [11] should in principle be able to reproduce the bcc to hcp phase transformation in Ti and similar materials, since DFT-MD implicitly include anharmonic effects. However, DFT-MD is a computationally very demanding task which makes its use problematic. Instead we will here exploit the method of self consistent ab initio lattice dynamical calculations (SCAILD) [12]. Here, we further develop this method in order to be able to calculate thermodynamic properties, such as structural free energy difference (before we were restricted by the calculations of temperature-dependent phonon frequencies only [12][13][14][15][16]). Since the SCAILD scheme is a constrained sampling method, in that it only samples the lattice dynamical phase-space along the normal mode directions of commensurate phonons [12,13], the SCAILD calculations are much faster and, thus, much more practical t...