GaN devices promise advantages over other compound semiconductors that include higher power amplification, increased linearity, and less temperature dependent degradation. The enhanced concentration of defects in MOCVD (Metal Organic Vapor Deposition) grown GaN is a bottleneck for achieving these superior properties. We present results of calculations of typical point and extended defects in GaN and possible defects at the contacts of GaN with metals. Point defects are separated into intentional Si, Mg, Fe and unintentional O, V N , V Ga impurities. Extended defects are partial dislocations and stacking faults formed during island growth regime (typical for MOCVD) in concentrations of ~ 2-4 orders of magnitude higher than that for MBE (Molecular Beam Epitaxy) or HVPE (Hydride Vapor Phase Epitaxy) for the same thickness.For modeling we used the density functional method with projector augmented waves and neutral defects were introduced into a 72 atom unit cell of GaN. Si and O we found to be shallow donors and Mg a shallow acceptor, Fe dopants and Ga vacancies are acceptors, N vacancies show donor behavior (Fig.1). The results on Si, Mg impurities and Ga, Ni -vacancies are in general agreement with [1-2]. One can imagine complexes V N -Mg or V Ga -O compensating each other, but the probability of the realization of these complexes is much lower than that of individual defectsThe density functional theory and supercell-cluster hybrid approach [3] were used to model the dislocations' core structure and intrinsic stacking faults. We considered dissociation of a 60 ºdislocation in wurtzite into a pair of Shockley partials (SP): 30 º glide and 90 º single and double period glide with both Ga and N cores. Formation of the partials results in a variety of defect levels in the band gap of GaN. The deepest defect levels (1.1 eV from CBM) are related to dangling bonds in the dislocation core. We also calculated the segregation of the n-dopant, Si or O, and the p-dopant, Mg, to the dislocation core. All of the dopants have an energy gain (0.2-0.4 eV) after segregation to the dislocation core of a SP 30 º glide. The intrinsic stacking fault (…AaBbCcAaCc…) with two violations of the wurtzite stacking sequence (…AaBbAaBb…) was considered between the Shockley partial (SP) dislocations in the system of SP 30º single period glide -intrinsic stacking fault -SP 90º single period glide (Fig.2). For this system we found a slight narrowing of the band gap in addition to the formation of deep occupied defect levels ~ 0.7-0.8 eV from the VBM. The formation of the deep traps is a factor decreasing the concentration of p-type carriers. The results of the calculations are compared with the experimental evidence of stacking faults in GaN obtained from high resolution transmission electron microscopy (TEM).The ideality factor of a Schottky diode depends in part on the concentration of defect states near the interface with the metal [4]. We find that KOH etching of GaN before evaporation of metals decreases the ideality factor. Our first-princ...