Thin film metal-insulator-metal capacitors with undoped HfO2 as the insulator are fabricated by sputtering from ceramic targets and subsequently annealed. The influence of film thickness and annealing temperature is characterized by electrical and structural methods. After annealing, the films show distinct ferroelectric properties. Grazing incidence X-ray diffraction measurements reveal a dominant ferroelectric orthorhombic phase for thicknesses in the 10-50 nm range and a negligible non-ferroelectric monoclinic phase fraction. Sputtering HfO2 with additional oxygen during the deposition decreases the remanent polarization. Overall, the impact of oxygen vacancies and interstitials in the HfO2 film during deposition and annealing is correlated to the phase formation process.