MgCd2 is beta-derived structured and crystallizes in the hexagonal P-6m2 space group. Mg(1) is bonded to six equivalent Mg(1), three equivalent Cd(2), and three equivalent Cd(3) atoms to form MgMg6Cd6 cuboctahedra that share corners with six equivalent Cd(1)Cd12 cuboctahedra, corners with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Cd(3)Mg6Cd6 cuboctahedra,  a faceface with one Cd(1)Cd12 cuboctahedra, faces with six equivalent Cd(2)Mg3Cd9 cuboctahedra, faces with six equivalent Cd(3)Mg6Cd6 cuboctahedra, and faces with seven equivalent Mg(1)Mg6Cd6 cuboctahedra. There are three inequivalent Cd sites. In the first Cd site, Cd(1) is bonded to six equivalent Cd(1) and six equivalent Cd(2) atoms to form CdCd12 cuboctahedra that share corners with six equivalent Cd(1)Cd12 cuboctahedra, corners with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Cd(1)Cd12 cuboctahedra, edges with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra, faces with two equivalent Mg(1)Mg6Cd6 cuboctahedra, faces with six equivalent Cd(1)Cd12 cuboctahedra, and faces with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra. In the second Cd site, Cd(2) is bonded to three equivalent Mg(1), three equivalent Cd(1), and six equivalent Cd(2) atoms to form distorted CdMg3Cd9 cuboctahedra that share corners with six equivalent Cd(3)Mg6Cd6 cuboctahedra, corners with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Cd(1)Cd12 cuboctahedra, edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra,  a faceface with one Cd(3)Mg6Cd6 cuboctahedra, faces with six equivalent Mg(1)Mg6Cd6 cuboctahedra, faces with six equivalent Cd(1)Cd12 cuboctahedra, and faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra. In the third Cd site, Cd(3) is bonded to six equivalent Mg(1) and six equivalent Cd(3) atoms to form CdMg6Cd6 cuboctahedra that share corners with six equivalent Cd(3)Mg6Cd6 cuboctahedra, corners with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Cd(3)Mg6Cd6 cuboctahedra, edges with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra, faces with two equivalent Cd(2)Mg3Cd9 cuboctahedra, faces with six equivalent Cd(3)Mg6Cd6 cuboctahedra, and faces with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra.
MgCd2 is beta-derived structured and crystallizes in the hexagonal P-6m2 space group. Mg(1) is bonded to six equivalent Mg(1), three equivalent Cd(2), and three equivalent Cd(3) atoms to form MgMg6Cd6 cuboctahedra that share corners with six equivalent Cd(1)Cd12 cuboctahedra, corners with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Cd(3)Mg6Cd6 cuboctahedra,  a faceface with one Cd(1)Cd12 cuboctahedra, faces with six equivalent Cd(2)Mg3Cd9 cuboctahedra, faces with six equivalent Cd(3)Mg6Cd6 cuboctahedra, and faces with seven equivalent Mg(1)Mg6Cd6 cuboctahedra. All Mg(1)-Mg(1) bond lengths are 3.12 Å. All Mg(1)-Cd(2) bond lengths are 3.19 Å. All Mg(1)-Cd(3) bond lengths are 3.21 Å. There are three inequivalent Cd sites. In the first Cd site, Cd(1) is bonded to six equivalent Cd(1) and six equivalent Cd(2) atoms to form CdCd12 cuboctahedra that share corners with six equivalent Cd(1)Cd12 cuboctahedra, corners with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Cd(1)Cd12 cuboctahedra, edges with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra, faces with two equivalent Mg(1)Mg6Cd6 cuboctahedra, faces with six equivalent Cd(1)Cd12 cuboctahedra, and faces with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra. All Cd(1)-Cd(1) bond lengths are 3.12 Å. All Cd(1)-Cd(2) bond lengths are 3.25 Å. In the second Cd site, Cd(2) is bonded to three equivalent Mg(1), three equivalent Cd(1), and six equivalent Cd(2) atoms to form distorted CdMg3Cd9 cuboctahedra that share corners with six equivalent Cd(3)Mg6Cd6 cuboctahedra, corners with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Mg(1)Mg6Cd6 cuboctahedra, edges with six equivalent Cd(1)Cd12 cuboctahedra, edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra,  a faceface with one Cd(3)Mg6Cd6 cuboctahedra, faces with six equivalent Mg(1)Mg6Cd6 cuboctahedra, faces with six equivalent Cd(1)Cd12 cuboctahedra, and faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra. All Cd(2)-Cd(2) bond lengths are 3.12 Å. In the third Cd site, Cd(3) is bonded to six equivalent Mg(1) and six equivalent Cd(3) atoms to form CdMg6Cd6 cuboctahedra that share corners with six equivalent Cd(3)Mg6Cd6 cuboctahedra, corners with twelve equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Cd(3)Mg6Cd6 cuboctahedra, edges with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra, faces with two equivalent Cd(2)Mg3Cd9 cuboctahedra, faces with six equivalent Cd(3)Mg6Cd6 cuboctahedra, and faces with twelve equivalent Mg(1)Mg6Cd6 cuboctahedra. All Cd(3)-Cd(3) bond lengths are 3.12 Å.