In this paper, a physics based analytical model for the bare surface barrier height and two dimensional electron gas density in AlGaN/GaN heterostructures is presented. The model is based on simple charge neutrality electrostatics across the AlGaN barrier layer and that a low density of surface donor states is the source of the two dimensional electron gas. The model shows good agreement with reported experimental results. (C) 2012 American Institute of Physics. [http://dx.doi.org/10.1063/1.4751859]