After Bershadsky-Cecotti-Ooguri-Vafa, we introduce an invariant of Calabi-Yau threefolds, which we call the BCOV invariant
and which we obtain using analytic torsion. We give an explicit formula for the BCOV invariant as a function on the compactified
moduli space, when it is isomorphic to a projective line. As a corollary, we prove the formula for the BCOV invariant of quintic mirror threefolds conjectured by Bershadsky-Cecotti-Ooguri-Vafa.