Na4Mg(NiO3)2 crystallizes in the monoclinic Cm space group. There are three inequivalent Na sites. In the first Na site, Na(1) is bonded to one O(4), two equivalent O(2), and two equivalent O(3) atoms to form distorted NaO5 square pyramids that share  a cornercorner with one Na(1)O5 square pyramid, corners with four equivalent Ni(1)O5 trigonal bipyramids, corners with three equivalent Mg(1)O4 trigonal pyramids, edges with two equivalent Na(1)O5 square pyramids, and edges with two equivalent Ni(1)O5 trigonal bipyramids. In the second Na site, Na(2) is bonded in a distorted see-saw-like geometry to one O(1), one O(4), and two equivalent O(3) atoms. In the third Na site, Na(3) is bonded in a 6-coordinate geometry to one O(1), one O(4), two equivalent O(2), and two equivalent O(3) atoms. Mg(1) is bonded to one O(1), one O(4), and two equivalent O(2) atoms to form distorted MgO4 trigonal pyramids that share corners with six equivalent Na(1)O5 square pyramids, corners with two equivalent Ni(1)O5 trigonal bipyramids, and edges with two equivalent Ni(1)O5 trigonal bipyramids. Ni(1) is bonded to one O(1), two equivalent O(2), and two equivalent O(3) atoms to form distorted NiO5 trigonal bipyramids that share corners with four equivalent Na(1)O5 square pyramids,  a cornercorner with one Ni(1)O5 trigonal bipyramid,  a cornercorner with one Mg(1)O4 trigonal pyramid, edges with two equivalent Na(1)O5 square pyramids, edges with two equivalent Ni(1)O5 trigonal bipyramids, and  an edgeedge with one Mg(1)O4 trigonal pyramid. There are four inequivalent O sites. In the first O site, O(1) is bonded in a 4-coordinate geometry to one Na(2), one Na(3), one Mg(1), and two equivalent Ni(1) atoms. In the second O site, O(2) is bonded in a 6-coordinate geometry to one Na(3), two equivalent Na(1), one Mg(1), and two equivalent Ni(1) atoms. In the third O site, O(3) is bonded in a 6-coordinate geometry to one Na(2), one Na(3), two equivalent Na(1), and two equivalent Ni(1) atoms. In the fourth O site, O(4) is bonded in a trigonal bipyramidal geometry to one Na(2), one Na(3), two equivalent Na(1), and one Mg(1) atom.
Na4Mg(NiO3)2 crystallizes in the monoclinic Cm space group. There are three inequivalent Na sites. In the first Na site, Na(1) is bonded to one O(4), two equivalent O(2), and two equivalent O(3) atoms to form distorted NaO5 square pyramids that share  a cornercorner with one Na(1)O5 square pyramid, corners with four equivalent Ni(1)O5 trigonal bipyramids, corners with three equivalent Mg(1)O4 trigonal pyramids, edges with two equivalent Na(1)O5 square pyramids, and edges with two equivalent Ni(1)O5 trigonal bipyramids. The Na(1)-O(4) bond length is 2.28 Å. There is one shorter (2.44 Å) and one longer (2.52 Å) Na(1)-O(2) bond length. There is one shorter (2.48 Å) and one longer (2.59 Å) Na(1)-O(3) bond length. In the second Na site, Na(2) is bonded in a distorted see-saw-like geometry to one O(1), one O(4), and two equivalent O(3) atoms. The Na(2)-O(1) bond length is 2.15 Å. The Na(2)-O(4) bond length is 2.20 Å. Both Na(2)-O(3) bond lengths are 2.24 Å. In the third Na site, Na(3) is bonded in a 6-coordinate geometry to one O(1), one O(4), two equivalent O(2), and two equivalent O(3) atoms. The Na(3)-O(1) bond length is 2.68 Å. The Na(3)-O(4) bond length is 2.32 Å. Both Na(3)-O(2) bond lengths are 2.62 Å. Both Na(3)-O(3) bond lengths are 2.51 Å. Mg(1) is bonded to one O(1), one O(4), and two equivalent O(2) atoms to form distorted MgO4 trigonal pyramids that share corners with six equivalent Na(1)O5 square pyramids, corners with two equivalent Ni(1)O5 trigonal bipyramids, and edges with two equivalent Ni(1)O5 trigonal bipyramids. The Mg(1)-O(1) bond length is 1.95 Å. The Mg(1)-O(4) bond length is 1.91 Å. Both Mg(1)-O(2) bond lengths are 2.00 Å. Ni(1) is bonded to one O(1), two equivalent O(2), and two equivalent O(3) atoms to form distorted NiO5 trigonal bipyramids that share corners with four equivalent Na(1)O5 square pyramids,  a cornercorner with one Ni(1)O5 trigonal bipyramid,  a cornercorner with one Mg(1)O4 trigonal pyramid, edges with two equivalent Na(1)O5 square pyramids, edges with two equivalent Ni(1)O5 trigonal bipyramids, and  an edgeedge with one Mg(1)O4 trigonal pyramid. The Ni(1)-O(1) bond length is 2.15 Å. There is one shorter (1.99 Å) and one longer (2.07 Å) Ni(1)-O(2) bond length. There is one shorter (1.89 Å) and one longer (1.95 Å) Ni(1)-O(3) bond length. There are four inequivalent O sites. In the first O site, O(1) is bonded in a 4-coordinate geometry to one Na(2), one Na(3), one Mg(1), and two equivalent Ni(1) atoms. In the second O site, O(2) is bonded in a 6-coordinate geometry to one Na(3), two equivalent Na(1), one Mg(1), and two equivalent Ni(1) atoms. In the third O site, O(3) is bonded in a 6-coordinate geometry to one Na(2), one Na(3), two equivalent Na(1), and two equivalent Ni(1) atoms. In the fourth O site, O(4) is bonded in a trigonal bipyramidal geometry to one Na(2), one Na(3), two equivalent Na(1), and one Mg(1) atom.