The geometric structures and magnetism of the three probable isomers for Ni2Sn17,Mn2Sn17,[Ni2Sn17]4- and [Mn2Sn17]2- have been studied using the generalized gradient approximation based on density functional theory. It was found that the D2d structures of Ni2Sn17,Mn2Sn17,[Ni2Sn17]4- and [Mn2Sn17]2- are the most stable structures among the three possible isomers. The study shows that the D2d structure and the D4d structure of Ni2Sn17 have spin-splitting, leading to the magnetic moment 4μB and 2μB, respectively, and there is weak ferromagnetic interaction between the Ni and Sn atoms for the D2d structure and the D4d structure. However, there is no magnetic moment in the D4h structure. On the other hand, the D2d, D4d, and D4h Mn2Sn17 have 2μB,6μB and 2μB magnetic moments, respectively. It is interesting that there is weak antiferromagnetic interaction and weak ferromagnetic interaction between Mn and Sn atoms for the D2d and D4h structures, respectively, while there is not only weak ferromagnetic interaction but also weak antiferromagnetic interaction between Mn and Sn atoms in the D4d structure. Finally, It is worth noting that all their anion counterparts of [Ni2Sn17]4- and [Mn2Sn17]2- have closed electronic configurations, showing no magnetic moment.