In this research, the torsional potential and nonlinear optical properties of 2-,4-,5-phenylpyrimidine, 2-phenylpyrazine, 3-,4-phenylpyridazine, 3-phenyl-1,2,4,5-tetrazine(3-phenyl-s-tetrazine), 5-phenyl-1,2,3,4-tetrazine and 4-phenyl-1,2,3,5-tetrazine compounds were calculated by using HF theory and Becke three parameter functional(B3LYP) hybrid approaches within the density functional theory with 6-31++G(d,p) as the basis set. The effect of the dihedral angle on torsional potential and hyperpolarizability has been analyzed. The computations show that maximum hyperpolarizability is obtained at the planar conformation for all phenyl azabenzenes. The analysis of molecules studied shows that compounds with the same ortho substituent (including nitrogen lone pairs) have very similar conformational behavior. The calculated torsional potential, equilibrium dihedral angle and molecular dipole moment were compared with available experimental and other results determined from different computational methods.