AB y (A = rare earth or Mg, B = transition metal, 2 < y < 5)-based alloys with varying stoichiometries are being studied in recent years for hydrogen storage and as negative electrode materials for Ni-MH batteries. Their structure can be described as the periodic stacking along the c crystallographic axis of two fundamental layers, [AB 5 ] and [A 2 B 4 ] (labeled as C and L, respectively), and often exhibits stacking defects (loss of periodicity locally). The layer type and the stacking sequence play an important role in the hydrogenation and electrochemical properties. The volume mismatch between the two subunits [AB 5 ] and [A 2 B 4 ] is the main cause of the multiplateau behavior and the irreversibility of the binary RNi y (R = rare earths) compounds. The multielement compounds with [A 2 B 4 ] and [AB 5 ] subunits that are similar in size tend to show better stability. In this paper, the defect structure of four different materials exhibiting different types of stacking faults is analyzed by utilizing a combination of high-angle annular dark field scanning transmission electron microscopy (HAADF-STEM) and X-ray diffraction (XRD) data. The analysis of the X-ray diffraction patterns is done using the FAULTS software, which allows one to determine the nature of the stacking faults and to quantify them. The quantitative description of the different case studies has brought unprecedented insight into rationalizing and correlating the differences between the different structural subunits and hydrogen storage properties.