We present a geometric description of the QRT map (which is an integrable mapping introduced by Quispel, Roberts and Thompson) in terms of the addition formula of a rational elliptic surface. By this formulation, we classify all the cases when the QRT map is periodic; and show that its period is 2, 3, 4, 5 or 6. A generalization of the QRT map which acts birationally on a pencil of K3 surfaces, or Calabi–Yau manifolds, is also presented.