The Young's modulus and density are analyzed for 280 and 500 nm thick TiO2 layers deposited by reactive evaporation (RE) and ion plating (IP) by means of surface acoustic wave spectroscopy (SAWS) and grazing incidence X-ray reflection spectroscopy (GIXR). The layers are amorphous or polycrystalline, and have densities between 2.9 g/cm3 and 3.8 g/cm3, depending on the deposition conditions. The measured Young's moduli vary between 65 GPa for RE films and 147 GPa for IP layers. They are independent of film thickness, but correlate with the density. A change of the Young's modulus due to the phase transition from amorphous to anatase is described, which occurs at temperatures above 210°C.