Grain boundary segregation (GBS) of solutes influences the grain size, texture, and strength of Mg wrought alloys. So far, solutes' GBS in Mg has mostly been investigated by qualitative experimental observations. In this work, we develop a quantitative model to compute the grain boundary segregation energy (ΔEseg) in binary Mg based alloys that takes the relative atomic density of GB into account. The model is utilized to compute ΔEseg of Al, Zn, Ca, Sn, Y, Gd, and Nd solutes in Mg. The result suggests that rare earth elements and Ca are more prone to GBS than Al, Zn, and Sn. Segregation of Gd solutes can explain the smaller grain size and slower grain growth in Mg-Gd extruded alloys than Mg-Al and Mg-Zn counterparts. It also provides an explanation for the weak extrusion texture in Mg-Gd.