To explore the regulation mechanism of microstructure and macroscopic electrical properties of Sn doped BaTiO3 lead-free piezoelectric ceramics.Based on density functional theory,the band structure,state density and piezoelectric properties of BaTi1-x SnxO3 ceramics(abbreviated as BTSx,x=0,0.125,0.20,0.25,0.33 and 0.50)were calculated by first-principles,and the piezoelectric regulation mechanism was analyzed.The results show that the band gap width of BaTiO3 ceramics is 1.780 eV,It is found that in the range of the studied components,with the increase of Sn doping,the band gap width of BTSx samples decreases monotonically,the densities of states show that the hybridization between atoms makes the piezoelectric property more stable,and the B-site Sn doping enhances the room temperature piezoelectric performance of the sample.