Niobium (Nb) and strontium (Sr) doped barium titanate (BT) films were deposited by radio frequency (RF) magnetron sputtering with Nb and Sr doped BT ceramic targets, respectively. The effect of Nb and Sr doping on the crystal structure of epitaxial BaTiO3 thin films on MgO substrates was investigated. The crystal structure of the films was examined using the reciprocal space mapping measurement. All the films exhibit a cube-on-cube relation with respect to the substrates. As the amount of doped Sr increased, both of the in-plane and out-of-plane lattice constants of Sr doped BT films slowly approached the BT bulk values. On the other hand, the lattice constants of Nb doped BT films were rapidly coming close to the bulk values. These indicated that the lattices of doped BT films were relaxed as the amount of doped elements increased. In addition, Nb doping had greater influence on the relaxation of the films than Sr doping for the same content of dopant.