Ab initio density-functional calculations using Gaussian orbitals are carried out on large Si and Ge supercells containing oxygen defects. The formation energies, local vibrational modes, and diffusion or reorientation energies of O i , O 2i , VO, VOH, and VO 2 are investigated. The piezospectroscopic tensors for O i , VO, and VO 2 are also evaluated. The vibrational modes of O i in Si are consistent with the view that the defect has effective D 3d symmetry at low hydrostatic pressures but adopts a buckled structure for large pressures. The anomalous temperature dependence of the modes of O 2i is attributed to an increased buckling of Si-O-Si when the lattice contracts. The diffusion energy of the dimer is around 0.8 eV lower than that of O i in Si and 0.6 eV in Ge. The dimer is stable against VO or VO 2 formation and the latter defect has modes close to the reported 894-cm Ϫ1 band. The reorientation energies for O and H in VO and VOH defects are found to be a few tenths of an eV and are greater when the defect has trapped an electron.