Na4Mg(NiO3)2 crystallizes in the triclinic P-1 space group. There are three inequivalent Na sites. In the first Na site, Na(1) is bonded in a 5-coordinate geometry to one O(3), two equivalent O(1), and two equivalent O(2) atoms. In the second Na site, Na(2) is bonded to two equivalent O(1), two equivalent O(2), and two equivalent O(3) atoms to form distorted NaO6 octahedra that share corners with six equivalent Ni(1)O5 trigonal bipyramids and edges with two equivalent Ni(1)O5 trigonal bipyramids. In the third Na site, Na(3) is bonded in a 4-coordinate geometry to two equivalent O(2) and two equivalent O(3) atoms. Mg(1) is bonded in a 6-coordinate geometry to two equivalent O(1), two equivalent O(2), and two equivalent O(3) atoms. Ni(1) is bonded to one O(3), two equivalent O(1), and two equivalent O(2) atoms to form distorted NiO5 trigonal bipyramids that share corners with three equivalent Na(2)O6 octahedra,  an edgeedge with one Na(2)O6 octahedra, and edges with two equivalent Ni(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 11-72°. There are three inequivalent O sites. In the first O site, O(1) is bonded in a 6-coordinate geometry to one Na(2), two equivalent Na(1), one Mg(1), and two equivalent Ni(1) atoms. In the second O site, O(2) is bonded to one Na(2), one Na(3), two equivalent Na(1), one Mg(1), and two equivalent Ni(1) atoms to form distorted ONa4MgNi2 pentagonal bipyramids that share corners with three equivalent O(2)Na4MgNi2 pentagonal bipyramids,  a cornercorner with one O(3)Na3MgNi trigonal bipyramid, edges with two equivalent O(2)Na4MgNi2 pentagonal bipyramids, edges with three equivalent O(3)Na3MgNi trigonal bipyramids, and  a faceface with one O(3)Na3MgNi trigonal bipyramid. In the third O site, O(3) is bonded to one Na(1), one Na(2), one Na(3), one Mg(1), and one Ni(1) atom to form distorted ONa3MgNi trigonal bipyramids that share  a cornercorner with one O(2)Na4MgNi2 pentagonal bipyramid, corners with three equivalent O(3)Na3MgNi trigonal bipyramids, edges with three equivalent O(2)Na4MgNi2 pentagonal bipyramids, and  a faceface with one O(2)Na4MgNi2 pentagonal bipyramid.
Na4Mg(NiO3)2 crystallizes in the triclinic P-1 space group. There are three inequivalent Na sites. In the first Na site, Na(1) is bonded in a 5-coordinate geometry to one O(3), two equivalent O(1), and two equivalent O(2) atoms. The Na(1)-O(3) bond length is 2.38 Å. There is one shorter (2.27 Å) and one longer (2.45 Å) Na(1)-O(1) bond length. There is one shorter (2.35 Å) and one longer (2.45 Å) Na(1)-O(2) bond length. In the second Na site, Na(2) is bonded to two equivalent O(1), two equivalent O(2), and two equivalent O(3) atoms to form distorted NaO6 octahedra that share corners with six equivalent Ni(1)O5 trigonal bipyramids and edges with two equivalent Ni(1)O5 trigonal bipyramids. Both Na(2)-O(1) bond lengths are 2.59 Å. Both Na(2)-O(2) bond lengths are 2.40 Å. Both Na(2)-O(3) bond lengths are 2.30 Å. In the third Na site, Na(3) is bonded in a 4-coordinate geometry to two equivalent O(2) and two equivalent O(3) atoms. Both Na(3)-O(2) bond lengths are 2.42 Å. Both Na(3)-O(3) bond lengths are 2.15 Å. Mg(1) is bonded in a 6-coordinate geometry to two equivalent O(1), two equivalent O(2), and two equivalent O(3) atoms. Both Mg(1)-O(1) bond lengths are 2.46 Å. Both Mg(1)-O(2) bond lengths are 2.27 Å. Both Mg(1)-O(3) bond lengths are 1.91 Å. Ni(1) is bonded to one O(3), two equivalent O(1), and two equivalent O(2) atoms to form distorted NiO5 trigonal bipyramids that share corners with three equivalent Na(2)O6 octahedra,  an edgeedge with one Na(2)O6 octahedra, and edges with two equivalent Ni(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 11-72°. The Ni(1)-O(3) bond length is 1.92 Å. There is one shorter (1.94 Å) and one longer (1.95 Å) Ni(1)-O(1) bond length. There is one shorter (1.93 Å) and one longer (2.27 Å) Ni(1)-O(2) bond length. There are three inequivalent O sites. In the first O site, O(1) is bonded in a 6-coordinate geometry to one Na(2), two equivalent Na(1), one Mg(1), and two equivalent Ni(1) atoms. In the second O site, O(2) is bonded to one Na(2), one Na(3), two equivalent Na(1), one Mg(1), and two equivalent Ni(1) atoms to form distorted ONa4MgNi2 pentagonal bipyramids that share corners with three equivalent O(2)Na4MgNi2 pentagonal bipyramids,  a cornercorner with one O(3)Na3MgNi trigonal bipyramid, edges with two equivalent O(2)Na4MgNi2 pentagonal bipyramids, edges with three equivalent O(3)Na3MgNi trigonal bipyramids, and  a faceface with one O(3)Na3MgNi trigonal bipyramid. In the third O site, O(3) is bonded to one Na(1), one Na(2), one Na(3), one Mg(1), and one Ni(1) atom to form distorted ONa3MgNi trigonal bipyramids that share  a cornercorner with one O(2)Na4MgNi2 pentagonal bipyramid, corners with three equivalent O(3)Na3MgNi trigonal bipyramids, edges with three equivalent O(2)Na4MgNi2 pentagonal bipyramids, and  a faceface with one O(2)Na4MgNi2 pentagonal bipyramid.