Na4MgAl(PO4)3 crystallizes in the trigonal R3c space group. There are two inequivalent Na sites. In the first Na site, Na(1) is bonded in a 8-coordinate geometry to two equivalent O(1), two equivalent O(2), two equivalent O(3), and two equivalent O(4) atoms. In the second Na site, Na(2) is bonded in a distorted hexagonal planar geometry to three equivalent O(3) and three equivalent O(4) atoms. Mg(1) is bonded to three equivalent O(1) and three equivalent O(3) atoms to form MgO6 octahedra that share corners with six equivalent P(1)O4 tetrahedra. Al(1) is bonded to three equivalent O(2) and three equivalent O(4) atoms to form AlO6 octahedra that share corners with six equivalent P(1)O4 tetrahedra. P(1) is bonded to one O(1), one O(2), one O(3), and one O(4) atom to form PO4 tetrahedra that share corners with two equivalent Mg(1)O6 octahedra and corners with two equivalent Al(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 31-37°. There are four inequivalent O sites. In the first O site, O(3) is bonded to one Na(2), two equivalent Na(1), one Mg(1), and one P(1) atom to form distorted ONa3MgP trigonal bipyramids that share corners with six equivalent O(4)Na3AlP trigonal bipyramids,  an edgeedge with one O(4)Na3AlP trigonal bipyramid, and faces with two equivalent O(3)Na3MgP trigonal bipyramids. In the second O site, O(4) is bonded to one Na(2), two equivalent Na(1), one Al(1), and one P(1) atom to form distorted ONa3AlP trigonal bipyramids that share corners with six equivalent O(3)Na3MgP trigonal bipyramids,  an edgeedge with one O(3)Na3MgP trigonal bipyramid, and faces with two equivalent O(4)Na3AlP trigonal bipyramids. In the third O site, O(1) is bonded in a 4-coordinate geometry to two equivalent Na(1), one Mg(1), and one P(1) atom. In the fourth O site, O(2) is bonded in a distorted bent 150 degrees geometry to two equivalent Na(1), one Al(1), and one P(1) atom.
Na4MgAl(PO4)3 crystallizes in the trigonal R3c space group. There are two inequivalent Na sites. In the first Na site, Na(1) is bonded in a 8-coordinate geometry to two equivalent O(1), two equivalent O(2), two equivalent O(3), and two equivalent O(4) atoms. There is one shorter (2.54 Å) and one longer (2.84 Å) Na(1)-O(1) bond length. There is one shorter (2.64 Å) and one longer (2.80 Å) Na(1)-O(2) bond length. There is one shorter (2.39 Å) and one longer (2.43 Å) Na(1)-O(3) bond length. There is one shorter (2.40 Å) and one longer (2.54 Å) Na(1)-O(4) bond length. In the second Na site, Na(2) is bonded in a distorted hexagonal planar geometry to three equivalent O(3) and three equivalent O(4) atoms. All Na(2)-O(3) bond lengths are 2.49 Å. All Na(2)-O(4) bond lengths are 2.49 Å. Mg(1) is bonded to three equivalent O(1) and three equivalent O(3) atoms to form MgO6 octahedra that share corners with six equivalent P(1)O4 tetrahedra. All Mg(1)-O(1) bond lengths are 1.98 Å. All Mg(1)-O(3) bond lengths are 2.08 Å. Al(1) is bonded to three equivalent O(2) and three equivalent O(4) atoms to form AlO6 octahedra that share corners with six equivalent P(1)O4 tetrahedra. All Al(1)-O(2) bond lengths are 1.92 Å. All Al(1)-O(4) bond lengths are 2.02 Å. P(1) is bonded to one O(1), one O(2), one O(3), and one O(4) atom to form PO4 tetrahedra that share corners with two equivalent Mg(1)O6 octahedra and corners with two equivalent Al(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 31-37°. The P(1)-O(1) bond length is 1.52 Å. The P(1)-O(2) bond length is 1.57 Å. The P(1)-O(3) bond length is 1.54 Å. The P(1)-O(4) bond length is 1.58 Å. There are four inequivalent O sites. In the first O site, O(3) is bonded to one Na(2), two equivalent Na(1), one Mg(1), and one P(1) atom to form distorted ONa3MgP trigonal bipyramids that share corners with six equivalent O(4)Na3AlP trigonal bipyramids,  an edgeedge with one O(4)Na3AlP trigonal bipyramid, and faces with two equivalent O(3)Na3MgP trigonal bipyramids. In the second O site, O(4) is bonded to one Na(2), two equivalent Na(1), one Al(1), and one P(1) atom to form distorted ONa3AlP trigonal bipyramids that share corners with six equivalent O(3)Na3MgP trigonal bipyramids,  an edgeedge with one O(3)Na3MgP trigonal bipyramid, and faces with two equivalent O(4)Na3AlP trigonal bipyramids. In the third O site, O(1) is bonded in a 4-coordinate geometry to two equivalent Na(1), one Mg(1), and one P(1) atom. In the fourth O site, O(2) is bonded in a distorted bent 150 degrees geometry to two equivalent Na(1), one Al(1), and one P(1) atom.