The phase relationship and thermal expansion coefficient of high-temperature superconductor YBa2Cu3O7-x under constant oxygen nonstoichiometry, x, and constant partial pressure were determined by high-temperature powder x-ray diffraction analysis at up to 800 °C. An orthorhombic-to-tetragonal transition occurred near x = 0.5. The lattice parameter, c, perpendicular to Cu-O plane, showed the maximum at x = 0.7 to 0.8. In the orthorhombic phase, the lattice parameters a and b along the Cu-O plane were constant for x &le 0.2. For 0.2 &le x &le 0.5, a increased and b decreased with x. In the tetragonal phase the lattice parameter a decreased when x > 0.5. The thermal expansion coefficient, α, along c-axes was from 19 × 10-6 to 25 × 10-6 · K-1, whereas α along a- and b-axes was from 12 × 10-6 to 22 × 10-6 · K-1 at 400 to 800 °C. Below 400 °C these values were very small. Changes of x and temperature affected c more strongly than a and b.