In order to clarify the effect of hydrogen vacancies on the stability and structure of sodium alanate, NaAlH4, with and without Ti substitution for Al, first-principles electronic structure calculations were carried out. The relative thermodynamic stability of the Ti dopant and the H vacancy in a supercell was obtained. For the Ti-doped Na16Al16H 64 supercell calculations, it was preferable to perform the initial substitution with a cluster of TiAlHn. We showed that substitution of a Ti atom for an Al atom in Na16Al15TiH63 with H vacancies increases the stability of the structure. A density of states analysis revealed weakening of the bond strength corresponding to increase in the bond length.