The linear and nonlinear optical susceptibilities of AA and AB stacking of the carbon nitride polymorph were calculated using the all electron full potential linear augmented plane wave method based on density functional theory. The complex part of the dielectric function is calculated using the recently modified Becke and Johnson (mBJ) approximation which gives a better optical gap in comparison to the Ceperley-Alder (CA) local density approximation, the Perdew-Burke-Ernzerhof generalized gradient approximation, and the Engel-Vosko generalized gradient approximation. The complex dielectric function and other optical constants like refractive index, absorption coefficient, reflectivity and energy loss function are calculated and discussed in detail. The calculated uniaxial anisotropy (À1.06 and À1.04)gives a maximum value of birefringence (À0.89 and À0.87) which increases the suitability of both AA and AB stacking for a large second harmonic generation. The calculated second order susceptibility tensor components |c 333 (u)| at the static limit are calculated to be (1.6 Â 10 À30 esu and 9.6 Â 10 À30 esu) respectively.