Mg13(NbH16)2 crystallizes in the tetragonal P4/mmm space group. There are four inequivalent Mg sites. In the first Mg site, Mg(1) is bonded in a body-centered cubic geometry to four equivalent H(1) and four equivalent H(4) atoms. In the second Mg site, Mg(2) is bonded in a body-centered cubic geometry to four equivalent H(2) and four equivalent H(3) atoms. In the third Mg site, Mg(3) is bonded in a body-centered cubic geometry to two equivalent H(1), two equivalent H(2), two equivalent H(3), and two equivalent H(4) atoms. In the fourth Mg site, Mg(4) is bonded in a body-centered cubic geometry to eight equivalent H(1) atoms. There are two inequivalent Nb sites. In the first Nb site, Nb(1) is bonded in a body-centered cubic geometry to eight equivalent H(3) atoms. In the second Nb site, Nb(2) is bonded in a body-centered cubic geometry to eight equivalent H(4) atoms. There are four inequivalent H sites. In the first H site, H(4) is bonded to one Mg(1), two equivalent Mg(3), and one Nb(2) atom to form HMg3Nb tetrahedra that share corners with four equivalent H(3)Mg3Nb tetrahedra, corners with four equivalent H(1)Mg4 tetrahedra, corners with six equivalent H(4)Mg3Nb tetrahedra, edges with two equivalent H(1)Mg4 tetrahedra, and edges with three equivalent H(4)Mg3Nb tetrahedra. In the second H site, H(1) is bonded to one Mg(1), one Mg(4), and two equivalent Mg(3) atoms to form HMg4 tetrahedra that share corners with two equivalent H(3)Mg3Nb tetrahedra, corners with four equivalent H(4)Mg3Nb tetrahedra, corners with six equivalent H(1)Mg4 tetrahedra,  an edgeedge with one H(3)Mg3Nb tetrahedra, edges with two equivalent H(4)Mg3Nb tetrahedra, and edges with three equivalent H(1)Mg4 tetrahedra. In the third H site, H(2) is bonded in a trigonal planar geometry to one Mg(2) and two equivalent Mg(3) atoms. In the fourth H site, H(3) is bonded to one Mg(2), two equivalent Mg(3), and one Nb(1) atom to form HMg3Nb tetrahedra that share corners with two equivalent H(1)Mg4 tetrahedra, corners with four equivalent H(4)Mg3Nb tetrahedra, corners with six equivalent H(3)Mg3Nb tetrahedra,  an edgeedge with one H(1)Mg4 tetrahedra, and edges with three equivalent H(3)Mg3Nb tetrahedra.
Mg13(NbH16)2 crystallizes in the tetragonal P4/mmm space group. There are four inequivalent Mg sites. In the first Mg site, Mg(1) is bonded in a body-centered cubic geometry to four equivalent H(1) and four equivalent H(4) atoms. All Mg(1)-H(1) bond lengths are 2.04 Å. All Mg(1)-H(4) bond lengths are 2.08 Å. In the second Mg site, Mg(2) is bonded in a body-centered cubic geometry to four equivalent H(2) and four equivalent H(3) atoms. All Mg(2)-H(2) bond lengths are 1.97 Å. All Mg(2)-H(3) bond lengths are 2.11 Å. In the third Mg site, Mg(3) is bonded in a body-centered cubic geometry to two equivalent H(1), two equivalent H(2), two equivalent H(3), and two equivalent H(4) atoms. Both Mg(3)-H(1) bond lengths are 2.09 Å. Both Mg(3)-H(2) bond lengths are 1.94 Å. Both Mg(3)-H(3) bond lengths are 2.09 Å. Both Mg(3)-H(4) bond lengths are 2.10 Å. In the fourth Mg site, Mg(4) is bonded in a body-centered cubic geometry to eight equivalent H(1) atoms. All Mg(4)-H(1) bond lengths are 2.12 Å. There are two inequivalent Nb sites. In the first Nb site, Nb(1) is bonded in a body-centered cubic geometry to eight equivalent H(3) atoms. All Nb(1)-H(3) bond lengths are 1.93 Å. In the second Nb site, Nb(2) is bonded in a body-centered cubic geometry to eight equivalent H(4) atoms. All Nb(2)-H(4) bond lengths are 1.94 Å. There are four inequivalent H sites. In the first H site, H(4) is bonded to one Mg(1), two equivalent Mg(3), and one Nb(2) atom to form HMg3Nb tetrahedra that share corners with four equivalent H(3)Mg3Nb tetrahedra, corners with four equivalent H(1)Mg4 tetrahedra, corners with six equivalent H(4)Mg3Nb tetrahedra, edges with two equivalent H(1)Mg4 tetrahedra, and edges with three equivalent H(4)Mg3Nb tetrahedra. In the second H site, H(1) is bonded to one Mg(1), one Mg(4), and two equivalent Mg(3) atoms to form HMg4 tetrahedra that share corners with two equivalent H(3)Mg3Nb tetrahedra, corners with four equivalent H(4)Mg3Nb tetrahedra, corners with six equivalent H(1)Mg4 tetrahedra,  an edgeedge with one H(3)Mg3Nb tetrahedra, edges with two equivalent H(4)Mg3Nb tetrahedra, and edges with three equivalent H(1)Mg4 tetrahedra. In the third H site, H(2) is bonded in a trigonal planar geometry to one Mg(2) and two equivalent Mg(3) atoms. In the fourth H site, H(3) is bonded to one Mg(2), two equivalent Mg(3), and one Nb(1) atom to form HMg3Nb tetrahedra that share corners with two equivalent H(1)Mg4 tetrahedra, corners with four equivalent H(4)Mg3Nb tetrahedra, corners with six equivalent H(3)Mg3Nb tetrahedra,  an edgeedge with one H(1)Mg4 tetrahedra, and edges with three equivalent H(3)Mg3Nb tetrahedra.